mirror of
https://github.com/firewalkwithm3/Sensor-Watch.git
synced 2024-11-22 19:20:30 +08:00
faces/clock: move structure definition
Instances of the clock state structure are only passed to the clock face itself and only via the opaque context pointer. No other code uses it. Thus there is no need to expose it in a header file. So make it an implementation detail of the watch face by localizing it inside the translation unit.
This commit is contained in:
parent
8f040252fd
commit
01312c2deb
|
@ -28,6 +28,15 @@
|
|||
#include "watch_utility.h"
|
||||
#include "watch_private_display.h"
|
||||
|
||||
typedef struct {
|
||||
uint32_t previous_date_time;
|
||||
uint8_t last_battery_check;
|
||||
uint8_t watch_face_index;
|
||||
bool signal_enabled;
|
||||
bool battery_low;
|
||||
bool alarm_enabled;
|
||||
} clock_state_t;
|
||||
|
||||
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);
|
||||
|
|
|
@ -37,15 +37,6 @@
|
|||
|
||||
#include "movement.h"
|
||||
|
||||
typedef struct {
|
||||
uint32_t previous_date_time;
|
||||
uint8_t last_battery_check;
|
||||
uint8_t watch_face_index;
|
||||
bool signal_enabled;
|
||||
bool battery_low;
|
||||
bool alarm_enabled;
|
||||
} clock_state_t;
|
||||
|
||||
void clock_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
|
||||
void clock_face_activate(movement_settings_t *settings, void *context);
|
||||
bool clock_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
|
||||
|
|
Loading…
Reference in a new issue