Fallback in case of sleepTimeout is set to 0
This commit is contained in:
parent
9966a8fba1
commit
cbeacbb7ee
1 changed files with 4 additions and 0 deletions
|
@ -238,6 +238,10 @@ uint32_t get_sleepTimeout_HAL() {
|
|||
}
|
||||
void set_sleepTimeout_HAL(uint32_t aSleepTimeout) {
|
||||
sleepTimeout = aSleepTimeout;
|
||||
// For reason unknown, some users reported sleepTimeout was set to 0. In this case device would immediately go to sleep. Prevent this.
|
||||
if (sleepTimeout == 0) {
|
||||
sleepTimeout = DEFAULT_SLEEP_TIMEOUT;
|
||||
}
|
||||
}
|
||||
bool get_wakeupByIMUEnabled_HAL() {
|
||||
return wakeupByIMUEnabled;
|
||||
|
|
Loading…
Reference in a new issue