mirror of
https://github.com/clockworkpi/DevTerm.git
synced 2025-12-12 18:28:50 +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;
|
}break;
|
||||||
case _FN_LIGHT_KEYBOARD: {
|
case _FN_LIGHT_KEYBOARD: {
|
||||||
//dv->_Serial->println("light keyboard");
|
//dv->_Serial->println("light keyboard");
|
||||||
|
|
||||||
if(mode == KEY_PRESSED) {
|
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 ] );
|
pwmWrite(PA8,backlight[ dv->Keyboard_state.backlight ] );
|
||||||
if(backlight[ dv->Keyboard_state.backlight ]== 0){
|
if(backlight[ dv->Keyboard_state.backlight ]== 0){
|
||||||
timer.pause();
|
timer.pause();
|
||||||
}else{
|
}else{
|
||||||
timer.resume();
|
timer.resume();
|
||||||
}
|
}
|
||||||
//dv->_Serial->println("light keyboard");
|
|
||||||
dv->Keyboard_state.backlight ++;
|
|
||||||
}
|
}
|
||||||
}break;
|
}break;
|
||||||
case _FN_KEY:
|
case _FN_KEY:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user