summaryrefslogtreecommitdiffstats
path: root/movement/watch_faces/complications
diff options
context:
space:
mode:
Diffstat (limited to 'movement/watch_faces/complications')
-rw-r--r--movement/watch_faces/complications/beats_face.c3
-rw-r--r--movement/watch_faces/complications/beats_face.h2
-rw-r--r--movement/watch_faces/complications/day_one_face.c3
-rw-r--r--movement/watch_faces/complications/day_one_face.h2
-rw-r--r--movement/watch_faces/complications/pulsometer_face.c3
-rw-r--r--movement/watch_faces/complications/pulsometer_face.h2
-rw-r--r--movement/watch_faces/complications/stopwatch_face.c3
-rw-r--r--movement/watch_faces/complications/stopwatch_face.h2
-rw-r--r--movement/watch_faces/complications/totp_face.c3
-rw-r--r--movement/watch_faces/complications/totp_face.h2
10 files changed, 15 insertions, 10 deletions
diff --git a/movement/watch_faces/complications/beats_face.c b/movement/watch_faces/complications/beats_face.c
index 519d3e4e..b4c76db1 100644
--- a/movement/watch_faces/complications/beats_face.c
+++ b/movement/watch_faces/complications/beats_face.c
@@ -5,8 +5,9 @@
const uint8_t BEAT_REFRESH_FREQUENCY = 8;
-void beats_face_setup(movement_settings_t *settings, void ** context_ptr) {
+void beats_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
(void) settings;
+ (void) watch_face_index;
(void) context_ptr;
if (*context_ptr == NULL) {
*context_ptr = malloc(sizeof(beats_face_state_t));
diff --git a/movement/watch_faces/complications/beats_face.h b/movement/watch_faces/complications/beats_face.h
index bbe2396c..f11126d1 100644
--- a/movement/watch_faces/complications/beats_face.h
+++ b/movement/watch_faces/complications/beats_face.h
@@ -9,7 +9,7 @@ typedef struct {
} beats_face_state_t;
uint32_t clock2beats(uint32_t hours, uint32_t minutes, uint32_t seconds, uint32_t subseconds, int16_t utc_offset);
-void beats_face_setup(movement_settings_t *settings, void ** context_ptr);
+void beats_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
void beats_face_activate(movement_settings_t *settings, void *context);
bool beats_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
void beats_face_resign(movement_settings_t *settings, void *context);
diff --git a/movement/watch_faces/complications/day_one_face.c b/movement/watch_faces/complications/day_one_face.c
index 3b185d04..6cc26106 100644
--- a/movement/watch_faces/complications/day_one_face.c
+++ b/movement/watch_faces/complications/day_one_face.c
@@ -17,8 +17,9 @@ static void _day_one_face_update(day_one_state_t state) {
watch_display_string(buf, 0);
}
-void day_one_face_setup(movement_settings_t *settings, void ** context_ptr) {
+void day_one_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
(void) settings;
+ (void) watch_face_index;
if (*context_ptr == NULL) {
*context_ptr = malloc(sizeof(day_one_state_t));
memset(*context_ptr, 0, sizeof(day_one_state_t));
diff --git a/movement/watch_faces/complications/day_one_face.h b/movement/watch_faces/complications/day_one_face.h
index 06c7816e..3eb91195 100644
--- a/movement/watch_faces/complications/day_one_face.h
+++ b/movement/watch_faces/complications/day_one_face.h
@@ -15,7 +15,7 @@ typedef struct {
bool birthday_changed;
} day_one_state_t;
-void day_one_face_setup(movement_settings_t *settings, void ** context_ptr);
+void day_one_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
void day_one_face_activate(movement_settings_t *settings, void *context);
bool day_one_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
void day_one_face_resign(movement_settings_t *settings, void *context);
diff --git a/movement/watch_faces/complications/pulsometer_face.c b/movement/watch_faces/complications/pulsometer_face.c
index d54d8ddf..f1da9633 100644
--- a/movement/watch_faces/complications/pulsometer_face.c
+++ b/movement/watch_faces/complications/pulsometer_face.c
@@ -6,8 +6,9 @@
#define PULSOMETER_FACE_FREQUENCY_FACTOR (4ul) // refresh rate will be 2 to this power Hz (0 for 1 Hz, 2 for 4 Hz, etc.)
#define PULSOMETER_FACE_FREQUENCY (1 << PULSOMETER_FACE_FREQUENCY_FACTOR)
-void pulsometer_face_setup(movement_settings_t *settings, void ** context_ptr) {
+void pulsometer_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
(void) settings;
+ (void) watch_face_index;
if (*context_ptr == NULL) *context_ptr = malloc(sizeof(pulsometer_state_t));
}
diff --git a/movement/watch_faces/complications/pulsometer_face.h b/movement/watch_faces/complications/pulsometer_face.h
index cdb5b977..cb0b86bd 100644
--- a/movement/watch_faces/complications/pulsometer_face.h
+++ b/movement/watch_faces/complications/pulsometer_face.h
@@ -9,7 +9,7 @@ typedef struct {
int16_t ticks;
} pulsometer_state_t;
-void pulsometer_face_setup(movement_settings_t *settings, void ** context_ptr);
+void pulsometer_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
void pulsometer_face_activate(movement_settings_t *settings, void *context);
bool pulsometer_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
void pulsometer_face_resign(movement_settings_t *settings, void *context);
diff --git a/movement/watch_faces/complications/stopwatch_face.c b/movement/watch_faces/complications/stopwatch_face.c
index d1d1ee73..4a145abf 100644
--- a/movement/watch_faces/complications/stopwatch_face.c
+++ b/movement/watch_faces/complications/stopwatch_face.c
@@ -3,8 +3,9 @@
#include "stopwatch_face.h"
#include "watch.h"
-void stopwatch_face_setup(movement_settings_t *settings, void ** context_ptr) {
+void stopwatch_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
(void) settings;
+ (void) watch_face_index;
if (*context_ptr == NULL) *context_ptr = malloc(sizeof(stopwatch_state_t));
}
diff --git a/movement/watch_faces/complications/stopwatch_face.h b/movement/watch_faces/complications/stopwatch_face.h
index 537c01ce..ff0c1796 100644
--- a/movement/watch_faces/complications/stopwatch_face.h
+++ b/movement/watch_faces/complications/stopwatch_face.h
@@ -10,7 +10,7 @@ typedef struct {
uint8_t hours;
} stopwatch_state_t;
-void stopwatch_face_setup(movement_settings_t *settings, void ** context_ptr);
+void stopwatch_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
void stopwatch_face_activate(movement_settings_t *settings, void *context);
bool stopwatch_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
void stopwatch_face_resign(movement_settings_t *settings, void *context);
diff --git a/movement/watch_faces/complications/totp_face.c b/movement/watch_faces/complications/totp_face.c
index 4a34d7ad..468e6a8c 100644
--- a/movement/watch_faces/complications/totp_face.c
+++ b/movement/watch_faces/complications/totp_face.c
@@ -17,8 +17,9 @@ static uint8_t hmacKey[] = {0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x21, 0xde, 0xad, 0xbe
static const uint32_t TIMESTEP = 30;
-void totp_face_setup(movement_settings_t *settings, void ** context_ptr) {
+void totp_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
(void) settings;
+ (void) watch_face_index;
if (*context_ptr == NULL) *context_ptr = malloc(sizeof(totp_state_t));
TOTP(hmacKey, sizeof(hmacKey), TIMESTEP);
}
diff --git a/movement/watch_faces/complications/totp_face.h b/movement/watch_faces/complications/totp_face.h
index 0527627a..1e2c5c02 100644
--- a/movement/watch_faces/complications/totp_face.h
+++ b/movement/watch_faces/complications/totp_face.h
@@ -10,7 +10,7 @@ typedef struct {
} totp_state_t;
-void totp_face_setup(movement_settings_t *settings, void ** context_ptr);
+void totp_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
void totp_face_activate(movement_settings_t *settings, void *context);
bool totp_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
void totp_face_resign(movement_settings_t *settings, void *context);