Skip to content

Commit afb5d9d

Browse files
committed
Format update
1 parent 4ca3680 commit afb5d9d

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/LatchingButton.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,20 @@ BUTTONSTATUS LatchingButton::getStatus()
5959
switch (update())
6060
{
6161
case WASPRESSED:
62+
{
6263
// Capture the event of the button press. Some classes may require this to act on it.
6364
return WASPRESSED;
65+
}
6466

6567
case WASSHORTPRESSED:
68+
{
6669
// Toggle state.
6770
_latched = !_latched;
6871
return WASSHORTPRESSED;
72+
}
6973

7074
case WASLONGPRESSED:
75+
{
7176
if (_resetOnLongPress)
7277
{
7378
reset();
@@ -77,12 +82,15 @@ BUTTONSTATUS LatchingButton::getStatus()
7782
_latched = !_latched;
7883
}
7984
return WASLONGPRESSED;
85+
}
8086

8187
case ISPRESSED:
8288
case NOTPRESSED:
8389
default:
90+
{
8491
// Nothing happened so we return based on the state.
8592
return convertStateToButtonStatus();
93+
}
8694
}
8795
}
8896

0 commit comments

Comments
 (0)