mirror of
https://github.com/firewalkwithm3/Sensor-Watch.git
synced 2024-11-22 19:20:30 +08:00
faces/clock: define general indication function
Sets or clears the specified indicator based on some boolean value.
This commit is contained in:
parent
01312c2deb
commit
e6d8b6aaff
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue