knowit / snappysense

3 stars 1 forks source link

Incoherent logic when button press wakes the device from sleep #51

Closed lars-t-hansen closed 1 year ago

lars-t-hansen commented 1 year ago

I have better comments in the code but essentially, when the device is sleeping and is woken by the button then two things should happen:

This is a slightly new idea for the main loop in that there is a fixed time for the sleep window to end, not just the size of the sleep window. It shouldn't be awful to implement though.

What happens now is that the device wakes up and powers up and starts the slide show, and then that goes until the sleep window ends. That can be a long way away (up to an hour normally). This is not what we want. We just want a peek.

An alternative is that when we wake up we end the sleep window and go directly to monitoring mode, perform monitoring and communication while the slideshow is running, and then enter a new sleep window. This would be fine probably.