Remove unnecessary variable
This commit is contained in:
parent
90f6167e78
commit
2f98eab784
@ -28,11 +28,10 @@ static const uint8_t backlight_table[] PROGMEM = {
|
|||||||
0, 16, 128, 255
|
0, 16, 128, 255
|
||||||
};
|
};
|
||||||
|
|
||||||
static uint8_t backlight_mode;
|
extern backlight_config_t backlight_config;
|
||||||
|
|
||||||
void backlight_set(uint8_t level)
|
void backlight_set(uint8_t level)
|
||||||
{
|
{
|
||||||
backlight_mode = level;
|
|
||||||
switch (level) {
|
switch (level) {
|
||||||
case 1:
|
case 1:
|
||||||
case 2:
|
case 2:
|
||||||
@ -127,16 +126,18 @@ void softpwm_led_off(uint8_t index)
|
|||||||
|
|
||||||
void action_keyevent(keyevent_t event)
|
void action_keyevent(keyevent_t event)
|
||||||
{
|
{
|
||||||
if (backlight_mode == 7) {
|
if (backlight_config.enable) {
|
||||||
|
if (backlight_config.level == 7) {
|
||||||
if (event.pressed) {
|
if (event.pressed) {
|
||||||
softpwm_led_decrease_all(32);
|
softpwm_led_decrease_all(32);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (backlight_mode == 8) {
|
if (backlight_config.level == 8) {
|
||||||
if (event.pressed) {
|
if (event.pressed) {
|
||||||
softpwm_led_increase_all(32);
|
softpwm_led_increase_all(32);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user