Fix for an issue about backlight on
This commit is contained in:
parent
2a2c7b8333
commit
ba917cb86f
@ -81,6 +81,12 @@ void backlight_decrease(void)
|
|||||||
void backlight_toggle(void)
|
void backlight_toggle(void)
|
||||||
{
|
{
|
||||||
backlight_config.enable ^= 1;
|
backlight_config.enable ^= 1;
|
||||||
|
if (backlight_config.enable)
|
||||||
|
{
|
||||||
|
if (backlight_config.level == 0) {
|
||||||
|
backlight_config.level = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
eeconfig_write_backlight(backlight_config.raw);
|
eeconfig_write_backlight(backlight_config.raw);
|
||||||
dprintf("backlight toggle: %u\n", backlight_config.enable);
|
dprintf("backlight toggle: %u\n", backlight_config.enable);
|
||||||
backlight_set(backlight_config.enable ? backlight_config.level : 0);
|
backlight_set(backlight_config.enable ? backlight_config.level : 0);
|
||||||
|
Reference in New Issue
Block a user