fast shutdown with multiClick
This commit is contained in:
parent
97122eec5b
commit
0859c00af7
|
|
@ -194,6 +194,7 @@ void setup() {
|
|||
userButton.attachClick(BUTTON_Utils::singlePress);
|
||||
userButton.attachLongPressStart(BUTTON_Utils::longPress);
|
||||
userButton.attachDoubleClick(BUTTON_Utils::doublePress);
|
||||
userButton.attachMultiClick(BUTTON_Utils::multiPress);
|
||||
#endif
|
||||
KEYBOARD_Utils::setup();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "keyboard_utils.h"
|
||||
#include "button_utils.h"
|
||||
#include "power_utils.h"
|
||||
#include "display.h"
|
||||
|
||||
extern int menuDisplay;
|
||||
|
|
@ -29,4 +30,8 @@ namespace BUTTON_Utils {
|
|||
}
|
||||
}
|
||||
|
||||
void multiPress() {
|
||||
POWER_Utils::shutdown();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -8,6 +8,7 @@ namespace BUTTON_Utils {
|
|||
void singlePress();
|
||||
void longPress();
|
||||
void doublePress();
|
||||
void multiPress();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue