mirror of
https://github.com/firewalkwithm3/Sensor-Watch.git
synced 2024-11-22 19:20:30 +08:00
faces/simple_clock: clear segments if not in 024h
There was an issue where the simple clock's display would remain in 024h mode even after switching back to 12h/24h mode because it only took into account the leading zero bit, whose value is meaningless unless the 24h mode bit is also set. The issue is fixed by taking both bits into account. Closes #476. Reported-by: CarpeNoctem <cryptomax@pm.me> GitHub-Issue: https://github.com/joeycastillo/Sensor-Watch/issues/476
This commit is contained in:
parent
831aadddea
commit
f2479bee4f
|
@ -124,7 +124,7 @@ bool simple_clock_face_loop(movement_event_t event, movement_settings_t *setting
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (settings->bit.clock_24h_leading_zero && date_time.unit.hour < 10) {
|
if (settings->bit.clock_mode_24h && settings->bit.clock_24h_leading_zero && date_time.unit.hour < 10) {
|
||||||
set_leading_zero = true;
|
set_leading_zero = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,8 +137,10 @@ bool simple_clock_face_loop(movement_event_t event, movement_settings_t *setting
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
watch_display_string(buf, pos);
|
watch_display_string(buf, pos);
|
||||||
|
|
||||||
if (set_leading_zero)
|
if (set_leading_zero)
|
||||||
watch_display_string("0", 4);
|
watch_display_string("0", 4);
|
||||||
|
|
||||||
// handle alarm indicator
|
// handle alarm indicator
|
||||||
if (state->alarm_enabled != settings->bit.alarm_enabled) _update_alarm_indicator(settings->bit.alarm_enabled, state);
|
if (state->alarm_enabled != settings->bit.alarm_enabled) _update_alarm_indicator(settings->bit.alarm_enabled, state);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue