I don’t see any checks for a screen touch that resets “timerPress” counter I only find it present in setup and for the check togo to sleep. If ’SLEEP_INTERVAL_SECS is set it will go into hard sleep at SLEEP_INTERVAL_SECS always.
There is no way to stop sleep after sleep timeout display screens starts.
Expected behavior
A screen press should restart the sleep mode timer and abort activating sleep mode
Actual behavior
With SLEEP_INTERVAL_SECS set the device will go to sleep regardless of any screen touch
Test code
in settings.h Set SLEEP_INTERVAL_SECS to 15
The device will go to sleep in 15 seconds even if the screen is touched
Fix:
Added timerPress = millis(); after screen touch check in loop().
Moved sleep code to a function outside of main loop for clarity.
added abort for any screen touch and a new option for light off mode.
Additions:
Addition to settings.h a boolean for HARD_SLEEP.
false turns the back light LED off.
true existing "Hard sleep" mode.
Weather Station Color version
Master
Hardware
ThingPulse Weather Station Color kit purchased through Amazon April 2021
Expected behavior
A screen press should restart the sleep mode timer and abort activating sleep mode
Actual behavior
With SLEEP_INTERVAL_SECS set the device will go to sleep regardless of any screen touch
Test code
in settings.h Set SLEEP_INTERVAL_SECS to 15 The device will go to sleep in 15 seconds even if the screen is touched
Fix:
Additions:
Addition to settings.h a boolean for HARD_SLEEP.
Weather Station Color version
Master
Hardware
ThingPulse Weather Station Color kit purchased through Amazon April 2021