qmk / qmk_firmware

Open-source keyboard firmware for Atmel AVR and Arm USB families
https://qmk.fm
GNU General Public License v2.0
17.97k stars 38.62k forks source link

BL_TOGG is not behaving as expected #5425

Closed HMarxen closed 2 years ago

HMarxen commented 5 years ago

Hi, I’ve put BL_TOGG in my keymap and I was expecting that it would toggle between backlight off and the last set backlight brightness. However, all it does is if the backlight is off it will turn to the lowest brightness setting. If the backlight is already on at any brightness setting it does nothing. Am I doing something wrong or is this the intended behaviour?

drashna commented 5 years ago

Which keyboard is this?

HMarxen commented 5 years ago

A xd75AM. This keyboard doesn’t have the backlight on a hardware PWM pin. Might the software PWM be the problem?

FSund commented 5 years ago

I'm having similar issues with a AMJ66 PCB that uses D4 as the backlight pin.

zvecr commented 5 years ago

Have you tried setting #define BACKLIGHT_ON_STATE 1 in the boards config.h? I had to do so on the staryu to get the correct toggle behaviour with software pwm https://github.com/qmk/qmk_firmware/blob/0aece4ddab37e603699cb4ba9e8b72fdaf5a619c/keyboards/staryu/config.h#L68.

FSund commented 5 years ago

Tried #define BACKLIGHT_ON_STATE 1 now, but it only seemed to make things worse.

drashna commented 5 years ago

@HMarxen @FSund Have you tried using the PR referenced right above this comment?

And if so, does that help?

FSund commented 5 years ago

@drashna Yes, it works perfectly as long as I remember #define BACKLIGHT_ON_STATE 1. I left a comment in the PR about it a while back.

fauxpark commented 5 years ago

Thanks for reminding me to document BACKLIGHT_ON_STATE 😆 done in #5983

FSund commented 5 years ago

I think this can be closed now? Works fine on my board after https://github.com/qmk/qmk_firmware/pull/5983 and https://github.com/qmk/qmk_firmware/pull/5945 were merged.

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had activity in the last 90 days. It will be closed in the next 30 days unless it is tagged properly or other activity occurs. For maintainers: Please label with bug, in progress, on hold, discussion or to do to prevent the issue from being re-flagged.

tzarc commented 2 years ago

Closing due to inactivity.