Skip to content

Commit

Permalink
Update Button.h
Browse files Browse the repository at this point in the history
  • Loading branch information
trilu2000 committed Sep 12, 2023
1 parent ef1e7b1 commit 98d03c5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Button.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class NoDoublePressAlarm {
public:
NoDoublePressAlarm () {}
~NoDoublePressAlarm () {}
bool newPressAllowed() { return true; }
bool newPressAllowed() { return false; }
void newPressAllowed(__attribute__((unused)) bool b) { }
void setDoublePressTime(__attribute__((unused)) uint16_t t) {}
bool canDoublePress () const { return false; }
Expand Down Expand Up @@ -170,7 +170,6 @@ class StateButton: public Alarm {
}

void irq () {
if (dbl.newPressAllowed() == true) {
sysclock.cancel(ca);
// use alarm to run code outside of interrupt
sysclock.add(ca);
Expand All @@ -188,7 +187,6 @@ class StateButton: public Alarm {
nextstate = debounce;
nexttick = DEBOUNCETIME;
break;

case pressed:
case longpressed:
if (pinstate == OFFSTATE) {
Expand Down

0 comments on commit 98d03c5

Please sign in to comment.