Merge branches 'stephan242-inactivity-countdown-when-le-never' and 'stephan242-off-by-one'
This commit is contained in:
@@ -257,11 +257,15 @@ static inline void _movement_reset_inactivity_countdown(void) {
|
||||
|
||||
movement_volatile_state.enter_sleep_mode = false;
|
||||
|
||||
if (movement_state.settings.bit.le_interval == 0) {
|
||||
watch_rtc_disable_comp_callback_no_schedule(SLEEP_TIMEOUT);
|
||||
} else {
|
||||
watch_rtc_register_comp_callback_no_schedule(
|
||||
cb_sleep_timeout_interrupt,
|
||||
counter + movement_le_inactivity_deadlines[movement_state.settings.bit.le_interval] * freq,
|
||||
SLEEP_TIMEOUT
|
||||
);
|
||||
}
|
||||
|
||||
movement_volatile_state.schedule_next_comp = true;
|
||||
}
|
||||
|
||||
@@ -293,7 +293,10 @@ void settings_face_setup(uint8_t watch_face_index, void ** context_ptr) {
|
||||
settings_state_t *state = (settings_state_t *)*context_ptr;
|
||||
int8_t current_setting = 0;
|
||||
|
||||
state->num_settings = 7; // baseline, without LED settings
|
||||
state->num_settings = 6; // baseline, without LED settings
|
||||
#ifndef MOVEMENT_LOW_ENERGY_MODE_FORBIDDEN
|
||||
state->num_settings++;
|
||||
#endif
|
||||
#ifdef BUILD_GIT_HASH
|
||||
state->num_settings++;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user