Skip to content

Commit

Permalink
cplus1 prev button fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
pr3y committed Jan 29, 2025
1 parent 3e35cd8 commit 3c16c93
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions boards/m5stack-cplus1_1/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,20 @@ void _setBrightness(uint8_t brightval) {
** Handles the variables PrevPress, NextPress, SelPress, AnyKeyPress and EscPress
**********************************************************************/
void InputHandler(void) {
if(axp192.GetBtnPress() || digitalRead(SEL_BTN)==LOW || digitalRead(DW_BTN)==LOW) {
if(axp192.GetBtnPress()) {
if(!wakeUpScreen()) AnyKeyPress = true;
else goto END;
}
if(axp192.GetBtnPress() || digitalRead(UP_BTN)==LOW ) {
PrevPress = true;
EscPress = true;
}
if(digitalRead(DW_BTN)==LOW) {
if(!wakeUpScreen()) AnyKeyPress = true;
else goto END;
NextPress = true;
}
if(digitalRead(SEL_BTN)==LOW) {
if(!wakeUpScreen()) AnyKeyPress = true;
else goto END;
SelPress = true;
}
END:
Expand Down

0 comments on commit 3c16c93

Please sign in to comment.