mirror of
https://github.com/wessel-novacustom/clevo-keyboard.git
synced 2024-11-15 03:34:01 +01:00
Change stepsize to something better suited for 0 - 255
This commit is contained in:
parent
5c410c27c9
commit
9d0dd45147
|
@ -179,7 +179,7 @@ static struct key_entry clevo_keymap[] = {
|
|||
{ KE_END, 0 }
|
||||
};
|
||||
|
||||
#define BRIGHTNESS_STEP 25
|
||||
#define BRIGHTNESS_STEP 32
|
||||
|
||||
// Keyboard struct
|
||||
struct kbd_led_state_t {
|
||||
|
@ -635,20 +635,20 @@ void clevo_keyboard_event_callb(u32 event)
|
|||
switch (key_event) {
|
||||
case CLEVO_EVENT_DECREASE_BACKLIGHT:
|
||||
if (kbd_led_state.brightness == BRIGHTNESS_MIN
|
||||
|| (kbd_led_state.brightness - 25) < BRIGHTNESS_MIN) {
|
||||
|| (kbd_led_state.brightness - BRIGHTNESS_STEP) < BRIGHTNESS_MIN) {
|
||||
set_brightness(BRIGHTNESS_MIN);
|
||||
} else {
|
||||
set_brightness(kbd_led_state.brightness - 25);
|
||||
set_brightness(kbd_led_state.brightness - BRIGHTNESS_STEP);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case CLEVO_EVENT_INCREASE_BACKLIGHT:
|
||||
if (kbd_led_state.brightness == BRIGHTNESS_MAX
|
||||
|| (kbd_led_state.brightness + 25) > BRIGHTNESS_MAX) {
|
||||
|| (kbd_led_state.brightness + BRIGHTNESS_STEP) > BRIGHTNESS_MAX) {
|
||||
set_brightness(BRIGHTNESS_MAX);
|
||||
} else {
|
||||
set_brightness(kbd_led_state.brightness + 25);
|
||||
set_brightness(kbd_led_state.brightness + BRIGHTNESS_STEP);
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue