diff options
author | Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com> | 2024-02-24 19:16:06 -0300 |
---|---|---|
committer | Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com> | 2024-02-25 15:24:14 -0300 |
commit | e6d8b6aaff4e67aee68c34156f3a781aaa8c2709 (patch) | |
tree | 083386a3e604ecde08e492bd7c68ed0ba9c0bef4 | |
parent | 01312c2deb1061aeb04fdceb27b2e16608de487b (diff) | |
download | Sensor-Watch-e6d8b6aaff4e67aee68c34156f3a781aaa8c2709.tar.gz Sensor-Watch-e6d8b6aaff4e67aee68c34156f3a781aaa8c2709.tar.bz2 Sensor-Watch-e6d8b6aaff4e67aee68c34156f3a781aaa8c2709.zip |
faces/clock: define general indication function
Sets or clears the specified indicator based on some boolean value.
-rw-r--r-- | movement/watch_faces/clock/clock_face.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/movement/watch_faces/clock/clock_face.c b/movement/watch_faces/clock/clock_face.c index 070968a7..24e33c9c 100644 --- a/movement/watch_faces/clock/clock_face.c +++ b/movement/watch_faces/clock/clock_face.c @@ -37,6 +37,14 @@ typedef struct { bool alarm_enabled; } clock_state_t; +static void clock_indicate(WatchIndicatorSegment indicator, bool on) { + if (on) { + watch_set_indicator(indicator); + } else { + watch_clear_indicator(indicator); + } +} + static void _update_alarm_indicator(bool settings_alarm_enabled, clock_state_t *state) { state->alarm_enabled = settings_alarm_enabled; if (state->alarm_enabled) watch_set_indicator(WATCH_INDICATOR_SIGNAL); |