Conversation
src/devices/logitech_g535.c
Outdated
| if (num != 0 && num != 1 && num != 2 && num != 5 && num != 10 && num != 15 && num != 30) { | ||
| return HSC_OUT_OF_BOUNDS; | ||
| } |
There was a problem hiding this comment.
Don't know if there is a cleaner way to check if num is one of the accepted values in C, normally I'd check if num is in an array of the accepted values but that looks very complicated to do in C 😂
There was a problem hiding this comment.
I Will improve that today. It needs an error message with the correct values and a good way would be to round the user supplied value to multiple of 5 for num > 3 and then to use that. So that the user does not have to look up the correct values before that (except of maximum)
|
When will this be merged? |
Waiting for the second round of reviews, no ETA |
Will merge it today, after I made a small improvement in the out of bounds check |
Building upon #234, this will improve the Logitech G535 support by adding battery status and inactive time.