Skip to content

Commit

Permalink
Fix dual-press button action more properly
Browse files Browse the repository at this point in the history
  • Loading branch information
djphazer committed Sep 26, 2023
1 parent 416ee88 commit 4d212cf
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions software/o_c_REV/APP_HEMISPHERE.ino
Original file line number Diff line number Diff line change
Expand Up @@ -388,14 +388,12 @@ public:

// -- button down
if (down) {
// dual press for Clock Setup...
// a less favorable approach was to check if both buttons are currently pressed. For some reason, this sometimes cancels clock_setup when you let go.
//if (event.mask == (OC::CONTROL_BUTTON_UP | OC::CONTROL_BUTTON_DOWN))
if (OC::CORE::ticks - click_tick < HEMISPHERE_SIM_CLICK_TIME && hemisphere != first_click) {
// dual press for Clock Setup... check first_click, so we only process the 2nd button event
if (event.mask == (OC::CONTROL_BUTTON_UP | OC::CONTROL_BUTTON_DOWN) && hemisphere != first_click) {
clock_setup = 1;
SetHelpScreen(-1);
select_mode = -1;
OC::ui.SetButtonIgnoreMask();
OC::ui.SetButtonIgnoreMask(); // ignore button release
return;
}

Expand Down

0 comments on commit 4d212cf

Please sign in to comment.