summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheOnePerson <a.nebinger@web.de>2022-10-25 21:28:06 +0200
committerTheOnePerson <a.nebinger@web.de>2022-10-25 21:28:06 +0200
commit6a8269629d61a16255829a9db66d05effa54bec1 (patch)
tree2527f9c0dcda7a1228ef5b2442330bd60f6b6d90
parentcdd9f737e629b0eb563d0b7c12382dd59e8e0be7 (diff)
downloadSensor-Watch-6a8269629d61a16255829a9db66d05effa54bec1.tar.gz
Sensor-Watch-6a8269629d61a16255829a9db66d05effa54bec1.tar.bz2
Sensor-Watch-6a8269629d61a16255829a9db66d05effa54bec1.zip
alarm-face: correct am/pm indication and implement some minor tweaks.
-rw-r--r--movement/watch_faces/complication/alarm_face.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/movement/watch_faces/complication/alarm_face.c b/movement/watch_faces/complication/alarm_face.c
index bbba40c0..8d1eddd2 100644
--- a/movement/watch_faces/complication/alarm_face.c
+++ b/movement/watch_faces/complication/alarm_face.c
@@ -89,9 +89,10 @@ static void _alarm_face_draw(movement_settings_t *settings, alarm_state_t *state
//handle am/pm for hour display
uint8_t h = state->alarm[state->alarm_idx].hour;
if (!settings->bit.clock_mode_24h) {
- if (h > 12) {
+ if (h >= 12) {
watch_set_indicator(WATCH_INDICATOR_PM);
- h -= 12;
+ h = h % 12;
+ h += h ? 0 : 12;
} else {
watch_clear_indicator(WATCH_INDICATOR_PM);
}
@@ -207,8 +208,6 @@ void alarm_face_setup(movement_settings_t *settings, uint8_t watch_face_index, v
void alarm_face_activate(movement_settings_t *settings, void *context) {
(void) settings;
(void) context;
- watch_display_string(" ", 8);
- watch_clear_indicator(WATCH_INDICATOR_LAP); // may be unnecessary, but who knows
watch_set_colon();
}
@@ -270,7 +269,7 @@ bool alarm_face_loop(movement_event_t event, movement_settings_t *settings, void
state->alarm[state->alarm_idx].minute = (state->alarm[state->alarm_idx].minute + 1) % 60;
} else _abort_quick_ticks(state);
} else if (!state->is_setting) break; // no need to do anything when we are not in settings mode and no quick ticks are running
- // otherwise fall through and draw the current face state
+ // fall through
case EVENT_ACTIVATE:
_alarm_face_draw(settings, state, event.subsecond);
break;