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

WIP capslock light for USB connection #7

Closed
wants to merge 1 commit into from

Conversation

msvisser
Copy link
Owner

This commit works mostly, however sometimes when the capslock led is
enabled and the lighting controller was asleep it also turns on the
backlighting effect, which is not correct. However I have yet to find a
solution to this problem.

This is an alternative implementation to pull request #5.

This commit works mostly, however sometimes when the capslock led is
enabled and the lighting controller was asleep it also turns on the
backlighting effect, which is not correct. However I have yet to find a
solution to this problem.
@msvisser msvisser mentioned this pull request Jul 23, 2019
13 tasks
Copy link

@jesusvallejo jesusvallejo left a comment

Choose a reason for hiding this comment

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

this should help to solve

however sometimes when the capslock led is
enabled and the lighting controller was asleep it also turns on the
backlighting effect

if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
capslock_active = true;
/* Make sure the lighting chip is awake */
anne_pro_lighting_on();

Choose a reason for hiding this comment

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

Calling twice (or more while its already woke up) the awake command turns on the backlight,a possible solution its to track if mcu is already woke up.

Copy link
Owner Author

Choose a reason for hiding this comment

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

anne_pro_lighting_on() already checks if the lighting mcu is awake and skips the call if it is. However it looks like the problem is if the mcu is awoken and only the capslock is turned on and then it is put back to sleep, and awoken again, then it turns on the backlight.

Choose a reason for hiding this comment

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

another bug, when lt is used instead of kc_caps, if backlight is on, led just does the opposite.

@msvisser
Copy link
Owner Author

There are still problems with this code, therefore I'm currently closing this pull request. The changes in #5 have made some progress, but there are still weird edge cases.

@msvisser msvisser closed this Nov 28, 2019
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

2 participants