Recalibrated power button duration, decreased long setting slightly.
This commit is contained in:
parent
140d8749a6
commit
36bf68d1c4
@ -52,7 +52,7 @@ class CrossPointSettings {
|
|||||||
// Get singleton instance
|
// Get singleton instance
|
||||||
static CrossPointSettings& getInstance() { return instance; }
|
static CrossPointSettings& getInstance() { return instance; }
|
||||||
|
|
||||||
uint16_t getPowerButtonDuration() const { return shortPwrBtn ? 10 : 500; }
|
uint16_t getPowerButtonDuration() const { return shortPwrBtn ? 10 : 400; }
|
||||||
|
|
||||||
bool saveToFile() const;
|
bool saveToFile() const;
|
||||||
bool loadFromFile();
|
bool loadFromFile();
|
||||||
|
|||||||
@ -85,7 +85,7 @@ void verifyWakeupLongPress() {
|
|||||||
const auto start = millis();
|
const auto start = millis();
|
||||||
bool abort = false;
|
bool abort = false;
|
||||||
// It takes us some time to wake up from deep sleep, so we need to subtract that from the duration
|
// It takes us some time to wake up from deep sleep, so we need to subtract that from the duration
|
||||||
uint16_t calibration = 25;
|
uint16_t calibration = 29;
|
||||||
uint16_t calibratedPressDuration =
|
uint16_t calibratedPressDuration =
|
||||||
(calibration < SETTINGS.getPowerButtonDuration()) ? SETTINGS.getPowerButtonDuration() - calibration : 1;
|
(calibration < SETTINGS.getPowerButtonDuration()) ? SETTINGS.getPowerButtonDuration() - calibration : 1;
|
||||||
|
|
||||||
@ -180,7 +180,6 @@ void setup() {
|
|||||||
Serial.begin(115200);
|
Serial.begin(115200);
|
||||||
}
|
}
|
||||||
|
|
||||||
Serial.printf("[%lu] [ ] Starting CrossPoint version " CROSSPOINT_VERSION "\n", millis());
|
|
||||||
|
|
||||||
inputManager.begin();
|
inputManager.begin();
|
||||||
// Initialize pins
|
// Initialize pins
|
||||||
@ -204,6 +203,9 @@ void setup() {
|
|||||||
// verify power button press duration after we've read settings.
|
// verify power button press duration after we've read settings.
|
||||||
verifyWakeupLongPress();
|
verifyWakeupLongPress();
|
||||||
|
|
||||||
|
// First serial output only here to avoid timing inconsistencies for power button press duration verification
|
||||||
|
Serial.printf("[%lu] [ ] Starting CrossPoint version " CROSSPOINT_VERSION "\n", millis());
|
||||||
|
|
||||||
setupDisplayAndFonts();
|
setupDisplayAndFonts();
|
||||||
|
|
||||||
exitActivity();
|
exitActivity();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user