Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Logitech G535 support #266

Merged
merged 5 commits into from
Mar 3, 2023

Conversation

johannlejeune
Copy link
Contributor

@johannlejeune johannlejeune commented Jan 17, 2023

Building upon #234, this will improve the Logitech G535 support by adding battery status and inactive time.

src/devices/logitech_g535.c Show resolved Hide resolved
src/devices/logitech_g535.c Show resolved Hide resolved
src/devices/logitech_g535.c Show resolved Hide resolved
Comment on lines 166 to 168
if (num != 0 && num != 1 && num != 2 && num != 5 && num != 10 && num != 15 && num != 30) {
return HSC_OUT_OF_BOUNDS;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 😂

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@19Gerhard85
Copy link

When will this be merged?

@johannlejeune
Copy link
Contributor Author

When will this be merged?

Waiting for the second round of reviews, no ETA

@Sapd
Copy link
Owner

Sapd commented Mar 3, 2023

When will this be merged?

Will merge it today, after I made a small improvement in the out of bounds check

@Sapd Sapd merged commit 7b97d80 into Sapd:master Mar 3, 2023
@johannlejeune johannlejeune deleted the improve_logitech_g535_support branch March 3, 2023 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants