Skip to content

Commit

Permalink
Fixing Odroid-Go buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
tobozo committed Feb 3, 2022
1 parent 8520ad8 commit 5585295
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions examples/AppStore/modules/misc/controls.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,13 @@ HIDSignal getControls()
}
}
M5.update();
#if defined ARDUINO_M5Stack_Core_ESP32 || defined ARDUINO_M5STACK_FIRE || defined ARDUINO_M5STACK_Core2
// legacy buttons support
bool a = M5.BtnA.wasPressed() || M5.BtnA.pressedFor( 500 );
bool b = M5.BtnB.wasPressed() || M5.BtnB.pressedFor( 500 );
bool c = M5.BtnC.wasPressed() || M5.BtnC.pressedFor( 500 );
//bool d = ( M5.BtnB.wasPressed() && M5.BtnC.isPressed() );
//bool e = ( M5.BtnB.isPressed() && M5.BtnC.wasPressed() );
#endif

// legacy buttons support
bool a = M5.BtnA.wasPressed() || M5.BtnA.pressedFor( 500 );
bool b = M5.BtnB.wasPressed() || M5.BtnB.pressedFor( 500 );
bool c = M5.BtnC.wasPressed() || M5.BtnC.pressedFor( 500 );
//bool d = ( M5.BtnB.wasPressed() && M5.BtnC.isPressed() );
//bool e = ( M5.BtnB.isPressed() && M5.BtnC.wasPressed() );

//if( d || e ) return HIDFeedback( HID_PAGE_UP ); // multiple push, suggested by https://github.com/mongonta0716
if( b ) return HIDFeedback( HID_PAGE_DOWN );
Expand Down

0 comments on commit 5585295

Please sign in to comment.