Skip to content
This repository has been archived by the owner on Jul 13, 2021. It is now read-only.

Pressing led key 4 times and num key one reboots the firmware #9

Closed
LA-Toth opened this issue May 24, 2018 · 7 comments
Closed

Pressing led key 4 times and num key one reboots the firmware #9

LA-Toth opened this issue May 24, 2018 · 7 comments
Assignees
Labels

Comments

@LA-Toth
Copy link

LA-Toth commented May 24, 2018

If Numpad is in KALEIDOSCOPE_INIT_PLUGINS and I press the following 5 keys in any order, the firmware restarts itself.
The keys: "led" key four times and "num" key once.

I reproduced it one the default Model01-Firmware, but I noticed it on my custom firmware.

@algernon algernon added the bug label May 24, 2018
@algernon algernon self-assigned this May 24, 2018
@obra
Copy link
Member

obra commented May 25, 2018 via email

@LA-Toth
Copy link
Author

LA-Toth commented May 25, 2018

I played around a little bit, and perhaps it's related to power consumption, ie. if I use only active mod color, numpad, and solid color as led effects, and the solid color is (255, 255, 255), it has strange behavior: sometimes the white is fine, but mostly it is blinky, and with numpad it is more unstable. I use a 7 years old Mac, but it does not seem to be relevant.

@obra
Copy link
Member

obra commented May 25, 2018 via email

@LA-Toth
Copy link
Author

LA-Toth commented May 25, 2018

Okay I'm 99% certain it's the power, as I only have issues when the USB cannot provide more power than 500mA. Plugging in the Model01 into my Apple Keyboard the power is limited to 500mA, and the Mac itself can provide more power - in the latter case the problem does not occur. This page states the power limit: https://support.apple.com/en-us/HT204377

@algernon
Copy link
Contributor

If it is power related... does it help if you change numpad_color to CRGB(160, 0, 0) instead?

@LA-Toth
Copy link
Author

LA-Toth commented Jun 1, 2018

Yes, 160, 0, 0 is fine. Anyway, 200, 0, 0 also work for me in case of the default firmware.
The problematic led effect was the solidRed, with RGB 160, 0, 0.

@algernon
Copy link
Contributor

algernon commented Jun 6, 2018

I think the problem was going form R160 to R255, that might have resulted in a spike the host didn't like. If R160 is fine, lets default NumPad to that too, thus working around the issue until we have proper power negotiation and tracking.

algernon added a commit that referenced this issue Jun 6, 2018
Having it at the brightest uses too much power, and may result in power use
surges when switching between LED modes and NumPad, which in turn can force the
operating system to disable the whole device. To avoid this, lower the
brightness to 160, a carefull tuned value, also used by the `solidRed` mode in
the factory firmware.

Fixes #9.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants