mirror of
https://github.com/clockworkpi/DevTerm.git
synced 2025-12-12 10:18:49 +01:00
bug fix
This commit is contained in:
parent
3ef60f89d8
commit
29beeb6869
@ -241,16 +241,19 @@ void keyboard_action(DEVTERM*dv,uint8_t row,uint8_t col,uint8_t mode) {
|
||||
}break;
|
||||
case _FN_LIGHT_KEYBOARD: {
|
||||
//dv->_Serial->println("light keyboard");
|
||||
|
||||
if(mode == KEY_PRESSED) {
|
||||
dv->Keyboard_state.backlight = dv->Keyboard_state.backlight % 4;
|
||||
dv->Keyboard_state.backlight ++;
|
||||
if(dv->Keyboard_state.backlight >= 4) {
|
||||
dv->Keyboard_state.backlight = 0;
|
||||
}
|
||||
|
||||
pwmWrite(PA8,backlight[ dv->Keyboard_state.backlight ] );
|
||||
if(backlight[ dv->Keyboard_state.backlight ]== 0){
|
||||
timer.pause();
|
||||
}else{
|
||||
timer.resume();
|
||||
}
|
||||
//dv->_Serial->println("light keyboard");
|
||||
dv->Keyboard_state.backlight ++;
|
||||
}
|
||||
}break;
|
||||
case _FN_KEY:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user