// if we have timed out of our timeout countdown, give the app a hint that they can resign.
if (movement_state.timeout_ticks == 0 && movement_state.current_face_idx != 0) {
movement_state.timeout_ticks = -1;
- if (movement_state.settings.bit.to_always == false) {
- // if "timeout always" is false, give the current watch face a chance to exit gracefully...
- event.event_type = EVENT_TIMEOUT;
- }
+ event.event_type = EVENT_TIMEOUT;
event.subsecond = movement_state.subsecond;
// if we run through the loop again to time out, we need to reconsider whether or not we can sleep.
// if the first trip said true, but this trip said false, we need the false to override, thus
bool can_sleep2 = wf->loop(event, &movement_state.settings, watch_face_contexts[movement_state.current_face_idx]);
can_sleep = can_sleep && can_sleep2;
event.event_type = EVENT_NONE;
- if (movement_state.settings.bit.to_always && movement_state.current_face_idx != 0) {
- // ...but if the user has "timeout always" set, give it the boot.
- movement_move_to_face(0);
- }
}
// Now that we've handled all display update tasks, handle the alarm.
struct {
bool button_should_sound : 1; // if true, pressing a button emits a sound.
uint8_t to_interval : 2; // an inactivity interval for asking the active face to resign.
- bool to_always : 1; // if true, always time out from the active face to face 0. otherwise only faces that time out will resign (the default).
uint8_t le_interval : 3; // 0 to disable low energy mode, or an inactivity interval for going into low energy mode.
uint8_t led_duration : 3; // how many seconds to shine the LED for (x2), 0 to shine only while the button is depressed, or all bits set to disable the LED altogether.
uint8_t led_red_color : 4; // for general purpose illumination, the red LED value (0-15)
/// TODO: for #SecondMovement: move alarm_enabled out of preferences
bool alarm_enabled : 1; // indicates whether there is at least one alarm enabled.
- uint8_t reserved : 1; // room for more preferences if needed.
+ uint8_t reserved : 2; // room for more preferences if needed.
} bit;
uint32_t reg;
} movement_settings_t;