Option to short-press power button. (#56)
Adresses #53 Please check if we still need the code to "Give the user up to 1000ms to start holding the power button, and must hold for SETTINGS.getPowerButtonDuration()" - the power button should be pressed already when waking up... Also, decided to return before the delay to wait more to make the behavior more immediate. --------- Co-authored-by: Dave Allie <dave@daveallie.com>
This commit is contained in:
@@ -17,15 +17,18 @@ class CrossPointSettings {
|
||||
|
||||
// Sleep screen settings
|
||||
uint8_t whiteSleepScreen = 0;
|
||||
|
||||
// Text rendering settings
|
||||
uint8_t extraParagraphSpacing = 1;
|
||||
// Duration of the power button press
|
||||
uint8_t shortPwrBtn = 0;
|
||||
|
||||
~CrossPointSettings() = default;
|
||||
|
||||
// Get singleton instance
|
||||
static CrossPointSettings& getInstance() { return instance; }
|
||||
|
||||
uint16_t getPowerButtonDuration() const { return shortPwrBtn ? 10 : 500; }
|
||||
|
||||
bool saveToFile() const;
|
||||
bool loadFromFile();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user