mirror of
https://github.com/firewalkwithm3/Sensor-Watch.git
synced 2024-11-22 11:10:29 +08:00
faces/alarm: use snprintf formats for 24h and 024h
This ensures that the display is always in a consistent state. Reported-by: CarpeNoctem <cryptomax@pm.me> GitHub-Issue: https://github.com/joeycastillo/Sensor-Watch/issues/476
This commit is contained in:
parent
5926e81d25
commit
831aadddea
|
@ -92,7 +92,7 @@ static void _alarm_face_draw(movement_settings_t *settings, alarm_state_t *state
|
|||
}
|
||||
}
|
||||
|
||||
sprintf(buf, "%c%c%2d%2d%02d ",
|
||||
sprintf(buf, set_leading_zero? "%c%c%2d%02d%02d " : "%c%c%2d%2d%02d ",
|
||||
_dow_strings[i][0], _dow_strings[i][1],
|
||||
(state->alarm_idx + 1),
|
||||
h,
|
||||
|
@ -102,8 +102,6 @@ static void _alarm_face_draw(movement_settings_t *settings, alarm_state_t *state
|
|||
buf[_blink_idx[state->setting_state]] = buf[_blink_idx2[state->setting_state]] = ' ';
|
||||
}
|
||||
watch_display_string(buf, 0);
|
||||
if (set_leading_zero)
|
||||
watch_display_string("0", 4);
|
||||
|
||||
if (state->is_setting) {
|
||||
// draw pitch level indicator
|
||||
|
|
Loading…
Reference in a new issue