Skip to content

Commit

Permalink
Modified button status enums so they could be used with bitwise opera…
Browse files Browse the repository at this point in the history
…tors.

Modified button status enums so they could be used with bitwise operators.
  • Loading branch information
lendres committed Jun 28, 2021
1 parent ace4ee5 commit 79a09a4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/ButtonEnums.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,22 @@ namespace BUTTONSUITE
enum BUTTONSTATUS
{
// Was just pressed down (first call to "update" after the button was pressed).
JUSTPRESSED,
JUSTPRESSED = 1,

// The button is being pressed and has been held lown shorter than the long press duration.
ISSHORTPRESSED,
ISSHORTPRESSED = 2,

// The button was just released and the duration held down was considered short (less than long press duration).
WASSHORTPRESSED,
WASSHORTPRESSED = 4,

// The button is being pressed and has been held down longer than the long press duration.
ISLONGPRESSED,
ISLONGPRESSED = 8,

// The button was just released and the duration held down was considered long (more than long press duration).
WASLONGPRESSED,
WASLONGPRESSED = 16,

// Button is not pressed/on.
NOTPRESSED
NOTPRESSED = 32
};
}

Expand Down

0 comments on commit 79a09a4

Please sign in to comment.