Skip to content

Commit 79a09a4

Browse files
committed
Modified button status enums so they could be used with bitwise operators.
Modified button status enums so they could be used with bitwise operators.
1 parent ace4ee5 commit 79a09a4

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/ButtonEnums.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,22 @@ namespace BUTTONSUITE
3434
enum BUTTONSTATUS
3535
{
3636
// Was just pressed down (first call to "update" after the button was pressed).
37-
JUSTPRESSED,
37+
JUSTPRESSED = 1,
3838

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

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

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

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

5151
// Button is not pressed/on.
52-
NOTPRESSED
52+
NOTPRESSED = 32
5353
};
5454
}
5555

0 commit comments

Comments
 (0)