Currently, movement drops timeout events in case the previous loop indicates that sleep is not possible. This is due to unintended short circuiting behavior of && and is fixed by using a temporary variable.
The static qualifier of can_sleep is also removed, apparently with no ill effects. Its value is set every time app_loop runs and its scope is limited to that function, there's apparently no need for it to be in static storage.
Currently, movement drops timeout events in case the previous loop indicates that sleep is not possible. This is due to unintended short circuiting behavior of
&&
and is fixed by using a temporary variable.The
static
qualifier ofcan_sleep
is also removed, apparently with no ill effects. Its value is set every timeapp_loop
runs and its scope is limited to that function, there's apparently no need for it to be instatic
storage.