]> git.earman.xyz Git - sensor-watch.git/commitdiff
refactor: watch faces no longer need a pointer to settings!
authorjoeycastillo <joeycastillo@utexas.edu>
Sun, 29 Sep 2024 13:59:49 +0000 (09:59 -0400)
committerjoeycastillo <joeycastillo@utexas.edu>
Sun, 29 Sep 2024 14:18:11 +0000 (10:18 -0400)
201 files changed:
movement.c
movement.h
movement/template/template.c
movement/template/template.h
movement/watch_faces/clock/close_enough_clock_face.c
movement/watch_faces/clock/close_enough_clock_face.h
movement/watch_faces/clock/day_night_percentage_face.c
movement/watch_faces/clock/day_night_percentage_face.h
movement/watch_faces/clock/decimal_time_face.c
movement/watch_faces/clock/decimal_time_face.h
movement/watch_faces/clock/french_revolutionary_face.c
movement/watch_faces/clock/french_revolutionary_face.h
movement/watch_faces/clock/mars_time_face.c
movement/watch_faces/clock/mars_time_face.h
movement/watch_faces/clock/minimal_clock_face.c
movement/watch_faces/clock/minimal_clock_face.h
movement/watch_faces/clock/minute_repeater_decimal_face.c
movement/watch_faces/clock/minute_repeater_decimal_face.h
movement/watch_faces/clock/repetition_minute_face.c
movement/watch_faces/clock/repetition_minute_face.h
movement/watch_faces/clock/simple_clock_bin_led_face.c
movement/watch_faces/clock/simple_clock_bin_led_face.h
movement/watch_faces/clock/weeknumber_clock_face.c
movement/watch_faces/clock/weeknumber_clock_face.h
movement/watch_faces/clock/world_clock2_face.c
movement/watch_faces/clock/world_clock2_face.h
movement/watch_faces/clock/wyoscan_face.c
movement/watch_faces/clock/wyoscan_face.h
movement/watch_faces/complication/activity_face.c
movement/watch_faces/complication/activity_face.h
movement/watch_faces/complication/alarm_face.c
movement/watch_faces/complication/alarm_face.h
movement/watch_faces/complication/astronomy_face.c
movement/watch_faces/complication/astronomy_face.h
movement/watch_faces/complication/blinky_face.c
movement/watch_faces/complication/blinky_face.h
movement/watch_faces/complication/breathing_face.c
movement/watch_faces/complication/breathing_face.h
movement/watch_faces/complication/butterfly_game_face.c
movement/watch_faces/complication/butterfly_game_face.h
movement/watch_faces/complication/couch_to_5k_face.c
movement/watch_faces/complication/couch_to_5k_face.h
movement/watch_faces/complication/counter_face.c
movement/watch_faces/complication/counter_face.h
movement/watch_faces/complication/databank_face.c
movement/watch_faces/complication/databank_face.h
movement/watch_faces/complication/day_one_face.c
movement/watch_faces/complication/day_one_face.h
movement/watch_faces/complication/deadline_face.c
movement/watch_faces/complication/deadline_face.h
movement/watch_faces/complication/discgolf_face.c
movement/watch_faces/complication/discgolf_face.h
movement/watch_faces/complication/dual_timer_face.c
movement/watch_faces/complication/dual_timer_face.h
movement/watch_faces/complication/endless_runner_face.c
movement/watch_faces/complication/endless_runner_face.h
movement/watch_faces/complication/flashlight_face.c
movement/watch_faces/complication/flashlight_face.h
movement/watch_faces/complication/geomancy_face.c
movement/watch_faces/complication/geomancy_face.h
movement/watch_faces/complication/habit_face.c
movement/watch_faces/complication/habit_face.h
movement/watch_faces/complication/higher_lower_game_face.c
movement/watch_faces/complication/higher_lower_game_face.h
movement/watch_faces/complication/interval_face.c
movement/watch_faces/complication/interval_face.h
movement/watch_faces/complication/invaders_face.c
movement/watch_faces/complication/invaders_face.h
movement/watch_faces/complication/kitchen_conversions_face.c
movement/watch_faces/complication/kitchen_conversions_face.h
movement/watch_faces/complication/menstrual_cycle_face.c
movement/watch_faces/complication/menstrual_cycle_face.h
movement/watch_faces/complication/metronome_face.c
movement/watch_faces/complication/metronome_face.h
movement/watch_faces/complication/moon_phase_face.c
movement/watch_faces/complication/moon_phase_face.h
movement/watch_faces/complication/morsecalc_face.c
movement/watch_faces/complication/morsecalc_face.h
movement/watch_faces/complication/orrery_face.c
movement/watch_faces/complication/orrery_face.h
movement/watch_faces/complication/periodic_face.c
movement/watch_faces/complication/periodic_face.h
movement/watch_faces/complication/planetary_hours_face.c
movement/watch_faces/complication/planetary_hours_face.h
movement/watch_faces/complication/planetary_time_face.c
movement/watch_faces/complication/planetary_time_face.h
movement/watch_faces/complication/probability_face.c
movement/watch_faces/complication/probability_face.h
movement/watch_faces/complication/pulsometer_face.c
movement/watch_faces/complication/pulsometer_face.h
movement/watch_faces/complication/randonaut_face.c
movement/watch_faces/complication/randonaut_face.h
movement/watch_faces/complication/ratemeter_face.c
movement/watch_faces/complication/ratemeter_face.h
movement/watch_faces/complication/rpn_calculator_alt_face.c
movement/watch_faces/complication/rpn_calculator_alt_face.h
movement/watch_faces/complication/rpn_calculator_face.c
movement/watch_faces/complication/rpn_calculator_face.h
movement/watch_faces/complication/sailing_face.c
movement/watch_faces/complication/sailing_face.h
movement/watch_faces/complication/ships_bell_face.c
movement/watch_faces/complication/ships_bell_face.h
movement/watch_faces/complication/simon_face.c
movement/watch_faces/complication/simon_face.h
movement/watch_faces/complication/simple_calculator_face.c
movement/watch_faces/complication/simple_calculator_face.h
movement/watch_faces/complication/simple_coin_flip_face.c
movement/watch_faces/complication/simple_coin_flip_face.h
movement/watch_faces/complication/smallchess_face.c
movement/watch_faces/complication/smallchess_face.h
movement/watch_faces/complication/solstice_face.c
movement/watch_faces/complication/solstice_face.h
movement/watch_faces/complication/stock_stopwatch_face.c
movement/watch_faces/complication/stock_stopwatch_face.h
movement/watch_faces/complication/stopwatch_face.c
movement/watch_faces/complication/stopwatch_face.h
movement/watch_faces/complication/sunrise_sunset_face.c
movement/watch_faces/complication/sunrise_sunset_face.h
movement/watch_faces/complication/tachymeter_face.c
movement/watch_faces/complication/tachymeter_face.h
movement/watch_faces/complication/tally_face.c
movement/watch_faces/complication/tally_face.h
movement/watch_faces/complication/tarot_face.c
movement/watch_faces/complication/tarot_face.h
movement/watch_faces/complication/tempchart_face.c
movement/watch_faces/complication/tempchart_face.h
movement/watch_faces/complication/time_left_face.c
movement/watch_faces/complication/time_left_face.h
movement/watch_faces/complication/timer_face.c
movement/watch_faces/complication/timer_face.h
movement/watch_faces/complication/tomato_face.c
movement/watch_faces/complication/tomato_face.h
movement/watch_faces/complication/toss_up_face.c
movement/watch_faces/complication/toss_up_face.h
movement/watch_faces/complication/totp_face.c
movement/watch_faces/complication/totp_face.h
movement/watch_faces/complication/totp_face_lfs.c
movement/watch_faces/complication/totp_face_lfs.h
movement/watch_faces/complication/tuning_tones_face.c
movement/watch_faces/complication/tuning_tones_face.h
movement/watch_faces/complication/wake_face.c
movement/watch_faces/complication/wake_face.h
movement/watch_faces/complication/wareki_face.c
movement/watch_faces/complication/wareki_face.h
movement/watch_faces/complication/wordle_face.c
movement/watch_faces/complication/wordle_face.h
movement/watch_faces/demo/beeps_face.c
movement/watch_faces/demo/beeps_face.h
movement/watch_faces/demo/character_set_face.c
movement/watch_faces/demo/character_set_face.h
movement/watch_faces/demo/chirpy_demo_face.c
movement/watch_faces/demo/chirpy_demo_face.h
movement/watch_faces/demo/demo_face.c
movement/watch_faces/demo/demo_face.h
movement/watch_faces/demo/frequency_correction_face.c
movement/watch_faces/demo/frequency_correction_face.h
movement/watch_faces/demo/hello_there_face.c
movement/watch_faces/demo/hello_there_face.h
movement/watch_faces/demo/lis2dw_logging_face.c
movement/watch_faces/demo/lis2dw_logging_face.h
movement/watch_faces/demo/voltage_face.c
movement/watch_faces/demo/voltage_face.h
movement/watch_faces/sensor/accel_interrupt_count_face.c
movement/watch_faces/sensor/accel_interrupt_count_face.h
movement/watch_faces/sensor/accelerometer_data_acquisition_face.c
movement/watch_faces/sensor/accelerometer_data_acquisition_face.h
movement/watch_faces/sensor/alarm_thermometer_face.c
movement/watch_faces/sensor/alarm_thermometer_face.h
movement/watch_faces/sensor/lightmeter_face.c
movement/watch_faces/sensor/lightmeter_face.h
movement/watch_faces/sensor/minmax_face.c
movement/watch_faces/sensor/minmax_face.h
movement/watch_faces/sensor/thermistor_logging_face.c
movement/watch_faces/sensor/thermistor_logging_face.h
movement/watch_faces/sensor/thermistor_readout_face.c
movement/watch_faces/sensor/thermistor_readout_face.h
movement/watch_faces/sensor/thermistor_testing_face.c
movement/watch_faces/sensor/thermistor_testing_face.h
movement/watch_faces/settings/finetune_face.c
movement/watch_faces/settings/finetune_face.h
movement/watch_faces/settings/nanosec_face.c
movement/watch_faces/settings/nanosec_face.h
movement/watch_faces/settings/place_face.h
movement/watch_faces/settings/save_load_face.c
movement/watch_faces/settings/save_load_face.h
movement/watch_faces/settings/set_time_hackwatch_face.c
movement/watch_faces/settings/set_time_hackwatch_face.h
watch-faces/clock/beats_face.c
watch-faces/clock/beats_face.h
watch-faces/clock/clock_face.c
watch-faces/clock/clock_face.h
watch-faces/clock/simple_clock_face.c
watch-faces/clock/simple_clock_face.h
watch-faces/clock/world_clock_face.c
watch-faces/clock/world_clock_face.h
watch-faces/complication/countdown_face.c
watch-faces/complication/countdown_face.h
watch-faces/settings/preferences_face.c
watch-faces/settings/preferences_face.h
watch-faces/settings/set_time_face.c
watch-faces/settings/set_time_face.h

index b5bb640b6c0522e41c43af5b099f0980fd27f55f..a702d353b27ab4b5625f6698918a84e991e90bf8 100644 (file)
@@ -103,10 +103,10 @@ static inline void _movement_disable_fast_tick_if_possible(void) {
 static void _movement_handle_background_tasks(void) {
     for(uint8_t i = 0; i < MOVEMENT_NUM_FACES; i++) {
         // For each face, if the watch face wants a background task...
-        if (watch_faces[i].wants_background_task != NULL && watch_faces[i].wants_background_task(&movement_state.settings, watch_face_contexts[i])) {
+        if (watch_faces[i].wants_background_task != NULL && watch_faces[i].wants_background_task(watch_face_contexts[i])) {
             // ...we give it one. pretty straightforward!
             movement_event_t background_event = { EVENT_BACKGROUND_TASK, 0 };
-            watch_faces[i].loop(background_event, &movement_state.settings, watch_face_contexts[i]);
+            watch_faces[i].loop(background_event, watch_face_contexts[i]);
         }
     }
     movement_state.needs_background_tasks_handled = false;
@@ -121,7 +121,7 @@ static void _movement_handle_scheduled_tasks(void) {
             if (scheduled_tasks[i].reg <= date_time.reg) {
                 scheduled_tasks[i].reg = 0;
                 movement_event_t background_event = { EVENT_BACKGROUND_TASK, 0 };
-                watch_faces[i].loop(background_event, &movement_state.settings, watch_face_contexts[i]);
+                watch_faces[i].loop(background_event, watch_face_contexts[i]);
                 // check if loop scheduled a new task
                 if (scheduled_tasks[i].reg) {
                     num_active_tasks++;
@@ -181,9 +181,7 @@ void movement_force_led_off(void) {
     _movement_disable_fast_tick_if_possible();
 }
 
-bool movement_default_loop_handler(movement_event_t event, movement_settings_t *settings) {
-    (void)settings;
-
+bool movement_default_loop_handler(movement_event_t event) {
     switch (event.event_type) {
         case EVENT_MODE_BUTTON_UP:
             movement_move_to_next_face();
@@ -530,10 +528,10 @@ void app_setup(void) {
         movement_request_tick_frequency(1);
 
         for(uint8_t i = 0; i < MOVEMENT_NUM_FACES; i++) {
-            watch_faces[i].setup(&movement_state.settings, i, &watch_face_contexts[i]);
+            watch_faces[i].setup(i, &watch_face_contexts[i]);
         }
 
-        watch_faces[movement_state.current_face_idx].activate(&movement_state.settings, watch_face_contexts[movement_state.current_face_idx]);
+        watch_faces[movement_state.current_face_idx].activate(watch_face_contexts[movement_state.current_face_idx]);
         event.subsecond = 0;
         event.event_type = EVENT_ACTIVATE;
     }
@@ -547,7 +545,7 @@ static void _sleep_mode_app_loop(void) {
         if (movement_state.needs_background_tasks_handled) _movement_handle_background_tasks();
 
         event.event_type = EVENT_LOW_ENERGY_UPDATE;
-        watch_faces[movement_state.current_face_idx].loop(event, &movement_state.settings, watch_face_contexts[movement_state.current_face_idx]);
+        watch_faces[movement_state.current_face_idx].loop(event, watch_face_contexts[movement_state.current_face_idx]);
 
         // if we need to wake immediately, do it!
         if (movement_state.needs_wake) return;
@@ -564,13 +562,13 @@ bool app_loop(void) {
             // low note for nonzero case, high note for return to watch_face 0
             watch_buzzer_play_note(movement_state.next_face_idx ? BUZZER_NOTE_C7 : BUZZER_NOTE_C8, 50);
         }
-        wf->resign(&movement_state.settings, watch_face_contexts[movement_state.current_face_idx]);
+        wf->resign(watch_face_contexts[movement_state.current_face_idx]);
         movement_state.current_face_idx = movement_state.next_face_idx;
         // we have just updated the face idx, so we must recache the watch face pointer.
         wf = &watch_faces[movement_state.current_face_idx];
         watch_clear_display();
         movement_request_tick_frequency(1);
-        wf->activate(&movement_state.settings, watch_face_contexts[movement_state.current_face_idx]);
+        wf->activate(watch_face_contexts[movement_state.current_face_idx]);
         event.subsecond = 0;
         event.event_type = EVENT_ACTIVATE;
         movement_state.watch_face_changed = false;
@@ -619,7 +617,7 @@ bool app_loop(void) {
     if (event.event_type) {
         event.subsecond = movement_state.subsecond;
         // the first trip through the loop overrides the can_sleep state
-        can_sleep = wf->loop(event, &movement_state.settings, watch_face_contexts[movement_state.current_face_idx]);
+        can_sleep = wf->loop(event, watch_face_contexts[movement_state.current_face_idx]);
 
         // Keep light on if user is still interacting with the watch.
         if (movement_state.light_ticks > 0) {
@@ -646,7 +644,7 @@ bool app_loop(void) {
         // first trip  | can sleep | cannot sleep | can sleep    | cannot sleep
         // second trip | can sleep | cannot sleep | cannot sleep | can sleep
         //          && | can sleep | cannot sleep | cannot sleep | cannot sleep
-        bool can_sleep2 = wf->loop(event, &movement_state.settings, watch_face_contexts[movement_state.current_face_idx]);
+        bool can_sleep2 = wf->loop(event, watch_face_contexts[movement_state.current_face_idx]);
         can_sleep = can_sleep && can_sleep2;
         event.event_type = EVENT_NONE;
     }
index c9128871a8b58f3ec0f851b1894ccac24c801340..6b54380fc12e18c425f5f973ae3c80291957345d 100644 (file)
@@ -154,9 +154,6 @@ extern const char movement_valid_position_1_chars[];
   *          like configuring a pin mode or a peripheral, you may want to do that here too.
   *          This function will be called again after waking from sleep mode, since sleep mode disables all
   *          of the device's pins and peripherals.
-  * @param settings A pointer to the global Movement settings. You can use this to inform how you present your
-  *                 display to the user (i.e. taking into account whether they have silenced the buttons, or if
-  *                 they prefer 12 or 24-hour mode). You can also change these settings if you like.
   * @param watch_face_index The index of this watch face in the global array of watch faces; 0 is the first face,
   *                         1 is the second, etc. You may stash this value in your context if you wish to reference
   *                         it later; your watch face's index is set at launch and will not change.
@@ -166,7 +163,7 @@ extern const char movement_valid_position_1_chars[];
   *                    data required for your watch face.
   *
   */
-typedef void (*watch_face_setup)(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
+typedef void (*watch_face_setup)(uint8_t watch_face_index, void ** context_ptr);
 
 /** @brief Prepare to go on-screen.
   * @details This function is called just before your watch enters the foreground. If your watch face has any
@@ -174,11 +171,10 @@ typedef void (*watch_face_setup)(movement_settings_t *settings, uint8_t watch_fa
   *          watch face depends on data from a peripheral (like an I2C sensor), you will likely want to enable
   *          that peripheral here. In addition, if your watch face requires an update frequncy other than 1 Hz,
   *          you may want to request that here using the movement_request_tick_frequency function.
-  * @param settings A pointer to the global Movement settings. @see watch_face_setup.
   * @param context A pointer to your watch face's context. @see watch_face_setup.
   *
   */
-typedef void (*watch_face_activate)(movement_settings_t *settings, void *context);
+typedef void (*watch_face_activate)(void *context);
 
 /** @brief Handle events and update the display.
   * @details This function is called in response to an event. You should set up a switch statement that handles,
@@ -191,7 +187,6 @@ typedef void (*watch_face_activate)(movement_settings_t *settings, void *context
   *          fail to do this, the user will become stuck on your watch face.
   * @param event A struct containing information about the event, including its type. @see movement_event_type_t
   *              for a list of all possible event types.
-  * @param settings A pointer to the global Movement settings. @see watch_face_setup.
   * @param context A pointer to your application's context. @see watch_face_setup.
   * @return true if your watch face is prepared for the system to enter STANDBY mode; false to keep the system awake.
   *         You should almost always return true.
@@ -211,16 +206,15 @@ typedef void (*watch_face_activate)(movement_settings_t *settings, void *context
           unlikely the user is wearing or looking at the watch.
           EVENT_BACKGROUND_TASK is also a special case. @see watch_face_wants_background_task for details.
   */
-typedef bool (*watch_face_loop)(movement_event_t event, movement_settings_t *settings, void *context);
+typedef bool (*watch_face_loop)(movement_event_t event, void *context);
 
 /** @brief Prepare to go off-screen.
   * @details This function is called before your watch face enters the background. If you requested a tick
   *          frequency other than the standard 1 Hz, **you must call movement_request_tick_frequency(1) here**
   *          to reset to 1 Hz. You should also disable any peripherals you enabled when you entered the foreground.
-  * @param settings A pointer to the global Movement settings. @see watch_face_setup.
   * @param context A pointer to your application's context. @see watch_face_setup.
   */
-typedef void (*watch_face_resign)(movement_settings_t *settings, void *context);
+typedef void (*watch_face_resign)(void *context);
 
 /** @brief OPTIONAL. Request an opportunity to run a background task.
   * @details Most apps will not need this function, but if you provide it, Movement will call it once per minute in
@@ -240,11 +234,10 @@ typedef void (*watch_face_resign)(movement_settings_t *settings, void *context);
   *           - If your background task involves an external pin or peripheral, request background tasks no more than once per hour.
   *           - If you need to enable a pin or a peripheral to perform your task, return it to its original state afterwards.
   *
-  * @param settings A pointer to the global Movement settings. @see watch_face_setup.
   * @param context A pointer to your application's context. @see watch_face_setup.
   * @return true to request a background task; false otherwise.
   */
-typedef bool (*watch_face_wants_background_task)(movement_settings_t *settings, void *context);
+typedef bool (*watch_face_wants_background_task)(void *context);
 
 typedef struct {
     watch_face_setup setup;
@@ -301,7 +294,7 @@ typedef struct {
 void movement_move_to_face(uint8_t watch_face_index);
 void movement_move_to_next_face(void);
 
-bool movement_default_loop_handler(movement_event_t event, movement_settings_t *settings);
+bool movement_default_loop_handler(movement_event_t event);
 
 void movement_illuminate_led(void);
 void movement_force_led_on(uint8_t red, uint8_t green, uint8_t blue);
index fe2723b8a5ed99b8b60b9ba06b675ccc8e81f766..68405ec0b72d951bcc050ac593af2f32ccd9d11d 100644 (file)
@@ -26,8 +26,7 @@
 #include <string.h>
 #include "<#watch_face_name#>_face.h"
 
-void <#watch_face_name#>_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void <#watch_face_name#>_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(<#watch_face_name#>_state_t));
@@ -37,14 +36,13 @@ void <#watch_face_name#>_face_setup(movement_settings_t *settings, uint8_t watch
     // Do any pin or peripheral setup here; this will be called whenever the watch wakes from deep sleep.
 }
 
-void <#watch_face_name#>_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void <#watch_face_name#>_face_activate(void *context) {
     <#watch_face_name#>_state_t *state = (<#watch_face_name#>_state_t *)context;
 
     // Handle any tasks related to your watch face coming on screen.
 }
 
-bool <#watch_face_name#>_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool <#watch_face_name#>_face_loop(movement_event_t event, void *context) {
     <#watch_face_name#>_state_t *state = (<#watch_face_name#>_state_t *)context;
 
     switch (event.event_type) {
@@ -79,7 +77,7 @@ bool <#watch_face_name#>_face_loop(movement_event_t event, movement_settings_t *
             // * EVENT_MODE_BUTTON_UP moves to the next watch face in the list
             // * EVENT_MODE_LONG_PRESS returns to the first watch face (or skips to the secondary watch face, if configured)
             // You can override any of these behaviors by adding a case for these events to this switch statement.
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     // return true if the watch can enter standby mode. Generally speaking, you should always return true.
@@ -91,8 +89,7 @@ bool <#watch_face_name#>_face_loop(movement_event_t event, movement_settings_t *
     return true;
 }
 
-void <#watch_face_name#>_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void <#watch_face_name#>_face_resign(void *context) {
     (void) context;
 
     // handle any cleanup before your watch face goes off-screen.
index be88e52a94f83e50fe95964fe8dba172757454c1..7f2612c71e8520b0bd3c82e26d8cc20937fd5577 100644 (file)
@@ -39,10 +39,10 @@ typedef struct {
     uint8_t unused;
 } <#watch_face_name#>_state_t;
 
-void <#watch_face_name#>_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void <#watch_face_name#>_face_activate(movement_settings_t *settings, void *context);
-bool <#watch_face_name#>_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void <#watch_face_name#>_face_resign(movement_settings_t *settings, void *context);
+void <#watch_face_name#>_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void <#watch_face_name#>_face_activate(void *context);
+bool <#watch_face_name#>_face_loop(movement_event_t event, void *context);
+void <#watch_face_name#>_face_resign(void *context);
 
 #define <#watch_face_name#>_face ((const watch_face_t){ \
     <#watch_face_name#>_face_setup, \
index 8aaf955aef933b43a5c8d574a43aa6846d6825cd..91499af36aff65a7eefe18386565d2575d9e4d50 100644 (file)
@@ -61,8 +61,7 @@ static void _update_alarm_indicator(bool settings_alarm_enabled, close_enough_cl
     };
 }
 
-void close_enough_clock_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void close_enough_clock_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
 
     if (*context_ptr == NULL) {
@@ -70,7 +69,7 @@ void close_enough_clock_face_setup(movement_settings_t *settings, uint8_t watch_
     }
 }
 
-void close_enough_clock_face_activate(movement_settings_t *settings, void *context) {
+void close_enough_clock_face_activate(void *context) {
     close_enough_clock_state_t *state = (close_enough_clock_state_t *)context;
 
     if (watch_tick_animation_is_running()) {
@@ -89,7 +88,7 @@ void close_enough_clock_face_activate(movement_settings_t *settings, void *conte
     state->prev_min_checked = -1;
 }
 
-bool close_enough_clock_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool close_enough_clock_face_loop(movement_event_t event, void *context) {
     close_enough_clock_state_t *state = (close_enough_clock_state_t *)context;
 
     char buf[11];
@@ -221,13 +220,12 @@ bool close_enough_clock_face_loop(movement_event_t event, movement_settings_t *s
             break;
 
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     return true;
 }
 
-void close_enough_clock_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void close_enough_clock_face_resign(void *context) {
     (void) context;
 }
index 736a6c66a0f9d6cf3dfeedffca349585f5973947..e693043dac0a3d85cd03389a81cb8cdd3fa5fa46 100644 (file)
@@ -46,10 +46,10 @@ typedef struct {
     bool alarm_enabled;
 } close_enough_clock_state_t;
 
-void close_enough_clock_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void close_enough_clock_face_activate(movement_settings_t *settings, void *context);
-bool close_enough_clock_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void close_enough_clock_face_resign(movement_settings_t *settings, void *context);
+void close_enough_clock_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void close_enough_clock_face_activate(void *context);
+bool close_enough_clock_face_loop(movement_event_t event, void *context);
+void close_enough_clock_face_resign(void *context);
 
 #define close_enough_clock_face ((const watch_face_t){ \
     close_enough_clock_face_setup, \
index dd822ffd171f0e57a2bd728c331be9de8b9a7eb9..4dc7fc47dff8643baebf1f67b3f55e4691d82744 100644 (file)
@@ -55,8 +55,7 @@ static void recalculate(watch_date_time utc_now, day_night_percentage_state_t *s
     state->result = sun_rise_set(utc_now.unit.year + WATCH_RTC_REFERENCE_YEAR, utc_now.unit.month, utc_now.unit.day, lon, lat, &state->rise, &state->set);
 }
 
-void day_night_percentage_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void day_night_percentage_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
 
     if (*context_ptr == NULL) {
@@ -67,12 +66,11 @@ void day_night_percentage_face_setup(movement_settings_t *settings, uint8_t watc
     }
 }
 
-void day_night_percentage_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void day_night_percentage_face_activate(void *context) {
     (void) context;
 }
 
-bool day_night_percentage_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool day_night_percentage_face_loop(movement_event_t event, void *context) {
     day_night_percentage_state_t *state = (day_night_percentage_state_t *)context;
 
     char buf[12];
@@ -126,14 +124,13 @@ bool day_night_percentage_face_loop(movement_event_t event, movement_settings_t
 
             break;
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     return true;
 }
 
-void day_night_percentage_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void day_night_percentage_face_resign(void *context) {
     (void) context;
 }
 
index d172c748588352575cdf7b29ad5c832a4493f028..01c94de7563e36273ea06e0fe755c70037dc7f4f 100644 (file)
@@ -49,10 +49,10 @@ typedef struct {
     double daylen;
 } day_night_percentage_state_t;
 
-void day_night_percentage_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void day_night_percentage_face_activate(movement_settings_t *settings, void *context);
-bool day_night_percentage_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void day_night_percentage_face_resign(movement_settings_t *settings, void *context);
+void day_night_percentage_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void day_night_percentage_face_activate(void *context);
+bool day_night_percentage_face_loop(movement_event_t event, void *context);
+void day_night_percentage_face_resign(void *context);
 
 #define day_night_percentage_face ((const watch_face_t){ \
     day_night_percentage_face_setup, \
index f0543298c0eed271cdc365ff591d445d769e8516..238be9868d388837a8a7e65b74bf6dc9d174b1ff 100644 (file)
 
 
 
-void decimal_time_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
+void decimal_time_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     // These next two lines just silence the compiler warnings associated with unused parameters.
     // We have no use for the settings or the watch_face_index, so we make that explicit here.
-    (void) settings;
     (void) watch_face_index;
     (void) context_ptr;
     // At boot, context_ptr will be NULL indicating that we don't have anyplace to store our context.
@@ -48,10 +47,9 @@ void decimal_time_face_setup(movement_settings_t *settings, uint8_t watch_face_i
 }
 
 
-void decimal_time_face_activate(movement_settings_t *settings, void *context) {
+void decimal_time_face_activate(void *context) {
 
     // same as above: silence the warning, we don't need to check the settings.
-    (void) settings;
 
     // we do however need to set some things in our context. Here we cast it to the correct type...
     decimal_time_face_state_t *state = (decimal_time_face_state_t *)context;
@@ -68,9 +66,8 @@ void decimal_time_face_activate(movement_settings_t *settings, void *context) {
 
 
 
-bool decimal_time_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool decimal_time_face_loop(movement_event_t event, void *context) {
 
-    (void) settings;
     decimal_time_face_state_t *state = (decimal_time_face_state_t *)context;
 
     char buf[16];
@@ -147,7 +144,7 @@ bool decimal_time_face_loop(movement_event_t event, movement_settings_t *setting
             break;
 
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
 
     }
@@ -155,10 +152,9 @@ bool decimal_time_face_loop(movement_event_t event, movement_settings_t *setting
     return true;
 }
 
-void decimal_time_face_resign(movement_settings_t *settings, void *context) {
+void decimal_time_face_resign(void *context) {
     // our watch face, like most watch faces, has nothing special to do when resigning.
     // there are no peripherals or sensors here to worry about turning off.
-    (void) settings;
     (void) context;
 
 }
index 3d3a9138e94fa39fe238a095b6b548b4206a3605..e08c3da6df246bec99db7a50fca641858441fef7 100644 (file)
@@ -53,10 +53,10 @@ typedef struct {
     uint8_t features_to_show : 2 ; // what features are to be displayed?
 } decimal_time_face_state_t;
 
-void decimal_time_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void decimal_time_face_activate(movement_settings_t *settings, void *context);
-bool decimal_time_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void decimal_time_face_resign(movement_settings_t *settings, void *context);
+void decimal_time_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void decimal_time_face_activate(void *context);
+bool decimal_time_face_loop(movement_event_t event, void *context);
+void decimal_time_face_resign(void *context);
 // void decimal_time_face_wants_background_task();
 
 
index 34ef6f1e6a5feb14a2804209725a2b252576d5f3..96f83f4488a12742c41b590bd101f045353e5efa 100644 (file)
@@ -26,8 +26,7 @@
 #include <string.h>
 #include "french_revolutionary_face.h"
 
-void french_revolutionary_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void french_revolutionary_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(french_revolutionary_state_t));
@@ -42,15 +41,14 @@ void french_revolutionary_face_setup(movement_settings_t *settings, uint8_t watc
     // Do any pin or peripheral setup here; this will be called whenever the watch wakes from deep sleep.
 }
 
-void french_revolutionary_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void french_revolutionary_face_activate(void *context) {
     french_revolutionary_state_t *state = (french_revolutionary_state_t *)context;
 
     // Handle any tasks related to your watch face coming on screen.
     state->colon_set_after_splash = false;
 }
 
-bool french_revolutionary_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool french_revolutionary_face_loop(movement_event_t event, void *context) {
     french_revolutionary_state_t *state = (french_revolutionary_state_t *)context;
 
     char buf[11];
@@ -122,7 +120,7 @@ bool french_revolutionary_face_loop(movement_event_t event, movement_settings_t
             // * EVENT_MODE_BUTTON_UP moves to the next watch face in the list
             // * EVENT_MODE_LONG_PRESS returns to the first watch face (or skips to the secondary watch face, if configured)
             // You can override any of these behaviors by adding a case for these events to this switch statement.
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     // return true if the watch can enter standby mode. Generally speaking, you should always return true.
@@ -134,8 +132,7 @@ bool french_revolutionary_face_loop(movement_event_t event, movement_settings_t
     return true;
 }
 
-void french_revolutionary_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void french_revolutionary_face_resign(void *context) {
     (void) context;
 
     // handle any cleanup before your watch face goes off-screen.
index 294f4226971aeeba3b9e241f463859ed6cec094e..60bacfc4fcc3022b912f3aebc4ffe6e2dc2c6c1d 100644 (file)
@@ -63,10 +63,10 @@ typedef struct {
     uint8_t hour : 5;      // 0-10
 } fr_decimal_time;
 
-void french_revolutionary_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void french_revolutionary_face_activate(movement_settings_t *settings, void *context);
-bool french_revolutionary_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void french_revolutionary_face_resign(movement_settings_t *settings, void *context);
+void french_revolutionary_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void french_revolutionary_face_activate(void *context);
+bool french_revolutionary_face_loop(movement_event_t event, void *context);
+void french_revolutionary_face_resign(void *context);
 char fix_character_one(char digit);
 fr_decimal_time get_decimal_time(watch_date_time *date_time);
 void set_display_buffer(char *buf, french_revolutionary_state_t *state, fr_decimal_time *decimal_time, watch_date_time *date_time);
index fba6e56b3c7e81473d5c5061e924c0db4153762d..f16e71f479ad97494d53d52fc47fa4897d2a826a 100644 (file)
@@ -67,7 +67,7 @@ static void _h_to_hms(mars_clock_hms_t *date_time, double h) {
        date_time->second = round(seconds % 60);
 }
 
-static void _update(movement_settings_t *settings, mars_time_state_t *state) {
+static void _update(mars_time_state_t *state) {
     char buf[11];
     watch_date_time date_time = watch_rtc_get_date_time();
     uint32_t now = watch_utility_date_time_to_unix_time(date_time, movement_get_current_timezone_offset());
@@ -106,8 +106,7 @@ static void _update(movement_settings_t *settings, mars_time_state_t *state) {
     watch_display_string(buf, 0);
 }
 
-void mars_time_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void mars_time_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(mars_time_state_t));
@@ -115,30 +114,29 @@ void mars_time_face_setup(movement_settings_t *settings, uint8_t watch_face_inde
     }
 }
 
-void mars_time_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void mars_time_face_activate(void *context) {
     mars_time_state_t *state = (mars_time_state_t *)context;
     (void) state;
 }
 
-bool mars_time_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool mars_time_face_loop(movement_event_t event, void *context) {
     mars_time_state_t *state = (mars_time_state_t *)context;
 
     switch (event.event_type) {
         case EVENT_ACTIVATE:
         case EVENT_TICK:
-            _update(settings, state);
+            _update(state);
             break;
         case EVENT_LIGHT_BUTTON_UP:
             state->displaying_sol = !state->displaying_sol;
-            _update(settings, state);
+            _update(state);
             break;
         case EVENT_LIGHT_LONG_PRESS:
             movement_illuminate_led();
             break;
         case EVENT_ALARM_BUTTON_UP:
             state->current_site = (state->current_site + 1) % MARS_TIME_NUM_SITES;
-            _update(settings, state);
+            _update(state);
             break;
         case EVENT_TIMEOUT:
             // TODO: make this lower power so we can avoid timeout
@@ -152,15 +150,14 @@ bool mars_time_face_loop(movement_event_t event, movement_settings_t *settings,
             // don't light up every time light is hit
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
     return true;
 }
 
-void mars_time_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void mars_time_face_resign(void *context) {
     (void) context;
 }
 
index 04917686e12ea3814b0abf79516fd4ac044cebc4..ddb43e643f4a884227a66bb59e2d05efbdd3ca8c 100644 (file)
@@ -67,10 +67,10 @@ typedef struct {
     bool displaying_sol;
 } mars_time_state_t;
 
-void mars_time_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void mars_time_face_activate(movement_settings_t *settings, void *context);
-bool mars_time_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void mars_time_face_resign(movement_settings_t *settings, void *context);
+void mars_time_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void mars_time_face_activate(void *context);
+bool mars_time_face_loop(movement_event_t event, void *context);
+void mars_time_face_resign(void *context);
 
 #define mars_time_face ((const watch_face_t){ \
     mars_time_face_setup, \
index 03ea6c41f69d3dc0f985ea5b123f1b4df488d69d..2cb2bb0a3fae4afafb23cf6ee4c94f7b4093e0c6 100644 (file)
@@ -26,7 +26,7 @@
 #include <string.h>
 #include "minimal_clock_face.h"
 
-static void _minimal_clock_face_update_display(movement_settings_t *settings) {
+static void _minimal_clock_face_update_display() {
     watch_date_time date_time = watch_rtc_get_date_time();
     char buffer[11];
 
@@ -40,8 +40,7 @@ static void _minimal_clock_face_update_display(movement_settings_t *settings) {
     watch_display_string(buffer, 4);
 }
 
-void minimal_clock_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void minimal_clock_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(minimal_clock_state_t));
@@ -51,24 +50,23 @@ void minimal_clock_face_setup(movement_settings_t *settings, uint8_t watch_face_
     // Do any pin or peripheral setup here; this will be called whenever the watch wakes from deep sleep.
 }
 
-void minimal_clock_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void minimal_clock_face_activate(void *context) {
     (void) context;
     // Handle any tasks related to your watch face coming on screen.
     watch_set_colon();
 }
 
-bool minimal_clock_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool minimal_clock_face_loop(movement_event_t event, void *context) {
     (void) context;
 
     switch (event.event_type) {
         case EVENT_ACTIVATE:
             // Show your initial UI here.
-            _minimal_clock_face_update_display(settings);
+            _minimal_clock_face_update_display();
             break;
         case EVENT_TICK:
             // If needed, update your display here.
-            _minimal_clock_face_update_display(settings);
+            _minimal_clock_face_update_display();
             break;
         case EVENT_LIGHT_BUTTON_UP:
             // You can use the Light button for your own purposes. Note that by default, Movement will also
@@ -88,7 +86,7 @@ bool minimal_clock_face_loop(movement_event_t event, movement_settings_t *settin
             // Avoid displaying fast-updating values like seconds, since the display won't update again for 60 seconds.
             // You should also consider starting the tick animation, to show the wearer that this is sleep mode:
             // watch_start_tick_animation(500);
-            _minimal_clock_face_update_display(settings);
+            _minimal_clock_face_update_display();
             break;
         default:
             // Movement's default loop handler will step in for any cases you don't handle above:
@@ -96,7 +94,7 @@ bool minimal_clock_face_loop(movement_event_t event, movement_settings_t *settin
             // * EVENT_MODE_BUTTON_UP moves to the next watch face in the list
             // * EVENT_MODE_LONG_PRESS returns to the first watch face (or skips to the secondary watch face, if configured)
             // You can override any of these behaviors by adding a case for these events to this switch statement.
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     // return true if the watch can enter standby mode. Generally speaking, you should always return true.
@@ -108,8 +106,7 @@ bool minimal_clock_face_loop(movement_event_t event, movement_settings_t *settin
     return true;
 }
 
-void minimal_clock_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void minimal_clock_face_resign(void *context) {
     (void) context;
 
     // handle any cleanup before your watch face goes off-screen.
index d1f6ddf21f3ac689171c2e0e855d8c0aee28c7a2..7c345e31e23f4052214b2952d689c12deff87846 100644 (file)
@@ -40,10 +40,10 @@ typedef struct {
     uint8_t unused;
 } minimal_clock_state_t;
 
-void minimal_clock_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void minimal_clock_face_activate(movement_settings_t *settings, void *context);
-bool minimal_clock_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void minimal_clock_face_resign(movement_settings_t *settings, void *context);
+void minimal_clock_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void minimal_clock_face_activate(void *context);
+bool minimal_clock_face_loop(movement_event_t event, void *context);
+void minimal_clock_face_resign(void *context);
 
 #define minimal_clock_face ((const watch_face_t){ \
     minimal_clock_face_setup, \
index 4cf09e433ae3f0f96a8c9ae86aaf10531f8e6342..79ba61754391fe1b9991c9f2f6539eefed5ef5f7 100644 (file)
@@ -66,8 +66,7 @@ static void _update_alarm_indicator(bool settings_alarm_enabled, minute_repeater
     else watch_clear_indicator(WATCH_INDICATOR_SIGNAL);
 }
 
-void minute_repeater_decimal_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void minute_repeater_decimal_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
 
     if (*context_ptr == NULL) {
@@ -78,7 +77,7 @@ void minute_repeater_decimal_face_setup(movement_settings_t *settings, uint8_t w
     }
 }
 
-void minute_repeater_decimal_face_activate(movement_settings_t *settings, void *context) {
+void minute_repeater_decimal_face_activate(void *context) {
     minute_repeater_decimal_state_t *state = (minute_repeater_decimal_state_t *)context;
 
     if (watch_tick_animation_is_running()) watch_stop_tick_animation();
@@ -98,7 +97,7 @@ void minute_repeater_decimal_face_activate(movement_settings_t *settings, void *
     state->previous_date_time = 0xFFFFFFFF;
 }
 
-bool minute_repeater_decimal_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool minute_repeater_decimal_face_loop(movement_event_t event, void *context) {
     minute_repeater_decimal_state_t *state = (minute_repeater_decimal_state_t *)context;
     char buf[11];
     uint8_t pos;
@@ -216,19 +215,17 @@ bool minute_repeater_decimal_face_loop(movement_event_t event, movement_settings
            
             break; 
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     return true;
 }
 
-void minute_repeater_decimal_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void minute_repeater_decimal_face_resign(void *context) {
     (void) context;
 }
 
-bool minute_repeater_decimal_face_wants_background_task(movement_settings_t *settings, void *context) {
-    (void) settings;
+bool minute_repeater_decimal_face_wants_background_task(void *context) {
     minute_repeater_decimal_state_t *state = (minute_repeater_decimal_state_t *)context;
     if (!state->signal_enabled) return false;
 
index 4bc9a8b6f92284e1483149bbd76808364ef796cc..b50905302647832972ce6fc0eb035f43b89dac1a 100644 (file)
@@ -67,11 +67,11 @@ typedef struct {
 void mrd_play_hour_chime(void);
 void mrd_play_tens_chime(void);
 void mrd_play_minute_chime(void);
-void minute_repeater_decimal_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void minute_repeater_decimal_face_activate(movement_settings_t *settings, void *context);
-bool minute_repeater_decimal_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void minute_repeater_decimal_face_resign(movement_settings_t *settings, void *context);
-bool minute_repeater_decimal_face_wants_background_task(movement_settings_t *settings, void *context);
+void minute_repeater_decimal_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void minute_repeater_decimal_face_activate(void *context);
+bool minute_repeater_decimal_face_loop(movement_event_t event, void *context);
+void minute_repeater_decimal_face_resign(void *context);
+bool minute_repeater_decimal_face_wants_background_task(void *context);
 
 #define minute_repeater_decimal_face ((const watch_face_t){ \
     minute_repeater_decimal_face_setup, \
index 59110e614fa5aa8a1157c2cfedc67be0ebb093ce..48bfcdbf6683c37bf9379230dd49d6991de47184 100644 (file)
@@ -51,8 +51,7 @@ static void _update_alarm_indicator(bool settings_alarm_enabled, repetition_minu
     else watch_clear_indicator(WATCH_INDICATOR_SIGNAL);
 }
 
-void repetition_minute_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void repetition_minute_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
 
     if (*context_ptr == NULL) {
@@ -63,7 +62,7 @@ void repetition_minute_face_setup(movement_settings_t *settings, uint8_t watch_f
     }
 }
 
-void repetition_minute_face_activate(movement_settings_t *settings, void *context) {
+void repetition_minute_face_activate(void *context) {
     repetition_minute_state_t *state = (repetition_minute_state_t *)context;
 
     if (watch_tick_animation_is_running()) watch_stop_tick_animation();
@@ -83,7 +82,7 @@ void repetition_minute_face_activate(movement_settings_t *settings, void *contex
     state->previous_date_time = 0xFFFFFFFF;
 }
 
-bool repetition_minute_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool repetition_minute_face_loop(movement_event_t event, void *context) {
     repetition_minute_state_t *state = (repetition_minute_state_t *)context;
     char buf[11];
     uint8_t pos;
@@ -199,19 +198,17 @@ bool repetition_minute_face_loop(movement_event_t event, movement_settings_t *se
            
             break; 
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     return true;
 }
 
-void repetition_minute_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void repetition_minute_face_resign(void *context) {
     (void) context;
 }
 
-bool repetition_minute_face_wants_background_task(movement_settings_t *settings, void *context) {
-    (void) settings;
+bool repetition_minute_face_wants_background_task(void *context) {
     repetition_minute_state_t *state = (repetition_minute_state_t *)context;
     if (!state->signal_enabled) return false;
 
index 8c3100ddcbde2f6269a33eb5b5b7f9a7a1f36f07..3c631d6eb183b86f75a066d30c05213c2e71d106 100644 (file)
@@ -66,11 +66,11 @@ typedef struct {
 void play_hour_chime(void);
 void play_quarter_chime(void);
 void play_minute_chime(void);
-void repetition_minute_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void repetition_minute_face_activate(movement_settings_t *settings, void *context);
-bool repetition_minute_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void repetition_minute_face_resign(movement_settings_t *settings, void *context);
-bool repetition_minute_face_wants_background_task(movement_settings_t *settings, void *context);
+void repetition_minute_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void repetition_minute_face_activate(void *context);
+bool repetition_minute_face_loop(movement_event_t event, void *context);
+void repetition_minute_face_resign(void *context);
+bool repetition_minute_face_wants_background_task(void *context);
 
 #define repetition_minute_face ((const watch_face_t){ \
     repetition_minute_face_setup, \
index 4b2bea89a08fb05c15ab2a118c6eaa367e43b24e..3729a50c7edab7e4c36111bd58ca2202a06fc75d 100644 (file)
@@ -45,8 +45,7 @@ static void _display_left_aligned(uint8_t value) {
     }
 }
 
-void simple_clock_bin_led_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void simple_clock_bin_led_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(simple_clock_bin_led_state_t));
         memset(*context_ptr, 0, sizeof(simple_clock_bin_led_state_t));
@@ -55,7 +54,7 @@ void simple_clock_bin_led_face_setup(movement_settings_t *settings, uint8_t watc
     }
 }
 
-void simple_clock_bin_led_face_activate(movement_settings_t *settings, void *context) {
+void simple_clock_bin_led_face_activate(void *context) {
     simple_clock_bin_led_state_t *state = (simple_clock_bin_led_state_t *)context;
 
     if (watch_tick_animation_is_running()) watch_stop_tick_animation();
@@ -75,7 +74,7 @@ void simple_clock_bin_led_face_activate(movement_settings_t *settings, void *con
     state->previous_date_time = 0xFFFFFFFF;
 }
 
-bool simple_clock_bin_led_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool simple_clock_bin_led_face_loop(movement_event_t event, void *context) {
     simple_clock_bin_led_state_t *state = (simple_clock_bin_led_state_t *)context;
     char buf[11];
     uint8_t pos;
@@ -200,19 +199,17 @@ bool simple_clock_bin_led_face_loop(movement_event_t event, movement_settings_t
             }
             break;
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     return true;
 }
 
-void simple_clock_bin_led_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void simple_clock_bin_led_face_resign(void *context) {
     (void) context;
 }
 
-bool simple_clock_bin_led_face_wants_background_task(movement_settings_t *settings, void *context) {
-    (void) settings;
+bool simple_clock_bin_led_face_wants_background_task(void *context) {
     simple_clock_bin_led_state_t *state = (simple_clock_bin_led_state_t *)context;
     if (!state->signal_enabled) return false;
 
index 79c7c146302d53ab204153866b5420ca722a76f7..bff07589f1c285ccdedc84fea323fe326875a60f 100644 (file)
@@ -64,11 +64,11 @@ typedef struct {
     uint8_t ticks;
 } simple_clock_bin_led_state_t;
 
-void simple_clock_bin_led_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void simple_clock_bin_led_face_activate(movement_settings_t *settings, void *context);
-bool simple_clock_bin_led_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void simple_clock_bin_led_face_resign(movement_settings_t *settings, void *context);
-bool simple_clock_bin_led_face_wants_background_task(movement_settings_t *settings, void *context);
+void simple_clock_bin_led_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void simple_clock_bin_led_face_activate(void *context);
+bool simple_clock_bin_led_face_loop(movement_event_t event, void *context);
+void simple_clock_bin_led_face_resign(void *context);
+bool simple_clock_bin_led_face_wants_background_task(void *context);
 
 #define simple_clock_bin_led_face ((const watch_face_t){ \
     simple_clock_bin_led_face_setup, \
index 3eb3e5b6c8bda15c6a17ddd30c4c64cac768078b..90c909a99ab040ea80f1dc610f86848173c27a55 100644 (file)
@@ -33,8 +33,7 @@ static void _update_alarm_indicator(bool settings_alarm_enabled, weeknumber_cloc
     else watch_clear_indicator(WATCH_INDICATOR_SIGNAL);
 }
 
-void weeknumber_clock_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void weeknumber_clock_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
 
     if (*context_ptr == NULL) {
@@ -45,7 +44,7 @@ void weeknumber_clock_face_setup(movement_settings_t *settings, uint8_t watch_fa
     }
 }
 
-void weeknumber_clock_face_activate(movement_settings_t *settings, void *context) {
+void weeknumber_clock_face_activate(void *context) {
     weeknumber_clock_state_t *state = (weeknumber_clock_state_t *)context;
 
     if (watch_tick_animation_is_running()) watch_stop_tick_animation();
@@ -65,7 +64,7 @@ void weeknumber_clock_face_activate(movement_settings_t *settings, void *context
     state->previous_date_time = 0xFFFFFFFF;
 }
 
-bool weeknumber_clock_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool weeknumber_clock_face_loop(movement_event_t event, void *context) {
     weeknumber_clock_state_t *state = (weeknumber_clock_state_t *)context;
     char buf[11];
     uint8_t pos;
@@ -133,20 +132,18 @@ bool weeknumber_clock_face_loop(movement_event_t event, movement_settings_t *set
             movement_play_signal();
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
     return true;
 }
 
-void weeknumber_clock_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void weeknumber_clock_face_resign(void *context) {
     (void) context;
 }
 
-bool weeknumber_clock_face_wants_background_task(movement_settings_t *settings, void *context) {
-    (void) settings;
+bool weeknumber_clock_face_wants_background_task(void *context) {
     weeknumber_clock_state_t *state = (weeknumber_clock_state_t *)context;
     if (!state->signal_enabled) return false;
 
index ec619427febc37c3dc47ace22af36935541d4c1b..d74da487f4ce27481e35e41dab050f56e4d7d7f3 100644 (file)
@@ -44,11 +44,11 @@ typedef struct {
     bool alarm_enabled;
 } weeknumber_clock_state_t;
 
-void weeknumber_clock_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void weeknumber_clock_face_activate(movement_settings_t *settings, void *context);
-bool weeknumber_clock_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void weeknumber_clock_face_resign(movement_settings_t *settings, void *context);
-bool weeknumber_clock_face_wants_background_task(movement_settings_t *settings, void *context);
+void weeknumber_clock_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void weeknumber_clock_face_activate(void *context);
+bool weeknumber_clock_face_loop(movement_event_t event, void *context);
+void weeknumber_clock_face_resign(void *context);
+bool weeknumber_clock_face_wants_background_task(void *context);
 
 #define weeknumber_clock_face ((const watch_face_t){ \
     weeknumber_clock_face_setup, \
index ead219af0070ff450e3fec504eb387f5520322f9..22ae20248f4414c28ef5efcfe02dd32ce2dadda0 100644 (file)
@@ -121,9 +121,8 @@ static void beep_disable() {
     watch_buzzer_play_note(BUZZER_NOTE_G7, 75);
 }
 
-void world_clock2_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void **context_ptr)
+void world_clock2_face_setup(uint8_t watch_face_index, void **context_ptr)
 {
-    (void) settings;
     (void) watch_face_index;
 
     if (*context_ptr == NULL) {
@@ -136,9 +135,8 @@ void world_clock2_face_setup(movement_settings_t *settings, uint8_t watch_face_i
     }
 }
 
-void world_clock2_face_activate(movement_settings_t *settings, void *context)
+void world_clock2_face_activate(void *context)
 {
-    (void) settings;
     world_clock2_state_t *state = (world_clock2_state_t *) context;
 
     if (watch_tick_animation_is_running())
@@ -157,7 +155,7 @@ void world_clock2_face_activate(movement_settings_t *settings, void *context)
     refresh_face = true;
 }
 
-static bool mode_display(movement_event_t event, movement_settings_t *settings, world_clock2_state_t *state)
+static bool mode_display(movement_event_t event, world_clock2_state_t *state)
 {
     char buf[11];
     uint8_t pos;
@@ -260,13 +258,13 @@ static bool mode_display(movement_event_t event, movement_settings_t *settings,
             movement_move_to_next_face();
             break;
        default:
-           return movement_default_loop_handler(event, settings);
+           return movement_default_loop_handler(event);
     }
 
     return true;
 }
 
-static bool mode_settings(movement_event_t event, movement_settings_t *settings, world_clock2_state_t *state)
+static bool mode_settings(movement_event_t event, world_clock2_state_t *state)
 {
     char buf[11];
     int8_t hours, minutes;
@@ -352,26 +350,25 @@ static bool mode_settings(movement_event_t event, movement_settings_t *settings,
             movement_move_to_next_face();
             break;
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     return true;
 }
 
-bool world_clock2_face_loop(movement_event_t event, movement_settings_t *settings, void *context)
+bool world_clock2_face_loop(movement_event_t event, void *context)
 {
     world_clock2_state_t *state = (world_clock2_state_t *) context;
     switch (state->current_mode) {
        case WORLD_CLOCK2_MODE_DISPLAY:
-           return mode_display(event, settings, state);
+           return mode_display(event, state);
        case WORLD_CLOCK2_MODE_SETTINGS:
-           return mode_settings(event, settings, state);
+           return mode_settings(event, state);
     }
     return false;
 }
 
-void world_clock2_face_resign(movement_settings_t *settings, void *context)
+void world_clock2_face_resign(void *context)
 {
-    (void) settings;
     (void) context;
 }
index 0baac2123b17c453f4c1150d24d37a82cb8abbc8..bd1ac6915f38a5d1ec97a490a32d861a33213dc8 100644 (file)
@@ -106,10 +106,10 @@ typedef struct {
     uint32_t previous_date_time;
 } world_clock2_state_t;
 
-void world_clock2_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void **context_ptr);
-void world_clock2_face_activate(movement_settings_t *settings, void *context);
-bool world_clock2_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void world_clock2_face_resign(movement_settings_t *settings, void *context);
+void world_clock2_face_setup(uint8_t watch_face_index, void **context_ptr);
+void world_clock2_face_activate(void *context);
+bool world_clock2_face_loop(movement_event_t event, void *context);
+void world_clock2_face_resign(void *context);
 
 #define world_clock2_face ((const watch_face_t){ \
     world_clock2_face_setup, \
index 66a5d466a9df48d550330fcdc2087a7bc0fb422a..1598193f365436eb3b00206a2a9cd2274c2cf91e 100644 (file)
@@ -90,8 +90,7 @@ static const int32_t clock_mapping[6][7][2] = {
     {{2,4}, {2,5}, {1,6}, {0,6}, {0,5}, {1,4}, {1,5}},
 };
 
-void wyoscan_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void wyoscan_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(wyoscan_state_t));
@@ -101,14 +100,13 @@ void wyoscan_face_setup(movement_settings_t *settings, uint8_t watch_face_index,
     // Do any pin or peripheral setup here; this will be called whenever the watch wakes from deep sleep.
 }
 
-void wyoscan_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void wyoscan_face_activate(void *context) {
     wyoscan_state_t *state = (wyoscan_state_t *)context;
     movement_request_tick_frequency(32);
     state->total_frames = 64;
 }
 
-bool wyoscan_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool wyoscan_face_loop(movement_event_t event, void *context) {
     wyoscan_state_t *state = (wyoscan_state_t *)context;
 
     watch_date_time date_time;
@@ -195,14 +193,13 @@ bool wyoscan_face_loop(movement_event_t event, movement_settings_t *settings, vo
         case EVENT_BACKGROUND_TASK:
             break;
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     return true;
 }
 
-void wyoscan_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void wyoscan_face_resign(void *context) {
     (void) context;
 
     // handle any cleanup before your watch face goes off-screen.
index d20e7636ba96260a33968045863b092bfbfeb58b..2816e4d36d285a1f025e99d6b3a08c00ed8b6fae 100644 (file)
@@ -73,11 +73,11 @@ typedef struct {
     uint32_t illuminated_segments[MAX_ILLUMINATED_SEGMENTS][2]; 
 } wyoscan_state_t;
 
-void wyoscan_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void wyoscan_face_activate(movement_settings_t *settings, void *context);
-bool wyoscan_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void wyoscan_face_resign(movement_settings_t *settings, void *context);
-bool wyoscan_face_wants_background_task(movement_settings_t *settings, void *context);
+void wyoscan_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void wyoscan_face_activate(void *context);
+bool wyoscan_face_loop(movement_event_t event, void *context);
+void wyoscan_face_resign(void *context);
+bool wyoscan_face_wants_background_task(void *context);
 
 #define wyoscan_face ((const watch_face_t){ \
     wyoscan_face_setup, \
index c7399c2d32cdd07792731c2865739a723a6de79d..59699c85e0bc3947528e9662efdfd20aa2ecd798 100644 (file)
@@ -169,11 +169,10 @@ static void _activity_clear_buffers() {
 }
 
 static void _activity_display_choice(activity_state_t *state);
-static void _activity_update_logging_screen(movement_settings_t *settings, activity_state_t *state);
+static void _activity_update_logging_screen(activity_state_t *state);
 static uint8_t _activity_get_next_byte(uint8_t *next_byte);
 
-void activity_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void **context_ptr) {
-    (void)settings;
+void activity_face_setup(uint8_t watch_face_index, void **context_ptr) {
     (void)watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(activity_state_t));
@@ -184,8 +183,7 @@ void activity_face_setup(movement_settings_t *settings, uint8_t watch_face_index
     // Do any pin or peripheral setup here; this will be called whenever the watch wakes from deep sleep.
 }
 
-void activity_face_activate(movement_settings_t *settings, void *context) {
-    (void)settings;
+void activity_face_activate(void *context) {
     (void)context;
 
     // Not using this function. Calling _activity_activate from the event handler.
@@ -194,7 +192,7 @@ void activity_face_activate(movement_settings_t *settings, void *context) {
 }
 
 // Called from the ACTIVATE event handler in the loop
-static void _activity_activate(movement_settings_t *settings, activity_state_t *state) {
+static void _activity_activate(activity_state_t *state) {
     // If waking from low-energy state and currently logging: update seconds values
     // Those are not up-to-date because ticks have not been coming
     if (state->le_state != 0 && state->mode == ACTM_LOGGING) {
@@ -204,7 +202,7 @@ static void _activity_activate(movement_settings_t *settings, activity_state_t *
         uint32_t start_timestamp = watch_utility_date_time_to_unix_time(state->start_time, 0);
         uint32_t total_seconds = now_timestamp - start_timestamp;
         state->curr_total_sec = total_seconds;
-        _activity_update_logging_screen(settings, state);
+        _activity_update_logging_screen(state);
     }
     // Regular activation: start from defaults
     else {
@@ -239,7 +237,7 @@ const uint8_t activity_anim_pixels[][2] = {
     // {2, 4}, // MID
 };
 
-static void _activity_update_logging_screen(movement_settings_t *settings, activity_state_t *state) {
+static void _activity_update_logging_screen(activity_state_t *state) {
     watch_duration_t duration;
 
     watch_display_string("AC  ", 0);
@@ -450,7 +448,7 @@ static void _activity_finish_logging(activity_state_t *state) {
     watch_display_string("AC   dONE ", 0);
 }
 
-static void _activity_handle_tick(movement_settings_t *settings, activity_state_t *state) {
+static void _activity_handle_tick(activity_state_t *state) {
     // Display stopwatch-like duration while logging, alternating with time
     if (state->mode == ACTM_LOGGING || state->mode == ACTM_PAUSED) {
         ++state->counter;
@@ -463,7 +461,7 @@ static void _activity_handle_tick(movement_settings_t *settings, activity_state_
         }
         // Still logging: refresh display
         else {
-            _activity_update_logging_screen(settings, state);
+            _activity_update_logging_screen(state);
         }
     }
     // Display countown animation, and exit face when down
@@ -536,7 +534,7 @@ static void _activity_handle_tick(movement_settings_t *settings, activity_state_
     }
 }
 
-static void _activity_alarm_long(movement_settings_t *settings, activity_state_t *state) {
+static void _activity_alarm_long(activity_state_t *state) {
     // On choose face: start logging activity
     if (state->mode == ACTM_CHOOSE) {
         // If buffer is full: Ignore this long press
@@ -549,7 +547,7 @@ static void _activity_alarm_long(movement_settings_t *settings, activity_state_t
         state->counter = -1;
         state->mode = ACTM_LOGGING;
         watch_set_indicator(WATCH_INDICATOR_LAP);
-        _activity_update_logging_screen(settings, state);
+        _activity_update_logging_screen(state);
     }
     // If logging or paused: end logging
     else if (state->mode == ACTM_LOGGING || state->mode == ACTM_PAUSED) {
@@ -589,7 +587,7 @@ static void _activity_alarm_long(movement_settings_t *settings, activity_state_t
     }
 }
 
-static void _activity_alarm_short(movement_settings_t *settings, activity_state_t *state) {
+static void _activity_alarm_short(activity_state_t *state) {
     // In the choose face, short ALARM cycles through activities
     if (state->mode == ACTM_CHOOSE) {
         state->type_ix = (state->type_ix + 1) % num_enabled_activities;
@@ -599,13 +597,13 @@ static void _activity_alarm_short(movement_settings_t *settings, activity_state_
     else if (state->mode == ACTM_LOGGING) {
         state->mode = ACTM_PAUSED;
         state->counter = 0;
-        _activity_update_logging_screen(settings, state);
+        _activity_update_logging_screen(state);
     }
     // If paused: Update paused seconds count and return to logging
     else if (state->mode == ACTM_PAUSED) {
         state->mode = ACTM_LOGGING;
         state->counter = 0;
-        _activity_update_logging_screen(settings, state);
+        _activity_update_logging_screen(state);
     }
     // If chirping: stoppit
     else if (state->mode == ACTM_CHIRPING) {
@@ -649,15 +647,15 @@ static void _activity_light_short(activity_state_t *state) {
     // Otherwise, we don't do light.
 }
 
-bool activity_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool activity_face_loop(movement_event_t event, void *context) {
     activity_state_t *state = (activity_state_t *)context;
 
     switch (event.event_type) {
         case EVENT_ACTIVATE:
-            _activity_activate(settings, state);
+            _activity_activate(state);
             break;
         case EVENT_TICK:
-            _activity_handle_tick(settings, state);
+            _activity_handle_tick(state);
             break;
         case EVENT_MODE_BUTTON_UP:
             if (state->mode != ACTM_LOGGING && state->mode != ACTM_PAUSED && state->mode != ACTM_CHIRPING) {
@@ -672,12 +670,12 @@ bool activity_face_loop(movement_event_t event, movement_settings_t *settings, v
             // We also receive ALARM press that woke us up from LE state
             // Don't want to act on that as if it were a real button press for us
             if (state->le_state != 2)
-                _activity_alarm_short(settings, state);
+                _activity_alarm_short(state);
             else
                 state->le_state = 0;
             break;
         case EVENT_ALARM_LONG_PRESS:
-            _activity_alarm_long(settings, state);
+            _activity_alarm_long(state);
             break;
         case EVENT_TIMEOUT:
             if (state->mode != ACTM_LOGGING && state->mode != ACTM_PAUSED &&
@@ -698,12 +696,12 @@ bool activity_face_loop(movement_event_t event, movement_settings_t *settings, v
                 watch_clear_indicator(WATCH_INDICATOR_PM);
             }
             else {
-                _activity_update_logging_screen(settings, state);
+                _activity_update_logging_screen(state);
                 watch_start_tick_animation(500);
             }
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
@@ -714,8 +712,7 @@ bool activity_face_loop(movement_event_t event, movement_settings_t *settings, v
         return true;
 }
 
-void activity_face_resign(movement_settings_t *settings, void *context) {
-    (void)settings;
+void activity_face_resign(void *context) {
     (void)context;
 
     // Face should only ever temporarily request a higher frequency, so by the time we're resigning,
index 552ef4d861ec5b412bf6880cc9fb434988241c9f..48f9ee88b239c8445b1232458abe8d2c77c8b2c5 100644 (file)
 
 #include "movement.h"
 
-void activity_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void activity_face_activate(movement_settings_t *settings, void *context);
-bool activity_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void activity_face_resign(movement_settings_t *settings, void *context);
+void activity_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void activity_face_activate(void *context);
+bool activity_face_loop(movement_event_t event, void *context);
+void activity_face_resign(void *context);
 
 #define activity_face ((const watch_face_t){ \
     activity_face_setup, \
index 54b01c31285da5413b3c3f3f0de6360a373836f5..b84a6523e5afbdf3b38e67bbca5467e88700d6e5 100644 (file)
@@ -63,7 +63,7 @@ static void _alarm_set_signal(alarm_state_t *state) {
         watch_clear_indicator(WATCH_INDICATOR_SIGNAL);
 }
 
-static void _alarm_face_draw(movement_settings_t *settings, alarm_state_t *state, uint8_t subsecond) {
+static void _alarm_face_draw(alarm_state_t *state, uint8_t subsecond) {
     char buf[12];
 
     uint8_t i = 0;
@@ -119,20 +119,20 @@ static void _alarm_face_draw(movement_settings_t *settings, alarm_state_t *state
     _alarm_set_signal(state);
 }
 
-static void _alarm_initiate_setting(movement_settings_t *settings, alarm_state_t *state, uint8_t subsecond) {
+static void _alarm_initiate_setting(alarm_state_t *state, uint8_t subsecond) {
     state->is_setting = true;
     state->setting_state = 0;
     movement_request_tick_frequency(4);
-    _alarm_face_draw(settings, state, subsecond);
+    _alarm_face_draw(state, subsecond);
 }
 
-static void _alarm_resume_setting(movement_settings_t *settings, alarm_state_t *state, uint8_t subsecond) {
+static void _alarm_resume_setting(alarm_state_t *state, uint8_t subsecond) {
     state->is_setting = false;
     movement_request_tick_frequency(1);
-    _alarm_face_draw(settings, state, subsecond);
+    _alarm_face_draw(state, subsecond);
 }
 
-static void _alarm_update_alarm_enabled(movement_settings_t *settings, alarm_state_t *state) {
+static void _alarm_update_alarm_enabled(alarm_state_t *state) {
     // save indication for active alarms to movement settings
     bool active_alarms = false;
     watch_date_time now;
@@ -199,8 +199,7 @@ static void _abort_quick_ticks(alarm_state_t *state) {
     }
 }
 
-void alarm_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void **context_ptr) {
-    (void) settings;
+void alarm_face_setup(uint8_t watch_face_index, void **context_ptr) {
     (void) watch_face_index;
 
     if (*context_ptr == NULL) {
@@ -218,24 +217,22 @@ 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 alarm_face_activate(void *context) {
     (void) context;
     watch_set_colon();
 }
 
-void alarm_face_resign(movement_settings_t *settings, void *context) {
+void alarm_face_resign(void *context) {
     alarm_state_t *state = (alarm_state_t *)context;
     state->is_setting = false;
-    _alarm_update_alarm_enabled(settings, state);
+    _alarm_update_alarm_enabled(state);
     watch_set_led_off();
     state->alarm_quick_ticks = false;
     _wait_ticks = -1;
     movement_request_tick_frequency(1);
 }
 
-bool alarm_face_wants_background_task(movement_settings_t *settings, void *context) {
-    (void) settings;
+bool alarm_face_wants_background_task(void *context) {
     alarm_state_t *state = (alarm_state_t *)context;
     watch_date_time now = watch_rtc_get_date_time();
     // just a failsafe: never fire more than one alarm within a minute
@@ -258,12 +255,11 @@ bool alarm_face_wants_background_task(movement_settings_t *settings, void *conte
     }
     state->alarm_handled_minute = -1;
     // update the movement's alarm indicator five times an hour
-    if (now.unit.minute % 12 == 0) _alarm_update_alarm_enabled(settings, state);
+    if (now.unit.minute % 12 == 0) _alarm_update_alarm_enabled(state);
     return false;
 }
 
-bool alarm_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void) settings;
+bool alarm_face_loop(movement_event_t event, void *context) {
     alarm_state_t *state = (alarm_state_t *)context;
 
     switch (event.event_type) {
@@ -291,25 +287,25 @@ bool alarm_face_loop(movement_event_t event, movement_settings_t *settings, void
         }
         // fall through
     case EVENT_ACTIVATE:
-        _alarm_face_draw(settings, state, event.subsecond);
+        _alarm_face_draw(state, event.subsecond);
         break;
     case EVENT_LIGHT_BUTTON_UP:
         if (!state->is_setting) {
             movement_illuminate_led();
-            _alarm_initiate_setting(settings, state, event.subsecond);
+            _alarm_initiate_setting(state, event.subsecond);
             break;
         }
         state->setting_state += 1;
         if (state->setting_state >= ALARM_SETTING_STATES) {
             // we have done a full settings cycle, so resume to normal
-            _alarm_resume_setting(settings, state, event.subsecond);
+            _alarm_resume_setting(state, event.subsecond);
         }
         break;
     case EVENT_LIGHT_LONG_PRESS:
         if (state->is_setting) {
-            _alarm_resume_setting(settings, state, event.subsecond);
+            _alarm_resume_setting(state, event.subsecond);
         } else {
-            _alarm_initiate_setting(settings, state, event.subsecond);
+            _alarm_initiate_setting(state, event.subsecond);
         }
         break;
     case EVENT_ALARM_BUTTON_UP:
@@ -357,7 +353,7 @@ bool alarm_face_loop(movement_event_t event, movement_settings_t *settings, void
             // auto enable an alarm if user sets anything
             if (state->setting_state > alarm_setting_idx_alarm) state->alarm[state->alarm_idx].enabled = true;
         }
-        _alarm_face_draw(settings, state, event.subsecond);
+        _alarm_face_draw(state, event.subsecond);
         break;
     case EVENT_ALARM_LONG_PRESS:
         if (!state->is_setting) {
@@ -382,7 +378,7 @@ bool alarm_face_loop(movement_event_t event, movement_settings_t *settings, void
                 break;
             }
         }
-        _alarm_face_draw(settings, state, event.subsecond);
+        _alarm_face_draw(state, event.subsecond);
         break;
     case EVENT_ALARM_LONG_UP:
         if (state->is_setting) {
@@ -414,7 +410,7 @@ bool alarm_face_loop(movement_event_t event, movement_settings_t *settings, void
             state->alarm[state->alarm_playing_idx].beeps = 5;
             state->alarm[state->alarm_playing_idx].pitch = 1;
             state->alarm[state->alarm_playing_idx].enabled = false;
-            _alarm_update_alarm_enabled(settings, state);
+            _alarm_update_alarm_enabled(state);
         }
         break;
     case EVENT_TIMEOUT:
@@ -424,7 +420,7 @@ bool alarm_face_loop(movement_event_t event, movement_settings_t *settings, void
         // don't light up every time light is hit
         break;
     default:
-        movement_default_loop_handler(event, settings);
+        movement_default_loop_handler(event);
         break;
     }
 
index 1c22948e75fe46f449ed10f7d83946eb3b59616e..f46da395db888ea77dbb32a2b9a49ca32713b99e 100644 (file)
@@ -85,11 +85,11 @@ typedef struct {
 } alarm_state_t;
 
 
-void alarm_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void alarm_face_activate(movement_settings_t *settings, void *context);
-bool alarm_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void alarm_face_resign(movement_settings_t *settings, void *context);
-bool alarm_face_wants_background_task(movement_settings_t *settings, void *context);
+void alarm_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void alarm_face_activate(void *context);
+bool alarm_face_loop(movement_event_t event, void *context);
+void alarm_face_resign(void *context);
+bool alarm_face_wants_background_task(void *context);
 
 #define alarm_face ((const watch_face_t){ \
     alarm_face_setup, \
index dece524723ca4a70cbc28a65b93e0f9200941766..a02dd06d0ef86ce4aed3d81c804fec483df685ee 100644 (file)
@@ -59,7 +59,7 @@ static const char astronomy_celestial_body_names[NUM_AVAILABLE_BODIES][3] = {
     "NE"    // Neptune
 };
 
-static void _astronomy_face_recalculate(movement_settings_t *settings, astronomy_state_t *state) {
+static void _astronomy_face_recalculate(astronomy_state_t *state) {
 #if __EMSCRIPTEN__
     int16_t browser_lat = EM_ASM_INT({
         return lat;
@@ -116,7 +116,7 @@ static void _astronomy_face_recalculate(movement_settings_t *settings, astronomy
             state->distance);
 }
 
-static void _astronomy_face_update(movement_event_t event, movement_settings_t *settings, astronomy_state_t *state) {
+static void _astronomy_face_update(movement_event_t event, astronomy_state_t *state) {
     char buf[16];
     switch (state->mode) {
         case ASTRONOMY_MODE_SELECTING_BODY:
@@ -150,7 +150,7 @@ static void _astronomy_face_update(movement_event_t event, movement_settings_t *
             watch_clear_display();
              // this takes a moment and locks the UI, flash C for "Calculating"
             watch_start_character_blink('C', 100);
-            _astronomy_face_recalculate(settings, state);
+            _astronomy_face_recalculate(state);
             watch_stop_blink();
             state->mode = ASTRONOMY_MODE_DISPLAYING_ALT;
             // fall through
@@ -188,8 +188,7 @@ static void _astronomy_face_update(movement_event_t event, movement_settings_t *
     }
 }
 
-void astronomy_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void astronomy_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(astronomy_state_t));
@@ -197,8 +196,7 @@ void astronomy_face_setup(movement_settings_t *settings, uint8_t watch_face_inde
     }
 }
 
-void astronomy_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void astronomy_face_activate(void *context) {
     astronomy_state_t *state = (astronomy_state_t *)context;
     movement_location_t movement_location = (movement_location_t) watch_get_backup_data(1);
     int16_t lat_centi = (int16_t)movement_location.bit.latitude;
@@ -211,13 +209,13 @@ void astronomy_face_activate(movement_settings_t *settings, void *context) {
     movement_request_tick_frequency(4);
 }
 
-bool astronomy_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool astronomy_face_loop(movement_event_t event, void *context) {
     astronomy_state_t *state = (astronomy_state_t *)context;
 
     switch (event.event_type) {
         case EVENT_ACTIVATE:
         case EVENT_TICK:
-            _astronomy_face_update(event, settings, state);
+            _astronomy_face_update(event, state);
             break;
         case EVENT_ALARM_BUTTON_UP:
             switch (state->mode) {
@@ -237,19 +235,19 @@ bool astronomy_face_loop(movement_event_t event, movement_settings_t *settings,
                     state->mode++;
                     break;
             }
-            _astronomy_face_update(event, settings, state);
+            _astronomy_face_update(event, state);
             break;
         case EVENT_ALARM_LONG_PRESS:
             if (state->mode == ASTRONOMY_MODE_SELECTING_BODY) {
                 // celestial body selected! this triggers a calculation in the update method.
                 state->mode = ASTRONOMY_MODE_CALCULATING;
                 movement_request_tick_frequency(1);
-                _astronomy_face_update(event, settings, state);
+                _astronomy_face_update(event, state);
             } else if (state->mode != ASTRONOMY_MODE_CALCULATING) {
                 // in all modes except "doing a calculation", return to the selection screen.
                 state->mode = ASTRONOMY_MODE_SELECTING_BODY;
                 movement_request_tick_frequency(4);
-            _astronomy_face_update(event, settings, state);
+            _astronomy_face_update(event, state);
             }
             break;
         case EVENT_TIMEOUT:
@@ -259,15 +257,14 @@ bool astronomy_face_loop(movement_event_t event, movement_settings_t *settings,
             // TODO?
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
     return true;
 }
 
-void astronomy_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void astronomy_face_resign(void *context) {
     astronomy_state_t *state = (astronomy_state_t *)context;
     state->mode = ASTRONOMY_MODE_SELECTING_BODY;
 }
index 6ab22113105f6654455fa263753c87bc087df4ee..e0b33f5eb7e238ce23d1cdcb8fbfc277d703eaa7 100644 (file)
@@ -93,10 +93,10 @@ typedef struct {
     double distance;    // in AU
 } astronomy_state_t;
 
-void astronomy_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void astronomy_face_activate(movement_settings_t *settings, void *context);
-bool astronomy_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void astronomy_face_resign(movement_settings_t *settings, void *context);
+void astronomy_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void astronomy_face_activate(void *context);
+bool astronomy_face_loop(movement_event_t event, void *context);
+void astronomy_face_resign(void *context);
 
 #define astronomy_face ((const watch_face_t){ \
     astronomy_face_setup, \
index 2deafc6844422fc31f2ae2c6a5c32093c26586e8..aa4346677896932184dd1a5baa3ab9122ebeec7b 100644 (file)
@@ -27,8 +27,7 @@
 #include "blinky_face.h"
 #include "watch.h"
 
-void blinky_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void blinky_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(blinky_face_state_t));
@@ -36,8 +35,7 @@ void blinky_face_setup(movement_settings_t *settings, uint8_t watch_face_index,
     }
 }
 
-void blinky_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void blinky_face_activate(void *context) {
     blinky_face_state_t *state = (blinky_face_state_t *)context;
     state->active = false;
 }
@@ -49,8 +47,7 @@ static void _blinky_face_update_lcd(blinky_face_state_t *state) {
     watch_display_string(buf, 0);
 }
 
-bool blinky_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void) settings;
+bool blinky_face_loop(movement_event_t event, void *context) {
     blinky_face_state_t *state = (blinky_face_state_t *)context;
 
     switch (event.event_type) {
@@ -92,15 +89,14 @@ bool blinky_face_loop(movement_event_t event, movement_settings_t *settings, voi
             if (!state->active) movement_move_to_face(0);
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
     return true;
 }
 
-void blinky_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void blinky_face_resign(void *context) {
     (void) context;
     watch_set_led_off();
 }
index f453de646bcf29c4691ff2e70c194055524aefdf..cf6f26562d7f25a8ec1e80f8b451350a87d938ca 100644 (file)
@@ -59,10 +59,10 @@ typedef struct {
     uint8_t color;
 } blinky_face_state_t;
 
-void blinky_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void blinky_face_activate(movement_settings_t *settings, void *context);
-bool blinky_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void blinky_face_resign(movement_settings_t *settings, void *context);
+void blinky_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void blinky_face_activate(void *context);
+bool blinky_face_loop(movement_event_t event, void *context);
+void blinky_face_resign(void *context);
 
 #define blinky_face ((const watch_face_t){ \
     blinky_face_setup, \
index 5175306950082e284a50ed56b1cae403968a4009..c9ea67ab159fa2b0bc3b6cd7a2e9b17dd6dc9604 100644 (file)
@@ -37,10 +37,9 @@ static void beep_in_hold (void);
 static void beep_out (void);
 static void beep_out_hold (void);
 
-void breathing_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
+void breathing_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     // These next two lines just silence the compiler warnings associated with unused parameters.
     // We have no use for the settings or the watch_face_index, so we make that explicit here.
-    (void) settings;
     (void) watch_face_index;
     // At boot, context_ptr will be NULL indicating that we don't have anyplace to store our context.
     if (*context_ptr == NULL) {
@@ -49,9 +48,8 @@ void breathing_face_setup(movement_settings_t *settings, uint8_t watch_face_inde
     }
 }
 
-void breathing_face_activate(movement_settings_t *settings, void *context) {
+void breathing_face_activate(void *context) {
     // same as above: silence the warning, we don't need to check the settings.
-    (void) settings;
     // we do however need to set some things in our context. Here we cast it to the correct type...
     breathing_state_t *state = (breathing_state_t *)context;
     // ...and set the initial state of our watch face.
@@ -125,8 +123,7 @@ void beep_out_hold (void) {
         }
 }
 
-bool breathing_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void) settings;
+bool breathing_face_loop(movement_event_t event, void *context) {
     breathing_state_t *state = (breathing_state_t *)context;
 
     switch (event.event_type) {
@@ -193,16 +190,15 @@ bool breathing_face_loop(movement_event_t event, movement_settings_t *settings,
             // movement_move_to_face(0);
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
     return true;
 }
 
-void breathing_face_resign(movement_settings_t *settings, void *context) {
+void breathing_face_resign(void *context) {
     // our watch face, like most watch faces, has nothing special to do when resigning.
     // watch faces that enable a peripheral or interact with a sensor may want to turn it off here.
-    (void) settings;
     (void) context;
 }
index fd603f19dccebc4d8ae5fad75a5c59bad9b1c434..91ef2a646303c6e35a17ac6cdfbd873c54016b12 100644 (file)
 
 #include "movement.h"
 
-void breathing_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void breathing_face_activate(movement_settings_t *settings, void *context);
-bool breathing_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void breathing_face_resign(movement_settings_t *settings, void *context);
+void breathing_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void breathing_face_activate(void *context);
+bool breathing_face_loop(movement_event_t event, void *context);
+void breathing_face_resign(void *context);
 
 #define breathing_face ((const watch_face_t){ \
     breathing_face_setup, \
index fb13b97218d958ddbd06ad96cf22aa3fd5e40c6f..b8f5434bd67a854fb63cdc95c71ef65febd6c71f 100644 (file)
@@ -416,8 +416,7 @@ static bool _splash_screen(movement_event_t event, butterfly_game_state_t *state
     return true;
 }
 
-void butterfly_game_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void butterfly_game_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
 
     if (*context_ptr == NULL) {
@@ -433,14 +432,13 @@ void butterfly_game_face_setup(movement_settings_t *settings, uint8_t watch_face
 #endif
 }
 
-void butterfly_game_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void butterfly_game_face_activate(void *context) {
     (void) context;
 
     movement_request_tick_frequency(TICK_FREQ);
 }
 
-bool butterfly_game_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool butterfly_game_face_loop(movement_event_t event, void *context) {
     butterfly_game_state_t *state = (butterfly_game_state_t *)context;
 
     switch (event.event_type) {
@@ -454,12 +452,11 @@ bool butterfly_game_face_loop(movement_event_t event, movement_settings_t *setti
             movement_move_to_face(0);
             return true;
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 }
 
-void butterfly_game_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void butterfly_game_face_resign(void *context) {
     (void) context;
 
     // handle any cleanup before your watch face goes off-screen.
index d02636e290824a4c41f40f0b55cf27a5a662c881..5922247980c8e139875195ebd1d11f7892b2e9c0 100644 (file)
@@ -108,10 +108,10 @@ typedef struct {
     uint8_t score_p2 : 5;
 } butterfly_game_state_t;
 
-void butterfly_game_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void butterfly_game_face_activate(movement_settings_t *settings, void *context);
-bool butterfly_game_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void butterfly_game_face_resign(movement_settings_t *settings, void *context);
+void butterfly_game_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void butterfly_game_face_activate(void *context);
+bool butterfly_game_face_loop(movement_event_t event, void *context);
+void butterfly_game_face_resign(void *context);
 
 #define butterfly_game_face ((const watch_face_t){ \
     butterfly_game_face_setup, \
index b8bcdef9b3b8144cc00aee64933a9dd51a9f3e75..10103a764e31b34e91250eaa05c980bde1cb9d2f 100644 (file)
@@ -121,9 +121,8 @@ static void _display(couch_to_5k_state_t *state, char *buf){
 }
 
 
-void couch_to_5k_face_setup(movement_settings_t *settings, uint8_t
+void couch_to_5k_face_setup(uint8_t
                           watch_face_index, void ** context_ptr) {
-    (void) settings;
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(couch_to_5k_state_t));
@@ -163,15 +162,14 @@ void couch_to_5k_face_setup(movement_settings_t *settings, uint8_t
     // watch wakes from deep sleep.
 }
 
-void couch_to_5k_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void couch_to_5k_face_activate(void *context) {
     (void) context;
     // Handle any tasks related to your watch face coming on screen.
     watch_set_colon();
 }
 
 
-bool couch_to_5k_face_loop(movement_event_t event, movement_settings_t *settings,
+bool couch_to_5k_face_loop(movement_event_t event,
                          void *context) {
     couch_to_5k_state_t *state = (couch_to_5k_state_t *)context;
     static char buf[11];
@@ -241,7 +239,7 @@ bool couch_to_5k_face_loop(movement_event_t event, movement_settings_t *settings
             // skips to the secondary watch face, if configured)
             // You can override any of these behaviors by adding a case for
             // these events to this switch statement.
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     // return true if the watch can enter standby mode. Generally speaking, you
@@ -258,8 +256,7 @@ bool couch_to_5k_face_loop(movement_event_t event, movement_settings_t *settings
     return true;
 }
 
-void couch_to_5k_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void couch_to_5k_face_resign(void *context) {
     (void) context;
 
     // handle any cleanup before your watch face goes off-screen.
index 3c36ce6f1016ff4f6b1e6c8c15a6d6c16c91f9cc..73d7b8fef8a55531da75427430af057dc97498a2 100644 (file)
@@ -70,10 +70,10 @@ typedef struct {
     uint16_t timer;
 } couch_to_5k_state_t;
 
-void couch_to_5k_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void couch_to_5k_face_activate(movement_settings_t *settings, void *context);
-bool couch_to_5k_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void couch_to_5k_face_resign(movement_settings_t *settings, void *context);
+void couch_to_5k_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void couch_to_5k_face_activate(void *context);
+bool couch_to_5k_face_loop(movement_event_t event, void *context);
+void couch_to_5k_face_resign(void *context);
 
 #define couch_to_5k_face ((const watch_face_t){ \
     couch_to_5k_face_setup, \
index 69ca1f7383cca16c6da38446b062eaa84b008ba8..3542d786e354036be59988b8e278dcd581b5aa80 100644 (file)
@@ -27,8 +27,7 @@
 #include "counter_face.h"
 #include "watch.h"
 
-void counter_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void counter_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(counter_state_t));
@@ -38,16 +37,14 @@ void counter_face_setup(movement_settings_t *settings, uint8_t watch_face_index,
     }
 }
 
-void counter_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void counter_face_activate(void *context) {
     counter_state_t *state = (counter_state_t *)context;
     if (state->beep_on) {
         watch_set_indicator(WATCH_INDICATOR_SIGNAL);
     }
 }
 
-bool counter_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void) settings;
+bool counter_face_loop(movement_event_t event, void *context) {
 
     counter_state_t *state = (counter_state_t *)context;
 
@@ -83,7 +80,7 @@ bool counter_face_loop(movement_event_t event, movement_settings_t *settings, vo
             // ignore timeout
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
@@ -143,7 +140,6 @@ void print_counter(counter_state_t *state) {
     watch_display_string(buf, 0);
 }
 
-void counter_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void counter_face_resign(void *context) {
     (void) context;
 }
index 3ac6a9b670bc2731e88651e853b5df4b4b0f441e..2ec68127b42bb0c4b20314652bbaddeccbdbbdc2 100644 (file)
@@ -44,10 +44,10 @@ typedef struct {
 } counter_state_t;
 
 
-void counter_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void counter_face_activate(movement_settings_t *settings, void *context);
-bool counter_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void counter_face_resign(movement_settings_t *settings, void *context);
+void counter_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void counter_face_activate(void *context);
+bool counter_face_loop(movement_event_t event, void *context);
+void counter_face_resign(void *context);
 
 void print_counter(counter_state_t *state);
 void beep_counter(counter_state_t *state);
index 8be54a66a85a18f788db93ee7e5c02a8230fadc1..34cc4b48edcfd1766bb5eed9a36563d530650ec1 100644 (file)
@@ -46,18 +46,16 @@ struct {
     bool animating;
 } databank_state;
 
-void databank_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
+void databank_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     // These next two lines just silence the compiler warnings associated with unused parameters.
     // We have no use for the settings or the watch_face_index, so we make that explicit here.
-    (void) settings;
     (void) context_ptr;
     (void) watch_face_index;
     // At boot, context_ptr will be NULL indicating that we don't have anyplace to store our context.
 }
 
-void databank_face_activate(movement_settings_t *settings, void *context) {
+void databank_face_activate(void *context) {
     // same as above: silence the warning, we don't need to check the settings.
-    (void) settings;
     (void) context;
     // we do however need to set some things in our context. Here we cast it to the correct type...
     databank_state.current_word = 0;
@@ -85,8 +83,7 @@ static void display()
     }
 }
 
-bool databank_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void) settings;
+bool databank_face_loop(movement_event_t event, void *context) {
     (void) context;
     int max_words = (strlen(pi_data[databank_state.databank_page * 2 + 1]) - 1) / 6 + 1;
 
@@ -132,16 +129,15 @@ bool databank_face_loop(movement_event_t event, movement_settings_t *settings, v
             // don't light up every time light is hit
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
     return true;
 }
 
-void databank_face_resign(movement_settings_t *settings, void *context) {
+void databank_face_resign(void *context) {
     // our watch face, like most watch faces, has nothing special to do when resigning.
     // watch faces that enable a peripheral or interact with a sensor may want to turn it off here.
-    (void) settings;
     (void) context;
 }
index 3376cefaf0224ea265a455085b604e3ea11d1560..a9a4a32d38666f5193792f4ea81c771a7901f158 100644 (file)
 
 #include "movement.h"
 
-void databank_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void databank_face_activate(movement_settings_t *settings, void *context);
-bool databank_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void databank_face_resign(movement_settings_t *settings, void *context);
+void databank_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void databank_face_activate(void *context);
+bool databank_face_loop(movement_event_t event, void *context);
+void databank_face_resign(void *context);
 
 #define databank_face ((const watch_face_t){ \
     databank_face_setup, \
index aa65321e507fb3cf89d1967b3a948b5359c63bea..46b2c4fc03f28cd42b59611e2e9ee22e771f1009 100644 (file)
@@ -73,8 +73,7 @@ static void _day_one_face_increment(day_one_state_t *state) {
         state->birth_day = 1;
 }
 
-void day_one_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void day_one_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(day_one_state_t));
@@ -92,8 +91,7 @@ void day_one_face_setup(movement_settings_t *settings, uint8_t watch_face_index,
     }
 }
 
-void day_one_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void day_one_face_activate(void *context) {
     day_one_state_t *state = (day_one_state_t *)context;
 
     state->current_page = PAGE_DISPLAY;
@@ -107,8 +105,7 @@ void day_one_face_activate(movement_settings_t *settings, void *context) {
     state->birth_day = movement_birthdate.bit.day;
 }
 
-bool day_one_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void) settings;
+bool day_one_face_loop(movement_event_t event, void *context) {
     day_one_state_t *state = (day_one_state_t *)context;
 
     char buf[9];
@@ -252,15 +249,14 @@ bool day_one_face_loop(movement_event_t event, movement_settings_t *settings, vo
             }
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
     return true;
 }
 
-void day_one_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void day_one_face_resign(void *context) {
     day_one_state_t *state = (day_one_state_t *)context;
 
     // if the user changed their birth date, store it to the birth date register
index 9a59e3bbbeef47005784d1e6a71054c7856c0f52..ab6a3ce3b6a234ba89461398688d9df3475e91f4 100644 (file)
@@ -67,10 +67,10 @@ typedef struct {
     uint8_t ticks;
 } day_one_state_t;
 
-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);
+void day_one_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void day_one_face_activate(void *context);
+bool day_one_face_loop(movement_event_t event, void *context);
+void day_one_face_resign(void *context);
 
 #define day_one_face ((const watch_face_t){ \
     day_one_face_setup, \
index 6af7be3a00706a1d4d2fec77a9c9e574e238b84e..6243fc07d1243dc2251aa99c2a140358d677157b 100644 (file)
 const char settings_titles[SETTINGS_NUM][3] = { "YR", "MO", "DA", "HR", "M1" };
 
 /* Local functions */
-static void _running_init(movement_settings_t *settings, deadline_state_t *state);
-static bool _running_loop(movement_event_t event, movement_settings_t *settings, void *context);
-static void _running_display(movement_event_t event, movement_settings_t *settings, deadline_state_t *state);
-static void _setting_init(movement_settings_t *settings, deadline_state_t *state);
-static bool _setting_loop(movement_event_t event, movement_settings_t *settings, void *context);
-static void _setting_display(movement_event_t event, movement_settings_t *settings, deadline_state_t *state, watch_date_time date);
+static void _running_init(deadline_state_t *state);
+static bool _running_loop(movement_event_t event, void *context);
+static void _running_display(movement_event_t event, deadline_state_t *state);
+static void _setting_init(deadline_state_t *state);
+static bool _setting_loop(movement_event_t event, void *context);
+static void _setting_display(movement_event_t event, deadline_state_t *state, watch_date_time date);
 
 /* Utility functions */
-static void _background_alarm_play(movement_settings_t *settings, deadline_state_t *state);
-static void _background_alarm_schedule(movement_settings_t *settings, deadline_state_t *state);
-static void _background_alarm_cancel(movement_settings_t *settings, deadline_state_t *state);
-static void _increment_date(movement_settings_t *settings, deadline_state_t *state, watch_date_time date_time);
-static inline int32_t _get_tz_offset(movement_settings_t *settings);
+static void _background_alarm_play(deadline_state_t *state);
+static void _background_alarm_schedule(deadline_state_t *state);
+static void _background_alarm_cancel(deadline_state_t *state);
+static void _increment_date(deadline_state_t *state, watch_date_time date_time);
 static inline void _change_tick_freq(uint8_t freq, deadline_state_t *state);
 static inline bool _is_leap(int16_t y);
 static inline int _days_in_month(int16_t mpnth, int16_t y);
 static inline unsigned int _mod(int a, int b);
-static inline void _beep_button(movement_settings_t *settings);
-static inline void _beep_enable(movement_settings_t *settings);
-static inline void _beep_disable(movement_settings_t *settings);
-static inline void _reset_deadline(movement_settings_t *settings, deadline_state_t *state);
+static inline void _beep_button();
+static inline void _beep_enable();
+static inline void _beep_disable();
+static inline void _reset_deadline(deadline_state_t *state);
 
 /* Check for leap year */
 static inline bool _is_leap(int16_t y)
@@ -156,14 +155,8 @@ static inline int _days_in_month(int16_t month, int16_t year)
     }
 }
 
-/* Return time zone offset */
-static inline int32_t _get_tz_offset(movement_settings_t *settings)
-{
-    return movement_get_current_timezone_offset();
-}
-
 /* Beep for a button press*/
-static inline void _beep_button(movement_settings_t *settings)
+static inline void _beep_button()
 {
     // Play a beep as confirmation for a button press (if applicable)
     if (!movement_button_should_sound())
@@ -173,7 +166,7 @@ static inline void _beep_button(movement_settings_t *settings)
 }
 
 /* Beep for entering settings */
-static inline void _beep_enable(movement_settings_t *settings)
+static inline void _beep_enable()
 {
     if (!movement_button_should_sound())
         return;
@@ -184,7 +177,7 @@ static inline void _beep_enable(movement_settings_t *settings)
 }
 
 /* Beep for leaving settings */
-static inline void _beep_disable(movement_settings_t *settings)
+static inline void _beep_disable()
 {
     if (!movement_button_should_sound())
         return;
@@ -204,10 +197,10 @@ static inline void _change_tick_freq(uint8_t freq, deadline_state_t *state)
 }
 
 /* Determine index of closest deadline */
-static uint8_t _closest_deadline(movement_settings_t *settings, deadline_state_t *state)
+static uint8_t _closest_deadline(deadline_state_t *state)
 {
     watch_date_time now = watch_rtc_get_date_time();
-    uint32_t now_ts = watch_utility_date_time_to_unix_time(now, _get_tz_offset(settings));
+    uint32_t now_ts = watch_utility_date_time_to_unix_time(now, movement_get_current_timezone_offset());
     uint32_t min_ts = UINT32_MAX;
     uint8_t min_index = 0;
 
@@ -222,9 +215,8 @@ static uint8_t _closest_deadline(movement_settings_t *settings, deadline_state_t
 }
 
 /* Play background alarm */
-static void _background_alarm_play(movement_settings_t *settings, deadline_state_t *state)
+static void _background_alarm_play(deadline_state_t *state)
 {
-    (void) settings;
 
     /* Use the default alarm from movement and move to foreground */
     if (state->alarm_enabled) {
@@ -234,22 +226,21 @@ static void _background_alarm_play(movement_settings_t *settings, deadline_state
 }
 
 /* Schedule background alarm */
-static void _background_alarm_schedule(movement_settings_t *settings, deadline_state_t *state)
+static void _background_alarm_schedule(deadline_state_t *state)
 {
     /* We simply re-use the scheduling in the background task */
-    deadline_face_wants_background_task(settings, state);
+    deadline_face_wants_background_task(state);
 }
 
 /* Cancel background alarm */
-static void _background_alarm_cancel(movement_settings_t *settings, deadline_state_t *state)
+static void _background_alarm_cancel(deadline_state_t *state)
 {
-    (void) settings;
 
     movement_cancel_background_task_for_face(state->face_idx);
 }
 
 /* Reset deadline to tomorrow */
-static inline void _reset_deadline(movement_settings_t *settings, deadline_state_t *state)
+static inline void _reset_deadline(deadline_state_t *state)
 {
     /* Get current time and reset hours/minutes/seconds */
     watch_date_time date_time = watch_rtc_get_date_time();
@@ -258,14 +249,14 @@ static inline void _reset_deadline(movement_settings_t *settings, deadline_state
     date_time.unit.hour = 0;
 
     /* Add 24 hours to obtain first second of tomorrow */
-    uint32_t ts = watch_utility_date_time_to_unix_time(date_time, _get_tz_offset(settings));
+    uint32_t ts = watch_utility_date_time_to_unix_time(date_time, movement_get_current_timezone_offset());
     ts += 24 * 60 * 60;
 
     state->deadlines[state->current_index] = ts;
 }
 
 /* Increment date in settings mode. Function taken from `set_time_face.c` */
-static void _increment_date(movement_settings_t *settings, deadline_state_t *state, watch_date_time date_time)
+static void _increment_date(deadline_state_t *state, watch_date_time date_time)
 {
     const uint8_t days_in_month[12] = { 31, 28, 31, 30, 31, 30, 30, 31, 30, 31, 30, 31 };
 
@@ -296,15 +287,14 @@ static void _increment_date(movement_settings_t *settings, deadline_state_t *sta
             break;
     }
 
-    uint32_t ts = watch_utility_date_time_to_unix_time(date_time, _get_tz_offset(settings));
+    uint32_t ts = watch_utility_date_time_to_unix_time(date_time, movement_get_current_timezone_offset());
     state->deadlines[state->current_index] = ts;
 }
 
 /* Update display in running mode */
-static void _running_display(movement_event_t event, movement_settings_t *settings, deadline_state_t *state)
+static void _running_display(movement_event_t event, deadline_state_t *state)
 {
     (void) event;
-    (void) settings;
 
     /* Seconds, minutes, hours, days, months, years */
     int16_t unit[] = { 0, 0, 0, 0, 0, 0 };
@@ -318,7 +308,7 @@ static void _running_display(movement_event_t event, movement_settings_t *settin
         watch_clear_indicator(WATCH_INDICATOR_BELL);
 
     watch_date_time now = watch_rtc_get_date_time();
-    uint32_t now_ts = watch_utility_date_time_to_unix_time(now, _get_tz_offset(settings));
+    uint32_t now_ts = watch_utility_date_time_to_unix_time(now, movement_get_current_timezone_offset());
 
     /* Deadline expired */
     if (state->deadlines[state->current_index] < now_ts) {
@@ -333,7 +323,7 @@ static void _running_display(movement_event_t event, movement_settings_t *settin
     }
 
     /* Get date time structs */
-    watch_date_time deadline = watch_utility_date_time_from_unix_time(state->deadlines[state->current_index], _get_tz_offset(settings)
+    watch_date_time deadline = watch_utility_date_time_from_unix_time(state->deadlines[state->current_index], movement_get_current_timezone_offset()
         );
 
     /* Calculate naive difference of dates */
@@ -378,9 +368,8 @@ static void _running_display(movement_event_t event, movement_settings_t *settin
 }
 
 /* Init running mode */
-static void _running_init(movement_settings_t *settings, deadline_state_t *state)
+static void _running_init(deadline_state_t *state)
 {
-    (void) settings;
     (void) state;
 
     watch_clear_indicator(WATCH_INDICATOR_24H);
@@ -392,22 +381,22 @@ static void _running_init(movement_settings_t *settings, deadline_state_t *state
 }
 
 /* Loop of running mode */
-static bool _running_loop(movement_event_t event, movement_settings_t *settings, void *context)
+static bool _running_loop(movement_event_t event, void *context)
 {
     deadline_state_t *state = (deadline_state_t *) context;
 
     if (event.event_type != EVENT_BACKGROUND_TASK)
-        _running_display(event, settings, state);
+        _running_display(event, state);
 
     switch (event.event_type) {
         case EVENT_ALARM_BUTTON_UP:
-            _beep_button(settings);
+            _beep_button();
             state->current_index = (state->current_index + 1) % DEADLINE_FACE_DATES;
-            _running_display(event, settings, state);
+            _running_display(event, state);
             break;
         case EVENT_ALARM_LONG_PRESS:
-            _beep_enable(settings);
-            _setting_init(settings, state);
+            _beep_enable();
+            _setting_init(state);
             state->mode = DEADLINE_FACE_SETTING;
             break;
         case EVENT_MODE_BUTTON_UP:
@@ -416,32 +405,32 @@ static bool _running_loop(movement_event_t event, movement_settings_t *settings,
         case EVENT_LIGHT_BUTTON_DOWN:
             break;
         case EVENT_LIGHT_LONG_PRESS:
-            _beep_button(settings);
+            _beep_button();
             state->alarm_enabled = !state->alarm_enabled;
             if (state->alarm_enabled) {
                 _background_alarm_schedule(settings, context);
             } else {
                 _background_alarm_cancel(settings, context);
             }
-            _running_display(event, settings, state);
+            _running_display(event, state);
             break;
         case EVENT_TIMEOUT:
             movement_move_to_face(0);
             break;
         case EVENT_BACKGROUND_TASK:
-            _background_alarm_play(settings, state);
+            _background_alarm_play(state);
             break;
         case EVENT_LOW_ENERGY_UPDATE:
             break;
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     return true;
 }
 
 /* Update display in settings mode */
-static void _setting_display(movement_event_t event, movement_settings_t *settings, deadline_state_t *state, watch_date_time date_time)
+static void _setting_display(movement_event_t event, deadline_state_t *state, watch_date_time date_time)
 {
     char buf[11];
 
@@ -487,13 +476,13 @@ static void _setting_display(movement_event_t event, movement_settings_t *settin
 }
 
 /* Init setting mode */
-static void _setting_init(movement_settings_t *settings, deadline_state_t *state)
+static void _setting_init(deadline_state_t *state)
 {
     state->current_page = 0;
 
     /* Init fresh deadline to next day */
     if (state->deadlines[state->current_index] == 0) {
-        _reset_deadline(settings, state);
+        _reset_deadline(state);
     }
 
     /* Ensure 1Hz updates only */
@@ -501,21 +490,21 @@ static void _setting_init(movement_settings_t *settings, deadline_state_t *state
 }
 
 /* Loop of setting mode */
-static bool _setting_loop(movement_event_t event, movement_settings_t *settings, void *context)
+static bool _setting_loop(movement_event_t event, void *context)
 {
     deadline_state_t *state = (deadline_state_t *) context;
     watch_date_time date_time;
-    date_time = watch_utility_date_time_from_unix_time(state->deadlines[state->current_index], _get_tz_offset(settings));
+    date_time = watch_utility_date_time_from_unix_time(state->deadlines[state->current_index], movement_get_current_timezone_offset());
 
     if (event.event_type != EVENT_BACKGROUND_TASK)
-        _setting_display(event, settings, state, date_time);
+        _setting_display(event, state, date_time);
 
     switch (event.event_type) {
         case EVENT_TICK:
             if (state->tick_freq == 8) {
                 if (watch_get_pin_level(BTN_ALARM)) {
-                    _increment_date(settings, state, date_time);
-                    _setting_display(event, settings, state, date_time);
+                    _increment_date(state, date_time);
+                    _setting_display(event, state, date_time);
                 } else {
                     _change_tick_freq(4, state);
                 }
@@ -528,48 +517,47 @@ static bool _setting_loop(movement_event_t event, movement_settings_t *settings,
             _change_tick_freq(4, state);
             break;
         case EVENT_LIGHT_LONG_PRESS:
-            _beep_button(settings);
-            _reset_deadline(settings, state);
+            _beep_button();
+            _reset_deadline(state);
             break;
         case EVENT_LIGHT_BUTTON_DOWN:
             break;
         case EVENT_LIGHT_BUTTON_UP:
             state->current_page = (state->current_page + 1) % SETTINGS_NUM;
-            _setting_display(event, settings, state, date_time);
+            _setting_display(event, state, date_time);
             break;
         case EVENT_ALARM_BUTTON_UP:
             _change_tick_freq(4, state);
-            _increment_date(settings, state, date_time);
-            _setting_display(event, settings, state, date_time);
+            _increment_date(state, date_time);
+            _setting_display(event, state, date_time);
             break;
         case EVENT_TIMEOUT:
-            _beep_button(settings);
+            _beep_button();
             _background_alarm_schedule(settings, context);
             _change_tick_freq(1, state);
             state->mode = DEADLINE_FACE_RUNNING;
             movement_move_to_face(0);
             break;
         case EVENT_MODE_BUTTON_UP:
-            _beep_disable(settings);
+            _beep_disable();
             _background_alarm_schedule(settings, context);
-            _running_init(settings, state);
-            _running_display(event, settings, state);
+            _running_init(state);
+            _running_display(event, state);
             state->mode = DEADLINE_FACE_RUNNING;
             break;
         case EVENT_BACKGROUND_TASK:
-            _background_alarm_play(settings, state);
+            _background_alarm_play(state);
             break;
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     return true;
 }
 
 /* Setup face */
-void deadline_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void **context_ptr)
+void deadline_face_setup(uint8_t watch_face_index, void **context_ptr)
 {
-    (void) settings;
     (void) watch_face_index;
     if (*context_ptr != NULL)
         return; /* Skip setup if context available */
@@ -584,21 +572,19 @@ void deadline_face_setup(movement_settings_t *settings, uint8_t watch_face_index
 }
 
 /* Activate face */
-void deadline_face_activate(movement_settings_t *settings, void *context)
+void deadline_face_activate(void *context)
 {
-    (void) settings;
     deadline_state_t *state = (deadline_state_t *) context;
 
     /* Set display options */
-    _running_init(settings, state);
+    _running_init(state);
     state->mode = DEADLINE_FACE_RUNNING;
-    state->current_index = _closest_deadline(settings, state);
+    state->current_index = _closest_deadline(state);
 }
 
 /* Loop face */
-bool deadline_face_loop(movement_event_t event, movement_settings_t *settings, void *context)
+bool deadline_face_loop(movement_event_t event, void *context)
 {
-    (void) settings;
     deadline_state_t *state = (deadline_state_t *) context;
     switch (state->mode) {
         case DEADLINE_FACE_SETTING:
@@ -614,14 +600,13 @@ bool deadline_face_loop(movement_event_t event, movement_settings_t *settings, v
 }
 
 /* Resign face */
-void deadline_face_resign(movement_settings_t *settings, void *context)
+void deadline_face_resign(void *context)
 {
-    (void) settings;
     (void) context;
 }
 
 /* Want background task */
-bool deadline_face_wants_background_task(movement_settings_t *settings, void *context)
+bool deadline_face_wants_background_task(void *context)
 {
     deadline_state_t *state = (deadline_state_t *) context;
 
@@ -630,8 +615,8 @@ bool deadline_face_wants_background_task(movement_settings_t *settings, void *co
 
     /* Determine closest deadline */
     watch_date_time now = watch_rtc_get_date_time();
-    uint32_t now_ts = watch_utility_date_time_to_unix_time(now, _get_tz_offset(settings));
-    uint32_t next_ts = state->deadlines[_closest_deadline(settings, state)];
+    uint32_t now_ts = watch_utility_date_time_to_unix_time(now, movement_get_current_timezone_offset());
+    uint32_t next_ts = state->deadlines[_closest_deadline(state)];
 
     /* No active deadline */
     if (next_ts < now_ts)
@@ -642,7 +627,7 @@ bool deadline_face_wants_background_task(movement_settings_t *settings, void *co
         return false;
 
     /* Deadline within next minute. Let's set up an alarm */
-    watch_date_time next = watch_utility_date_time_from_unix_time(next_ts, _get_tz_offset(settings));
+    watch_date_time next = watch_utility_date_time_from_unix_time(next_ts, movement_get_current_timezone_offset());
     movement_request_wake();
     movement_schedule_background_task_for_face(state->face_idx, next);
     return false;
index 4e4efe01691dc91955751145f802c0c63c7fc6dd..f89f3ef23c002ff0cf86c1a9db778c606f56a1ef 100644 (file)
@@ -48,11 +48,11 @@ typedef struct {
     uint32_t deadlines[DEADLINE_FACE_DATES];
 } deadline_state_t;
 
-void deadline_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void **context_ptr);
-void deadline_face_activate(movement_settings_t *settings, void *context);
-bool deadline_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void deadline_face_resign(movement_settings_t *settings, void *context);
-bool deadline_face_wants_background_task(movement_settings_t *settings, void *context);
+void deadline_face_setup(uint8_t watch_face_index, void **context_ptr);
+void deadline_face_activate(void *context);
+bool deadline_face_loop(movement_event_t event, void *context);
+void deadline_face_resign(void *context);
+bool deadline_face_wants_background_task(void *context);
 
 #define deadline_face ((const watch_face_t){ \
     deadline_face_setup, \
index 61508c0045323666eeb6532c800b6e8e6ff3265f..8d499920c4cbf1f39ac88822d96496fe3027e4ed 100644 (file)
@@ -87,7 +87,7 @@ static const char labels[][2] = {
 ///////////////////////////////////////////////////////////////////////////////////////////////
 
 /* Beep function */
-static inline void beep(movement_settings_t *settings) {
+static inline void beep() {
     if (movement_button_should_sound()) watch_buzzer_play_note(BUZZER_NOTE_C7, 50);
 }
 
@@ -146,8 +146,7 @@ static inline void store_best(discgolf_state_t *state) {
 }
 
 /* Configuration at boot, the high score array can be initialized with your high scores if they're known */
-void discgolf_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void discgolf_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
 
     if (*context_ptr == NULL) {
@@ -162,8 +161,7 @@ void discgolf_face_setup(movement_settings_t *settings, uint8_t watch_face_index
     }
 }
 
-void discgolf_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void discgolf_face_activate(void *context) {
     watch_clear_colon();
     discgolf_state_t *state = (discgolf_state_t *)context;
 
@@ -178,8 +176,7 @@ void discgolf_face_activate(movement_settings_t *settings, void *context) {
     movement_request_tick_frequency(4);
 }
 
-bool discgolf_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void) settings;
+bool discgolf_face_loop(movement_event_t event, void *context) {
     
     discgolf_state_t *state = (discgolf_state_t *)context;
 
@@ -238,7 +235,7 @@ bool discgolf_face_loop(movement_event_t event, movement_settings_t *settings, v
                     state->mode = dg_idle;
                     break;
             }
-            beep(settings);
+            beep();
             break;
         case EVENT_ALARM_BUTTON_UP:
             switch (state->mode) {
@@ -264,14 +261,14 @@ bool discgolf_face_loop(movement_event_t event, movement_settings_t *settings, v
                 state->mode = dg_setting;
                 store_best(state);
                 reset(state);
-                beep(settings);
+                beep();
             }
             break;
         case EVENT_ALARM_LONG_PRESS:
             /* Snap back to currently playing hole if we've established one*/
             if ( (state->mode == dg_idle) && (state->hole != state->playing) && (state->playing <= holes[state->course]) ) {
                 state->hole = state->playing;
-                beep(settings);
+                beep();
             }
             break;
         default:
@@ -319,8 +316,7 @@ bool discgolf_face_loop(movement_event_t event, movement_settings_t *settings, v
     return true;
 }
 
-void discgolf_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void discgolf_face_resign(void *context) {
     (void) context;
     watch_clear_indicator(WATCH_INDICATOR_LAP);
 }
index d168958ccbed04efc6340c597195038b8f5d3e18..bfdd532bf81a6b7c19a3a43267be863d24984399 100644 (file)
@@ -78,10 +78,10 @@ typedef struct {
     discgolf_mode_t mode;       // Watch face mode
 } discgolf_state_t;
 
-void discgolf_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void discgolf_face_activate(movement_settings_t *settings, void *context);
-bool discgolf_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void discgolf_face_resign(movement_settings_t *settings, void *context);
+void discgolf_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void discgolf_face_activate(void *context);
+bool discgolf_face_loop(movement_event_t event, void *context);
+void discgolf_face_resign(void *context);
 
 #define discgolf_face ((const watch_face_t){ \
     discgolf_face_setup, \
index f98c35b4be94ff9e4ede98557ebeb55457ae1544..aa91c701480d2b0a0f1991661a57faa5367f92b4 100644 (file)
@@ -226,8 +226,7 @@ static void dual_timer_display(dual_timer_state_t *state) {
 
 // PUBLIC WATCH FACE FUNCTIONS ////////////////////////////////////////////////
 
-void dual_timer_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void dual_timer_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(dual_timer_state_t));
@@ -239,15 +238,14 @@ void dual_timer_face_setup(movement_settings_t *settings, uint8_t watch_face_ind
     }
 }
 
-void dual_timer_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void dual_timer_face_activate(void *context) {
     (void) context;
     if (_is_running) {
         movement_schedule_background_task(distant_future);
     }
 }
 
-bool dual_timer_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool dual_timer_face_loop(movement_event_t event, void *context) {
     dual_timer_state_t *state = (dual_timer_state_t *)context;
 
     // timers stop at 99:23:59:59:99
@@ -319,14 +317,13 @@ bool dual_timer_face_loop(movement_event_t event, movement_settings_t *settings,
             dual_timer_display(state);
             break;
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     return true;
 }
 
-void dual_timer_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void dual_timer_face_resign(void *context) {
     (void) context;
     movement_cancel_background_task();
     // handle any cleanup before your watch face goes off-screen.
index d1ac79359d885c86bd43e0f1c1a0331002c870d4..e1bd2d5ac6ca53d5b86625a03ecd2d22415e1f01 100644 (file)
@@ -85,10 +85,10 @@ typedef struct {
     bool show;
 } dual_timer_state_t;
 
-void dual_timer_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void dual_timer_face_activate(movement_settings_t *settings, void *context);
-bool dual_timer_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void dual_timer_face_resign(movement_settings_t *settings, void *context);
+void dual_timer_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void dual_timer_face_activate(void *context);
+bool dual_timer_face_loop(movement_event_t event, void *context);
+void dual_timer_face_resign(void *context);
 
 #if __EMSCRIPTEN__
 void em_dual_timer_cb_handler(void *userData);
index 6d8b4873e8b029678cfb94a43708acc14e45e501..d15517eedfdc9e7842d907ec82c72198a8961c0e 100644 (file)
@@ -539,8 +539,7 @@ static void update_game(endless_runner_state_t *state, uint8_t subsecond) {
         display_fuel(subsecond, state -> difficulty);
 }
 
-void endless_runner_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void endless_runner_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(endless_runner_state_t));
@@ -550,12 +549,11 @@ void endless_runner_face_setup(movement_settings_t *settings, uint8_t watch_face
     }
 }
 
-void endless_runner_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void endless_runner_face_activate(void *context) {
     (void) context;
 }
 
-bool endless_runner_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool endless_runner_face_loop(movement_event_t event, void *context) {
     endless_runner_state_t *state = (endless_runner_state_t *)context;
     switch (event.event_type) {
         case EVENT_ACTIVATE:
@@ -605,13 +603,12 @@ bool endless_runner_face_loop(movement_event_t event, movement_settings_t *setti
             display_time(watch_rtc_get_date_time(), movement_clock_mode_24h());
             break;
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
     return true;
 }
 
-void endless_runner_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void endless_runner_face_resign(void *context) {
     (void) context;
 }
 
index 8c8fa215f9400e67e312af4840b9c658a9fd3b4e..3cfa68145b8f97867b14930d02f955df9b0384c1 100644 (file)
@@ -45,10 +45,10 @@ typedef struct {
     /* 24 bits, likely aligned to 32 bits = 4 bytes */
 } endless_runner_state_t;
 
-void endless_runner_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void endless_runner_face_activate(movement_settings_t *settings, void *context);
-bool endless_runner_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void endless_runner_face_resign(movement_settings_t *settings, void *context);
+void endless_runner_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void endless_runner_face_activate(void *context);
+bool endless_runner_face_loop(movement_event_t event, void *context);
+void endless_runner_face_resign(void *context);
 
 #define endless_runner_face ((const watch_face_t){ \
     endless_runner_face_setup, \
index 4922faafd11b55f2bae1ad28a675f7a52473d36c..0c4facd0e1207bd72a4824fcb220206fd105ef59 100644 (file)
@@ -26,8 +26,7 @@
 #include <string.h>
 #include "flashlight_face.h"
 
-void flashlight_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void flashlight_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(flashlight_state_t));
@@ -37,15 +36,14 @@ void flashlight_face_setup(movement_settings_t *settings, uint8_t watch_face_ind
     // Do any pin or peripheral setup here; this will be called whenever the watch wakes from deep sleep.
 }
 
-void flashlight_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void flashlight_face_activate(void *context) {
     (void) context;
 
     watch_enable_digital_output(A2);
     watch_set_pin_level(A2, false);
 }
 
-bool flashlight_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool flashlight_face_loop(movement_event_t event, void *context) {
     (void) context;
 
     switch (event.event_type) {
@@ -65,14 +63,13 @@ bool flashlight_face_loop(movement_event_t event, movement_settings_t *settings,
             movement_move_to_face(0);
             break;
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     return true;
 }
 
-void flashlight_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void flashlight_face_resign(void *context) {
     (void) context;
 
     watch_set_pin_level(A2, false);
index 8c0ef8d539665d2b6cdca7890535ba202c814b2b..6fc7f8eb6a4f4b6c1398c53652244b7d06b52a09 100644 (file)
@@ -42,10 +42,10 @@ typedef struct {
     uint8_t unused;
 } flashlight_state_t;
 
-void flashlight_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void flashlight_face_activate(movement_settings_t *settings, void *context);
-bool flashlight_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void flashlight_face_resign(movement_settings_t *settings, void *context);
+void flashlight_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void flashlight_face_activate(void *context);
+bool flashlight_face_loop(movement_event_t event, void *context);
+void flashlight_face_resign(void *context);
 
 #define flashlight_face ((const watch_face_t){ \
     flashlight_face_setup, \
index 5928f50daf5ed2b53a0f329df2bb2320943afb0a..d5076018a63421fc22acd039d67630702463df0d 100644 (file)
@@ -71,21 +71,19 @@ static void _throw_animation(geomancy_state_t *state);
 
 // WATCH FACE FUNCTIONS ///////////////////////////////////////////////////////
 
-void geomancy_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
+void geomancy_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
-    (void) settings;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(geomancy_state_t));
         memset(*context_ptr, 0, sizeof(geomancy_state_t));
     }
 }
 
-void geomancy_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void geomancy_face_activate(void *context) {
     (void) context;
 }
 
-bool geomancy_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool geomancy_face_loop(movement_event_t event, void *context) {
     geomancy_state_t *state = (geomancy_state_t *)context;
 
     switch (event.event_type) {
@@ -137,13 +135,12 @@ bool geomancy_face_loop(movement_event_t event, movement_settings_t *settings, v
             geomancy_face_display(state);
             break;
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
     return true;
 }
 
-void geomancy_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void geomancy_face_resign(void *context) {
     (void) context;
 }
 
index 4710ae7ece5d4a9cc00acd580fb4427b1e64ee12..c622bfc23e19d06c56bd41bac7b1ea1d411e92dd 100644 (file)
@@ -82,10 +82,10 @@ typedef struct {
     bool animate;
 } geomancy_state_t;
 
-void geomancy_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void geomancy_face_activate(movement_settings_t *settings, void *context);
-bool geomancy_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void geomancy_face_resign(movement_settings_t *settings, void *context);
+void geomancy_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void geomancy_face_activate(void *context);
+bool geomancy_face_loop(movement_event_t event, void *context);
+void geomancy_face_resign(void *context);
 
 #define geomancy_face ((const watch_face_t){ \
     geomancy_face_setup, \
index 55e7ffced5ef3c148d805013473872788bd7d77a..693d7a0f7099dfc907696b70c0157ef4ac66e129 100644 (file)
@@ -48,9 +48,8 @@ typedef struct {
   bool display_total;
 } habit_state_t;
 
-void habit_face_setup(movement_settings_t *settings, uint8_t watch_face_index,
+void habit_face_setup(uint8_t watch_face_index,
                       void **context_ptr) {
-  (void)settings;
   (void)watch_face_index;
   if (*context_ptr == NULL) {
     *context_ptr = malloc(sizeof(habit_state_t));
@@ -101,13 +100,12 @@ static inline void display_state(habit_state_t *state) {
   }
 }
 
-void habit_face_activate(movement_settings_t *settings, void *context) {
-  (void)settings;
+void habit_face_activate(void *context) {
   habit_state_t *state = (habit_state_t *)context;
   display_state(state);
 }
 
-bool habit_face_loop(movement_event_t event, movement_settings_t *settings,
+bool habit_face_loop(movement_event_t event,
                      void *context) {
   habit_state_t *state = (habit_state_t *)context;
 
@@ -146,12 +144,11 @@ bool habit_face_loop(movement_event_t event, movement_settings_t *settings,
     break;
   }
   default:
-    return movement_default_loop_handler(event, settings);
+    return movement_default_loop_handler(event);
   }
   return true;
 }
 
-void habit_face_resign(movement_settings_t *settings, void *context) {
-  (void)settings;
+void habit_face_resign(void *context) {
   (void)context;
 }
index d4f43cf4cae420b536ec0cdf81b23e76303efd7a..6170ee8668b2ad1261cf1cc3eb23c9171c63fd8e 100644 (file)
 
 #include "movement.h"
 
-void habit_face_setup(movement_settings_t *settings, uint8_t watch_face_index,
+void habit_face_setup(uint8_t watch_face_index,
                       void **context_ptr);
-void habit_face_activate(movement_settings_t *settings, void *context);
-bool habit_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void habit_face_resign(movement_settings_t *settings, void *context);
+void habit_face_activate(void *context);
+bool habit_face_loop(movement_event_t event, void *context);
+void habit_face_resign(void *context);
 
 #define habit_face ((const watch_face_t){ \
     habit_face_setup, \
index f9dbcd096719d83f61ab54c38784022ab910d673..3491b5bd0a1cacf8a328f2a41ff44351b22adaf9 100755 (executable)
@@ -327,8 +327,7 @@ static void alarm_button_handler(void) {
     do_game_loop(HL_GUESS_LOWER);\r
 }\r
 \r
-void higher_lower_game_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void **context_ptr) {\r
-    (void) settings;\r
+void higher_lower_game_face_setup(uint8_t watch_face_index, void **context_ptr) {\r
     (void) watch_face_index;\r
 \r
     if (*context_ptr == NULL) {\r
@@ -340,15 +339,14 @@ void higher_lower_game_face_setup(movement_settings_t *settings, uint8_t watch_f
     // Do any pin or peripheral setup here; this will be called whenever the watch wakes from deep sleep.\r
 }\r
 \r
-void higher_lower_game_face_activate(movement_settings_t *settings, void *context) {\r
-    (void) settings;\r
+void higher_lower_game_face_activate(void *context) {\r
     higher_lower_game_face_state_t *state = (higher_lower_game_face_state_t *) context;\r
     (void) state;\r
     // Handle any tasks related to your watch face coming on screen.\r
     game_state = HL_GS_TITLE_SCREEN;\r
 }\r
 \r
-bool higher_lower_game_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {\r
+bool higher_lower_game_face_loop(movement_event_t event, void *context) {\r
     higher_lower_game_face_state_t *state = (higher_lower_game_face_state_t *) context;\r
     (void) state;\r
 \r
@@ -376,7 +374,7 @@ bool higher_lower_game_face_loop(movement_event_t event, movement_settings_t *se
             // movement_move_to_face(0);\r
             break;\r
         default:\r
-            return movement_default_loop_handler(event, settings);\r
+            return movement_default_loop_handler(event);\r
     }\r
 \r
     // return true if the watch can enter standby mode. Generally speaking, you should always return true.\r
@@ -388,8 +386,7 @@ bool higher_lower_game_face_loop(movement_event_t event, movement_settings_t *se
     return true;\r
 }\r
 \r
-void higher_lower_game_face_resign(movement_settings_t *settings, void *context) {\r
-    (void) settings;\r
+void higher_lower_game_face_resign(void *context) {\r
     (void) context;\r
 \r
     // handle any cleanup before your watch face goes off-screen.\r
index 13da5869b3a66c755cc2d57a697a3052631d369c..51689b576b2d69e0af105b2f1bd02622322c7d39 100755 (executable)
@@ -90,10 +90,10 @@ typedef struct {
     // Anything you need to keep track of, put it here!\r
 } higher_lower_game_face_state_t;\r
 \r
-void higher_lower_game_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);\r
-void higher_lower_game_face_activate(movement_settings_t *settings, void *context);\r
-bool higher_lower_game_face_loop(movement_event_t event, movement_settings_t *settings, void *context);\r
-void higher_lower_game_face_resign(movement_settings_t *settings, void *context);\r
+void higher_lower_game_face_setup(uint8_t watch_face_index, void ** context_ptr);\r
+void higher_lower_game_face_activate(void *context);\r
+bool higher_lower_game_face_loop(movement_event_t event, void *context);\r
+void higher_lower_game_face_resign(void *context);\r
 \r
 #define higher_lower_game_face ((const watch_face_t){ \\r
     higher_lower_game_face_setup, \\r
index fb39c9bbd0a9c4a838b8d38d50531ec119d238bb..d32c2dc8c826b4aa96bd35129ad0e4493d229004 100644 (file)
@@ -97,7 +97,7 @@ static uint32_t _get_now_ts() {
     return watch_utility_date_time_to_unix_time(now, 0);
 }
 
-static inline void _button_beep(movement_settings_t *settings) {
+static inline void _button_beep() {
     // play a beep as confirmation for a button press (if applicable)
     if (movement_button_should_sound()) watch_buzzer_play_note(BUZZER_NOTE_C7, 50);
 }
@@ -369,8 +369,7 @@ static void _resume_paused_timer(interval_face_state_t *state) {
     watch_set_indicator(WATCH_INDICATOR_BELL);
 }
 
-void interval_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void **context_ptr) {
-    (void) settings;
+void interval_face_setup(uint8_t watch_face_index, void **context_ptr) {
 
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(interval_face_state_t));
@@ -394,8 +393,7 @@ void interval_face_setup(movement_settings_t *settings, uint8_t watch_face_index
     }
 }
 
-void interval_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void interval_face_activate(void *context) {
     interval_face_state_t *state = (interval_face_state_t *)context;
     _erase_timer_flag = false;
     state->is_active = true;
@@ -407,8 +405,7 @@ void interval_face_activate(movement_settings_t *settings, void *context) {
     } else watch_set_colon();
 }
 
-void interval_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void interval_face_resign(void *context) {
     interval_face_state_t *state = (interval_face_state_t *)context;
     if (state->face_state <= interval_state_setting) state->face_state = interval_state_waiting;
     watch_set_led_off();
@@ -416,7 +413,7 @@ void interval_face_resign(movement_settings_t *settings, void *context) {
     state->is_active = false;
 }
 
-bool interval_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool interval_face_loop(movement_event_t event, void *context) {
     interval_face_state_t *state = (interval_face_state_t *)context;
     interval_timer_setting_t *timer = &state->timer[state->timer_idx];
 
@@ -618,7 +615,7 @@ bool interval_face_loop(movement_event_t event, movement_settings_t *settings, v
         // don't light up every time light is hit
         break;
     default:
-        movement_default_loop_handler(event, settings);
+        movement_default_loop_handler(event);
         break;
     }
     return true;
index 7997585527be73bc01c6fcbcce252cfa89c0a206..def944b51b990bcc5af61bb2b6570c178e528d5f 100644 (file)
@@ -111,10 +111,10 @@ typedef struct {
     interval_timer_setting_t timer[INTERVAL_TIMERS];
 } interval_face_state_t;
 
-void interval_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void interval_face_activate(movement_settings_t *settings, void *context);
-bool interval_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void interval_face_resign(movement_settings_t *settings, void *context);
+void interval_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void interval_face_activate(void *context);
+bool interval_face_loop(movement_event_t event, void *context);
+void interval_face_resign(void *context);
 
 #define interval_face ((const watch_face_t) { \
     interval_face_setup, \
index c3b13c680d94dbd4c4e33bc65c3f2ba065218717..935926a2321b20bf535630a332dabef802a46dee 100644 (file)
@@ -203,8 +203,7 @@ static bool _move_invaders() {
     return false;
 }
 
-void invaders_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void invaders_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(invaders_state_t));
@@ -220,14 +219,13 @@ void invaders_face_setup(movement_settings_t *settings, uint8_t watch_face_index
 #endif
 }
 
-void invaders_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void invaders_face_activate(void *context) {
     (void) context;
     _current_state = invaders_state_activated;
     _signals.suspend_buttons = false;
 }
 
-bool invaders_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool invaders_face_loop(movement_event_t event, void *context) {
     invaders_state_t *state = (invaders_state_t *)context;
 
     switch (event.event_type) {
@@ -414,7 +412,7 @@ bool invaders_face_loop(movement_event_t event, movement_settings_t *settings, v
             // * EVENT_MODE_BUTTON_UP moves to the next watch face in the list
             // * EVENT_MODE_LONG_PRESS returns to the first watch face (or skips to the secondary watch face, if configured)
             // You can override any of these behaviors by adding a case for these events to this switch statement.
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     // return true if the watch can enter standby mode. Generally speaking, you should always return true.
@@ -426,8 +424,7 @@ bool invaders_face_loop(movement_event_t event, movement_settings_t *settings, v
     return true;
 }
 
-void invaders_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void invaders_face_resign(void *context) {
     (void) context;
     _current_state = invaders_state_game_over;
 }
index 37e9188444a50a3e0fcd29c83385a258ce8d6421..88862864a2f704fa7662b0cfe4dcc34580921c3c 100644 (file)
@@ -65,10 +65,10 @@ typedef struct {
     bool sound_on;
 } invaders_state_t;
 
-void invaders_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void invaders_face_activate(movement_settings_t *settings, void *context);
-bool invaders_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void invaders_face_resign(movement_settings_t *settings, void *context);
+void invaders_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void invaders_face_activate(void *context);
+bool invaders_face_loop(movement_event_t event, void *context);
+void invaders_face_resign(void *context);
 
 #define invaders_face ((const watch_face_t){ \
     invaders_face_setup, \
index 9d71165aa59c7fdec4155e48ebf3d1349cc50108..5c1d1dd82673de1ca64e88d17c1f1c3495369cd5 100644 (file)
@@ -79,7 +79,7 @@ static int8_t calc_success_seq[5] = {BUZZER_NOTE_G6, 10, BUZZER_NOTE_C7, 10, 0};
 static int8_t calc_fail_seq[5] = {BUZZER_NOTE_C7, 10, BUZZER_NOTE_G6, 10, 0};
 
 // Resets all state variables to 0
-static void reset_state(kitchen_conversions_state_t *state, movement_settings_t *settings)
+static void reset_state(kitchen_conversions_state_t *state)
 {
     state->pg = measurement;
     state->measurement_i = 0;
@@ -92,9 +92,8 @@ static void reset_state(kitchen_conversions_state_t *state, movement_settings_t
     state->light_held = false;
 }
 
-void kitchen_conversions_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void **context_ptr)
+void kitchen_conversions_face_setup(uint8_t watch_face_index, void **context_ptr)
 {
-    (void)settings;
     (void)watch_face_index;
     if (*context_ptr == NULL)
     {
@@ -105,9 +104,8 @@ void kitchen_conversions_face_setup(movement_settings_t *settings, uint8_t watch
     // Do any pin or peripheral setup here; this will be called whenever the watch wakes from deep sleep.
 }
 
-void kitchen_conversions_face_activate(movement_settings_t *settings, void *context)
+void kitchen_conversions_face_activate(void *context)
 {
-    (void)settings;
     kitchen_conversions_state_t *state = (kitchen_conversions_state_t *)context;
 
     // Handle any tasks related to your watch face coming on screen.
@@ -168,7 +166,7 @@ static void display_units(uint8_t measurement_i, uint8_t list_i)
     watch_display_string(get_unit_list(measurement_i)[list_i].name, 4);
 }
 
-static void display(kitchen_conversions_state_t *state, movement_settings_t *settings, uint8_t subsec)
+static void display(kitchen_conversions_state_t *state, uint8_t subsec)
 {
     watch_clear_display();
 
@@ -290,7 +288,7 @@ static void display(kitchen_conversions_state_t *state, movement_settings_t *set
     }
 }
 
-bool kitchen_conversions_face_loop(movement_event_t event, movement_settings_t *settings, void *context)
+bool kitchen_conversions_face_loop(movement_event_t event, void *context)
 {
     kitchen_conversions_state_t *state = (kitchen_conversions_state_t *)context;
 
@@ -465,15 +463,14 @@ bool kitchen_conversions_face_loop(movement_event_t event, movement_settings_t *
         break;
 
     default:
-        return movement_default_loop_handler(event, settings);
+        return movement_default_loop_handler(event);
     }
 
     return true;
 }
 
-void kitchen_conversions_face_resign(movement_settings_t *settings, void *context)
+void kitchen_conversions_face_resign(void *context)
 {
-    (void)settings;
     (void)context;
 
     // handle any cleanup before your watch face goes off-screen.
index e732579e254ce9858c24016fbe4260030383030c..33c6cf4c00c38ae72d52c4804862e1797d92a610 100644 (file)
@@ -71,10 +71,10 @@ typedef struct
     bool light_held;
 } kitchen_conversions_state_t;
 
-void kitchen_conversions_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void **context_ptr);
-void kitchen_conversions_face_activate(movement_settings_t *settings, void *context);
-bool kitchen_conversions_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void kitchen_conversions_face_resign(movement_settings_t *settings, void *context);
+void kitchen_conversions_face_setup(uint8_t watch_face_index, void **context_ptr);
+void kitchen_conversions_face_activate(void *context);
+bool kitchen_conversions_face_loop(movement_event_t event, void *context);
+void kitchen_conversions_face_resign(void *context);
 
 #define kitchen_conversions_face ((const watch_face_t){ \
     kitchen_conversions_face_setup,                     \
index 57ca98248f8fa6af84af4f9d06a3793a8fe50e9f..42334050c73a60d634620ed0d7cfacfc2662e74b 100644 (file)
@@ -85,7 +85,7 @@ const char menstrual_cycle_face_titles[MENSTRUAL_CYCLE_FACE_NUM_PAGES][11] = {
 };
 
 /* Beep function */
-static inline void beep(movement_settings_t *settings) {
+static inline void beep() {
     if (movement_button_should_sound())
         watch_buzzer_play_note(BUZZER_NOTE_E8, 75);
 }
@@ -250,9 +250,8 @@ static inline void update_shortest_longest_cycle(menstrual_cycle_state_t *state)
         state->cycles.bit.longest_cycle = cycle_length;
 }
 
-void menstrual_cycle_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
+void menstrual_cycle_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
-    (void) settings;
     
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(menstrual_cycle_state_t));
@@ -295,8 +294,7 @@ void menstrual_cycle_face_setup(movement_settings_t *settings, uint8_t watch_fac
     }
 }
 
-void menstrual_cycle_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void menstrual_cycle_face_activate(void *context) {
     menstrual_cycle_state_t *state = (menstrual_cycle_state_t *)context;
     state->period_today = 0;
     state->current_page = 0;
@@ -305,7 +303,7 @@ void menstrual_cycle_face_activate(movement_settings_t *settings, void *context)
     movement_request_tick_frequency(4); // we need to manually blink some pixels
 }
 
-bool menstrual_cycle_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool menstrual_cycle_face_loop(movement_event_t event, void *context) {
     menstrual_cycle_state_t *state = (menstrual_cycle_state_t *)context;
     watch_date_time date_period;
     uint8_t current_page = state->current_page;
@@ -406,7 +404,7 @@ bool menstrual_cycle_face_loop(movement_event_t event, movement_settings_t *sett
             movement_move_to_face(0);
             break;
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     watch_display_string((char *)menstrual_cycle_face_titles[current_page], 0);
@@ -466,7 +464,6 @@ bool menstrual_cycle_face_loop(movement_event_t event, movement_settings_t *sett
     return true;
 }
 
-void menstrual_cycle_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void menstrual_cycle_face_resign(void *context) {
     (void) context;
 }
\ No newline at end of file
index 73adaf80292873f3ec9154941b79d4286f4ce23a..5f0dedcf299fa9fe51f1866dab2580a36085a7ec 100644 (file)
@@ -64,10 +64,10 @@ typedef struct {
     bool reset_tracking;
 } menstrual_cycle_state_t;
 
-void menstrual_cycle_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void menstrual_cycle_face_activate(movement_settings_t *settings, void *context);
-bool menstrual_cycle_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void menstrual_cycle_face_resign(movement_settings_t *settings, void *context);
+void menstrual_cycle_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void menstrual_cycle_face_activate(void *context);
+bool menstrual_cycle_face_loop(movement_event_t event, void *context);
+void menstrual_cycle_face_resign(void *context);
 
 #define menstrual_cycle_face ((const watch_face_t){ \
     menstrual_cycle_face_setup, \
index ad53c6c8c60b919add22a12c77844b37706de1bc..e599362ff5e83c8436925d12d53602ee5647afd9 100644 (file)
@@ -30,8 +30,7 @@
 static const int8_t _sound_seq_start[] = {BUZZER_NOTE_C8, 2, 0};
 static const int8_t _sound_seq_beat[] = {BUZZER_NOTE_C6, 2, 0};
 
-void metronome_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void metronome_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(metronome_state_t));
@@ -39,8 +38,7 @@ void metronome_face_setup(movement_settings_t *settings, uint8_t watch_face_inde
     }
 }
 
-void metronome_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void metronome_face_activate(void *context) {
     metronome_state_t *state = (metronome_state_t *)context;
     movement_request_tick_frequency(2);
     if (state->bpm == 0) {
@@ -200,7 +198,7 @@ static void _metronome_update_setting(metronome_state_t *state) {
     watch_display_string(buf, 0);
 }
 
-bool metronome_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool metronome_face_loop(movement_event_t event, void *context) {
     metronome_state_t *state = (metronome_state_t *)context;
 
     switch (event.event_type) {
@@ -251,13 +249,12 @@ bool metronome_face_loop(movement_event_t event, movement_settings_t *settings,
         case EVENT_LOW_ENERGY_UPDATE:
             break;
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
     return true;
 }
 
-void metronome_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void metronome_face_resign(void *context) {
     (void) context;
 }
 
index 7c8573f2e9fa5c10b990bd5d183279b9851913ad..32766da6f50b21aad877ff25c9dadd9fd7e30f37 100644 (file)
@@ -69,10 +69,10 @@ typedef struct {
     bool soundOn;
 } metronome_state_t;
 
-void metronome_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void metronome_face_activate(movement_settings_t *settings, void *context);
-bool metronome_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void metronome_face_resign(movement_settings_t *settings, void *context);
+void metronome_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void metronome_face_activate(void *context);
+bool metronome_face_loop(movement_event_t event, void *context);
+void metronome_face_resign(void *context);
 
 #define metronome_face ((const watch_face_t){ \
     metronome_face_setup, \
index 6f60c017f7994b39245e9eb1ad11971d77c43570..5f99a30c69c17f75be15577e79f1ac08153d8e22 100644 (file)
@@ -41,8 +41,7 @@
 
 static const float phase_changes[] = {0, 1, 6.38264692644, 8.38264692644, 13.76529385288, 15.76529385288, 21.14794077932, 23.14794077932, 28.53058770576, 29.53058770576};
 
-void moon_phase_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void moon_phase_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(moon_phase_state_t));
@@ -50,12 +49,11 @@ void moon_phase_face_setup(movement_settings_t *settings, uint8_t watch_face_ind
     }
 }
 
-void moon_phase_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void moon_phase_face_activate(void *context) {
     (void) context;
 }
 
-static void _update(movement_settings_t *settings, moon_phase_state_t *state, uint32_t offset) {
+static void _update(moon_phase_state_t *state, uint32_t offset) {
     (void)state;
     char buf[11];
     watch_date_time date_time = watch_rtc_get_date_time();
@@ -132,23 +130,23 @@ static void _update(movement_settings_t *settings, moon_phase_state_t *state, ui
     watch_display_string(buf, 2);
 }
 
-bool moon_phase_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool moon_phase_face_loop(movement_event_t event, void *context) {
     moon_phase_state_t *state = (moon_phase_state_t *)context;
     watch_date_time date_time;
 
     switch (event.event_type) {
         case EVENT_ACTIVATE:
-            _update(settings, state, state->offset);
+            _update(state, state->offset);
             break;
         case EVENT_TICK:
             // only update once an hour
             date_time = watch_rtc_get_date_time();
-            if ((date_time.unit.minute == 0) && (date_time.unit.second == 0)) _update(settings, state, state->offset);
+            if ((date_time.unit.minute == 0) && (date_time.unit.second == 0)) _update(state, state->offset);
             break;
         case EVENT_LOW_ENERGY_UPDATE:
             // update at the top of the hour OR if we're entering sleep mode with an offset.
             // also, in sleep mode, always show the current moon phase (offset = 0).
-            if (state->offset || (watch_rtc_get_date_time().unit.minute == 0)) _update(settings, state, 0);
+            if (state->offset || (watch_rtc_get_date_time().unit.minute == 0)) _update(state, 0);
             // and kill the offset so when the wearer wakes up, it matches what's on screen.
             state->offset = 0;
             // finally: clear out the last two digits and replace them with the sleep mode indicator
@@ -159,24 +157,23 @@ bool moon_phase_face_loop(movement_event_t event, movement_settings_t *settings,
             // Pressing the alarm adds an offset of one day to the displayed value,
             // so you can see moon phases in the future.
             state->offset += 86400;
-            _update(settings, state, state->offset);
+            _update(state, state->offset);
             break;
        case EVENT_ALARM_LONG_PRESS:
            state->offset = 0;
-            _update(settings, state, state->offset);
+            _update(state, state->offset);
            break;
         case EVENT_TIMEOUT:
             // QUESTION: Should timeout reset offset to 0?
             break;
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     return true;
 }
 
-void moon_phase_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void moon_phase_face_resign(void *context) {
     moon_phase_state_t *state = (moon_phase_state_t *)context;
     state->offset = 0;
 }
index 9a64fcc7533d0443a227896488098a0e1c9413a1..b02098294aa9c0710bfb2c5832903debaf22892c 100644 (file)
@@ -55,10 +55,10 @@ typedef struct {
     uint32_t offset;
 } moon_phase_state_t;
 
-void moon_phase_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void moon_phase_face_activate(movement_settings_t *settings, void *context);
-bool moon_phase_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void moon_phase_face_resign(movement_settings_t *settings, void *context);
+void moon_phase_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void moon_phase_face_activate(void *context);
+bool moon_phase_face_loop(movement_event_t event, void *context);
+void moon_phase_face_resign(void *context);
 
 #define moon_phase_face ((const watch_face_t){ \
     moon_phase_face_setup, \
index c92a402b088510d5b5902d1115883787257308e6..0a4ad2c091f4f7acb90ac13bd01493e6335d0604 100644 (file)
@@ -106,8 +106,7 @@ void morsecalc_input(morsecalc_state_t * mcs) {
     return;    
 }
 
-void morsecalc_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void morsecalc_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(morsecalc_state_t)); 
@@ -122,15 +121,14 @@ void morsecalc_face_setup(movement_settings_t *settings, uint8_t watch_face_inde
     return;
 }
 
-void morsecalc_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void morsecalc_face_activate(void *context) {
     morsecalc_state_t *mcs = (morsecalc_state_t *) context;
     mcs->mc = 0;
     morsecalc_display_stack(mcs);
     return;
 }
 
-bool morsecalc_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool morsecalc_face_loop(movement_event_t event, void *context) {
     morsecalc_state_t *mcs = (morsecalc_state_t *) context;
     switch(event.event_type) {
     // input
@@ -190,15 +188,14 @@ bool morsecalc_face_loop(movement_event_t event, movement_settings_t *settings,
         // don't light up every time light is hit
         break;
     default:
-        movement_default_loop_handler(event, settings);
+        movement_default_loop_handler(event);
         break;
        }
     
     return true;
 }
 
-void morsecalc_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void morsecalc_face_resign(void *context) {
     morsecalc_state_t *mcs = (morsecalc_state_t *) context;
     mcs->led_is_on = 0;
        watch_set_led_off();
index 4768cce762a6f56c5a3c8b0fa6715e593372857e..1430347278f8a4e5c2b35e295f0deb260f83c173 100644 (file)
  */
 static const char MORSECODE_TREE[] = " etianmsurwdkgohvf\0l\0pjbxcyzq\0C\x35\x34V\x33\0R\0\x32W\0+\0\0\0\0\x31\x36=/\0\0S(\0\x37\0\0\0\x38\0\x39\x30\0\0\0\0\0E\0\0\0\0\0\0?_\0\0\0\0\"\0\0.\0\0\0\0@\0\0\0'\0\0-\0\0\0\0\0\0\0\0;!\0)\0\0\0\0\0,\0\0\0\0:\0\0\0\0\0\0";
 
-void morsecalc_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void morsecalc_face_activate(movement_settings_t *settings, void *context);
-bool morsecalc_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void morsecalc_face_resign(movement_settings_t *settings, void *context);
+void morsecalc_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void morsecalc_face_activate(void *context);
+bool morsecalc_face_loop(movement_event_t event, void *context);
+void morsecalc_face_resign(void *context);
 
 typedef struct {
        calc_state_t *cs;
index 5847b16d384b3bb7e042e1e494b44593dab2f71f..0b538bfed198385891e8ae58aad5d1604de2c359 100644 (file)
@@ -46,7 +46,7 @@ static const char orrery_celestial_body_names[NUM_AVAILABLE_BODIES][3] = {
     "NE"    // Neptune
 };
 
-static void _orrery_face_recalculate(movement_settings_t *settings, orrery_state_t *state) {
+static void _orrery_face_recalculate(orrery_state_t *state) {
     watch_date_time date_time = watch_rtc_get_date_time();
     uint32_t timestamp = watch_utility_date_time_to_unix_time(date_time, movement_get_current_timezone_offset());
     date_time = watch_utility_date_time_from_unix_time(timestamp, 0);
@@ -94,7 +94,7 @@ static void _orrery_face_recalculate(movement_settings_t *settings, orrery_state
     state->coords[2] = r[2];
 }
 
-static void _orrery_face_update(movement_event_t event, movement_settings_t *settings, orrery_state_t *state) {
+static void _orrery_face_update(movement_event_t event, orrery_state_t *state) {
     char buf[11];
     switch (state->mode) {
         case ORRERY_MODE_SELECTING_BODY:
@@ -127,7 +127,7 @@ static void _orrery_face_update(movement_event_t event, movement_settings_t *set
             watch_clear_display();
              // this takes a moment and locks the UI, flash C for "Calculating"
             watch_start_character_blink('C', 100);
-            _orrery_face_recalculate(settings, state);
+            _orrery_face_recalculate(state);
             watch_stop_blink();
             state->mode = ORRERY_MODE_DISPLAYING_X;
             // fall through
@@ -149,8 +149,7 @@ static void _orrery_face_update(movement_event_t event, movement_settings_t *set
     }
 }
 
-void orrery_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void orrery_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(orrery_state_t));
@@ -158,20 +157,18 @@ void orrery_face_setup(movement_settings_t *settings, uint8_t watch_face_index,
     }
 }
 
-void orrery_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void orrery_face_activate(void *context) {
     (void) context;
     movement_request_tick_frequency(4);
 }
 
-bool orrery_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void) settings;
+bool orrery_face_loop(movement_event_t event, void *context) {
     orrery_state_t *state = (orrery_state_t *)context;
 
     switch (event.event_type) {
         case EVENT_ACTIVATE:
         case EVENT_TICK:
-            _orrery_face_update(event, settings, state);
+            _orrery_face_update(event, state);
             break;
         case EVENT_ALARM_BUTTON_UP:
             switch (state->mode) {
@@ -191,34 +188,33 @@ bool orrery_face_loop(movement_event_t event, movement_settings_t *settings, voi
                     state->mode++;
                     break;
             }
-            _orrery_face_update(event, settings, state);
+            _orrery_face_update(event, state);
             break;
         case EVENT_ALARM_LONG_PRESS:
             if (state->mode == ORRERY_MODE_SELECTING_BODY) {
                 // celestial body selected! this triggers a calculation in the update method.
                 state->mode = ORRERY_MODE_CALCULATING;
                 movement_request_tick_frequency(1);
-                _orrery_face_update(event, settings, state);
+                _orrery_face_update(event, state);
             } else if (state->mode != ORRERY_MODE_CALCULATING) {
                 // in all modes except "doing a calculation", return to the selection screen.
                 state->mode = ORRERY_MODE_SELECTING_BODY;
                 movement_request_tick_frequency(4);
-                _orrery_face_update(event, settings, state);
+                _orrery_face_update(event, state);
             }
             break;
         case EVENT_TIMEOUT:
             movement_move_to_face(0);
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
     return true;
 }
 
-void orrery_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void orrery_face_resign(void *context) {
     orrery_state_t *state = (orrery_state_t *)context;
     state->mode = ORRERY_MODE_SELECTING_BODY;
 }
index a416afd09c8dd3ba565c5ab427d4074548e02f11..4bf141e4f87510e0c00a450bee069816d4024425 100644 (file)
@@ -85,10 +85,10 @@ typedef struct {
     uint8_t animation_state;
 } orrery_state_t;
 
-void orrery_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void orrery_face_activate(movement_settings_t *settings, void *context);
-bool orrery_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void orrery_face_resign(movement_settings_t *settings, void *context);
+void orrery_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void orrery_face_activate(void *context);
+bool orrery_face_loop(movement_event_t event, void *context);
+void orrery_face_resign(void *context);
 
 #define orrery_face ((const watch_face_t){ \
     orrery_face_setup, \
index 909744300ed9b678cada2791eaf29da6a55eec22..b6a10c2c112880d09fd3e99a7f8a52e32323b326 100644 (file)
@@ -36,9 +36,8 @@ static int16_t _text_pos;
 static const char* _text_looping;
 static const char title_text[] = "Periodic Table";
 
-void periodic_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void **context_ptr)
+void periodic_face_setup(uint8_t watch_face_index, void **context_ptr)
 {
-    (void)settings;
     (void)watch_face_index;
     if (*context_ptr == NULL)
     {
@@ -47,9 +46,8 @@ void periodic_face_setup(movement_settings_t *settings, uint8_t watch_face_index
     }
 }
 
-void periodic_face_activate(movement_settings_t *settings, void *context)
+void periodic_face_activate(void *context)
 {
-    (void)settings;
     periodic_state_t *state = (periodic_state_t *)context;
 
     state->atomic_num = 0;
@@ -390,7 +388,7 @@ static void _handle_mode_still_pressed(periodic_state_t *state, bool should_soun
     }
 }
 
-bool periodic_face_loop(movement_event_t event, movement_settings_t *settings, void *context)
+bool periodic_face_loop(movement_event_t event, void *context)
 {
     periodic_state_t *state = (periodic_state_t *)context;
     switch (event.event_type)
@@ -488,15 +486,14 @@ bool periodic_face_loop(movement_event_t event, movement_settings_t *settings, v
         watch_start_tick_animation(500);
         break;
     default:
-        return movement_default_loop_handler(event, settings);
+        return movement_default_loop_handler(event);
     }
 
     return true;
 }
 
-void periodic_face_resign(movement_settings_t *settings, void *context)
+void periodic_face_resign(void *context)
 {
-    (void)settings;
     (void)context;
 
     // handle any cleanup before your watch face goes off-screen.
index 730b0fe0b89db5c25f2d9d4063073efe93bdb77d..409b1d86bc731ab7012b54a3d631af3e9256f957 100644 (file)
@@ -72,10 +72,10 @@ typedef struct {
     uint8_t selection_index;
 } periodic_state_t;
 
-void periodic_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void periodic_face_activate(movement_settings_t *settings, void *context);
-bool periodic_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void periodic_face_resign(movement_settings_t *settings, void *context);
+void periodic_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void periodic_face_activate(void *context);
+bool periodic_face_loop(movement_event_t event, void *context);
+void periodic_face_resign(void *context);
 
 #define periodic_face ((const watch_face_t){ \
     periodic_face_setup, \
index 466296a6d562ef16aaaabbde2c0eb6cf4e4a799a..6d5d9987d933fe32d86f9883a7e0edc8bcd37112 100644 (file)
@@ -113,7 +113,7 @@ static void _planetary_icon(uint8_t planet) {
  *  This function calculates the start and end of the current phase based on a given geographic location.
  *  It also calculates the start of the next following phase.
  */
-static void _planetary_solar_phases(movement_settings_t *settings, planetary_hours_state_t *state) {
+static void _planetary_solar_phases(planetary_hours_state_t *state) {
     uint8_t phase, h;
     double sunrise, sunset;
     double hour_duration, next_hour_duration;
@@ -222,7 +222,7 @@ static void _planetary_solar_phases(movement_settings_t *settings, planetary_hou
  *  This function calculates the current planetary hour and divides it up into relative minutes and seconds.
  *  It also calculates the current planetary ruler of the hour and of the day.
  */
-static void _planetary_hours(movement_settings_t *settings, planetary_hours_state_t *state) {
+static void _planetary_hours(planetary_hours_state_t *state) {
     char buf[14];
     char ruler[3];
     uint8_t weekday, planet, planetary_hour;
@@ -249,7 +249,7 @@ static void _planetary_hours(movement_settings_t *settings, planetary_hours_stat
 
     // when current phase ends calculate the next phase
     if ( watch_utility_date_time_to_unix_time(utc_now, 0) >= state->phase_end ) {
-        _planetary_solar_phases(settings, state);
+        _planetary_solar_phases(state);
         return;
     }
 
@@ -334,17 +334,15 @@ static void _planetary_hours(movement_settings_t *settings, planetary_hours_stat
 
 // PUBLIC WATCH FACE FUNCTIONS ////////////////////////////////////////////////
 
-void planetary_hours_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
+void planetary_hours_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
-    (void) settings;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(planetary_hours_state_t));
         memset(*context_ptr, 0, sizeof(planetary_hours_state_t));
     }
 }
 
-void planetary_hours_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void planetary_hours_face_activate(void *context) {
     if (watch_tick_animation_is_running()) watch_stop_tick_animation();
 
 #if __EMSCRIPTEN__
@@ -359,11 +357,11 @@ void planetary_hours_face_activate(movement_settings_t *settings, void *context)
 #endif
 
     planetary_hours_state_t *state = (planetary_hours_state_t *)context; 
-    _planetary_solar_phases(settings, state);
+    _planetary_solar_phases(state);
 
 }
 
-bool planetary_hours_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool planetary_hours_face_loop(movement_event_t event, void *context) {
     planetary_hours_state_t *state = (planetary_hours_state_t *)context;
 
     switch (event.event_type) {
@@ -371,32 +369,31 @@ bool planetary_hours_face_loop(movement_event_t event, movement_settings_t *sett
             // Show your initial UI here.
             watch_clear_indicator(WATCH_INDICATOR_PM);
             watch_clear_indicator(WATCH_INDICATOR_24H);
-            _planetary_hours(settings, state);
+            _planetary_hours(state);
             break;
         case EVENT_LIGHT_BUTTON_UP:
             state->ruler = (state->ruler + 1) % 3;
-            _planetary_hours(settings, state);
+            _planetary_hours(state);
             break;
         case EVENT_LIGHT_LONG_PRESS:
             state->skip_to_current = true;
-            _planetary_hours(settings, state);
+            _planetary_hours(state);
             break;
         case EVENT_ALARM_BUTTON_UP:
             state->hour++;
-            _planetary_hours(settings, state);
+            _planetary_hours(state);
             break;
         case EVENT_ALARM_LONG_PRESS:
             state->hour--;
-            _planetary_hours(settings, state);
+            _planetary_hours(state);
             break;
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
     return true;
 }
 
-void planetary_hours_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void planetary_hours_face_resign(void *context) {
     (void) context;
 }
 
index dfa6801e9388315edd66e2140fafb03532aa187b..5e94aa003bb56779e061e8788e7838a0635804bb 100644 (file)
@@ -92,10 +92,10 @@ typedef struct {
     sunrise_sunset_state_t sunstate;
 } planetary_hours_state_t;
 
-void planetary_hours_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void planetary_hours_face_activate(movement_settings_t *settings, void *context);
-bool planetary_hours_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void planetary_hours_face_resign(movement_settings_t *settings, void *context);
+void planetary_hours_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void planetary_hours_face_activate(void *context);
+bool planetary_hours_face_loop(movement_event_t event, void *context);
+void planetary_hours_face_resign(void *context);
 
 #define planetary_hours_face ((const watch_face_t){ \
     planetary_hours_face_setup, \
index 1bad968ed95f6afa6b176af09dde01674696b094..d7b2d611c89c471222dec7988f68988bd87f7535 100644 (file)
@@ -112,7 +112,7 @@ static void _planetary_icon(uint8_t planet) {
 /** @details solar phase can be a day phase between sunrise and sunset or an alternating night phase.
  *  This function calculates the start and end of the current phase based on a given geographic location.
  */
-static void _planetary_solar_phase(movement_settings_t *settings, planetary_time_state_t *state) {
+static void _planetary_solar_phase(planetary_time_state_t *state) {
     uint8_t phase;
     double sunrise, sunset;
     uint32_t now_epoch, sunrise_epoch, sunset_epoch, midnight_epoch;
@@ -200,7 +200,7 @@ static void _planetary_solar_phase(movement_settings_t *settings, planetary_time
  *  This function calculates the current planetary hour and divides it up into relative minutes and seconds.
  *  It also calculates the current planetary ruler of the hour and of the day.
  */
-static void _planetary_time(movement_event_t event, movement_settings_t *settings, planetary_time_state_t *state) {
+static void _planetary_time(movement_event_t event, planetary_time_state_t *state) {
     char buf[14];
     char ruler[3];
     double night_hour_count = 0.0;
@@ -214,7 +214,7 @@ static void _planetary_time(movement_event_t event, movement_settings_t *setting
 
     // when current phase ends calculate the next phase
     if ( watch_utility_date_time_to_unix_time(state->scratch, 0) >= state->phase_end ) {
-        _planetary_solar_phase(settings, state);
+        _planetary_solar_phase(state);
         return;
     }
 
@@ -270,17 +270,15 @@ static void _planetary_time(movement_event_t event, movement_settings_t *setting
 
 // PUBLIC WATCH FACE FUNCTIONS ////////////////////////////////////////////////
 
-void planetary_time_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
+void planetary_time_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
-    (void) settings;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(planetary_time_state_t));
         memset(*context_ptr, 0, sizeof(planetary_time_state_t));
     }
 }
 
-void planetary_time_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void planetary_time_face_activate(void *context) {
     if (watch_tick_animation_is_running()) watch_stop_tick_animation();
 
 #if __EMSCRIPTEN__
@@ -297,21 +295,21 @@ void planetary_time_face_activate(movement_settings_t *settings, void *context)
     planetary_time_state_t *state = (planetary_time_state_t *)context;
     
     // calculate phase
-    _planetary_solar_phase(settings, state);
+    _planetary_solar_phase(state);
 }
 
-bool planetary_time_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool planetary_time_face_loop(movement_event_t event, void *context) {
     planetary_time_state_t *state = (planetary_time_state_t *)context;
 
     switch (event.event_type) {
         case EVENT_ACTIVATE:
-            _planetary_time(event, settings, state);
+            _planetary_time(event, state);
             if ( state->freq > 1 )
                 // for hours with shorter seconds let's increase the tick to not skip seconds in the display
                 movement_request_tick_frequency( 8 );
             break;
         case EVENT_TICK:
-            _planetary_time(event, settings, state);
+            _planetary_time(event, state);
             break;
         case EVENT_LIGHT_BUTTON_UP:
             state->ruler = (state->ruler + 1) % 3;
@@ -324,14 +322,13 @@ bool planetary_time_face_loop(movement_event_t event, movement_settings_t *setti
             watch_start_tick_animation(500);
             break;
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     return true;
 }
 
-void planetary_time_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void planetary_time_face_resign(void *context) {
     (void) context;
     movement_request_tick_frequency( 1 );
 }
index b7e8e807851aebf433c9f2daeb7f244728be88f6..1acdb11d30d32a15dd74f4269138b9b82a3fcc5b 100644 (file)
@@ -93,10 +93,10 @@ typedef struct {
     watch_date_time scratch;
 } planetary_time_state_t;
 
-void planetary_time_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void planetary_time_face_activate(movement_settings_t *settings, void *context);
-bool planetary_time_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void planetary_time_face_resign(movement_settings_t *settings, void *context);
+void planetary_time_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void planetary_time_face_activate(void *context);
+bool planetary_time_face_loop(movement_event_t event, void *context);
+void planetary_time_face_resign(void *context);
 
 #define planetary_time_face ((const watch_face_t){ \
     planetary_time_face_setup, \
index 79427019892e70a2f4d887eacb8ca014bb78c19d..56984307cce8e8c092d391b0875ad86c3d3d22a2 100644 (file)
@@ -104,8 +104,7 @@ static void display_dice_roll_animation(probability_state_t *state) {
 // ---------------------------
 // Standard watch face methods
 // ---------------------------
-void probability_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void probability_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(probability_state_t));
@@ -117,8 +116,7 @@ void probability_face_setup(movement_settings_t *settings, uint8_t watch_face_in
     #endif
 }
 
-void probability_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void probability_face_activate(void *context) {
     probability_state_t *state = (probability_state_t *)context;
 
     state->dice_sides = DEFAULT_DICE_SIDES;
@@ -126,8 +124,7 @@ void probability_face_activate(movement_settings_t *settings, void *context) {
     watch_display_string("PR", 0);
 }
 
-bool probability_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void) settings;
+bool probability_face_loop(movement_event_t event, void *context) {
     probability_state_t *state = (probability_state_t *)context;
 
     if (state->is_rolling && event.event_type != EVENT_TICK) {
@@ -167,14 +164,13 @@ bool probability_face_loop(movement_event_t event, movement_settings_t *settings
             watch_display_string("SLEEP ", 4);
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
     return true;
 }
 
-void probability_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void probability_face_resign(void *context) {
     (void) context;
 }
index b2530640efd5df91ca7bf81c5c7fea9cbe5f1775..6ce1b1f3dde7eea258c0d52b1f3e45cf8581ba14 100644 (file)
@@ -46,10 +46,10 @@ typedef struct {
     bool is_rolling;
 } probability_state_t;
 
-void probability_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void probability_face_activate(movement_settings_t *settings, void *context);
-bool probability_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void probability_face_resign(movement_settings_t *settings, void *context);
+void probability_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void probability_face_activate(void *context);
+bool probability_face_loop(movement_event_t event, void *context);
+void probability_face_resign(void *context);
 
 #define probability_face ((const watch_face_t){ \
     probability_face_setup, \
index 2141b69a1fe34b113ca85525357135775abb067f..1c29080cfaa14949d5b123c8287b988a99a77ebe 100644 (file)
@@ -134,8 +134,7 @@ static void pulsometer_cycle_calibration(pulsometer_state_t *pulsometer, int8_t
     pulsometer_display_calibration(pulsometer);
 }
 
-void pulsometer_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void pulsometer_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
 
     if (*context_ptr == NULL) {
@@ -149,8 +148,7 @@ void pulsometer_face_setup(movement_settings_t *settings, uint8_t watch_face_ind
     }
 }
 
-void pulsometer_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void pulsometer_face_activate(void *context) {
 
     pulsometer_state_t *pulsometer = context;
 
@@ -161,8 +159,7 @@ void pulsometer_face_activate(movement_settings_t *settings, void *context) {
     pulsometer_display_measurement(pulsometer);
 }
 
-bool pulsometer_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void) settings;
+bool pulsometer_face_loop(movement_event_t event, void *context) {
 
     pulsometer_state_t *pulsometer = (pulsometer_state_t *) context;
 
@@ -190,14 +187,13 @@ bool pulsometer_face_loop(movement_event_t event, movement_settings_t *settings,
             movement_move_to_face(0);
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
     return true;
 }
 
-void pulsometer_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void pulsometer_face_resign(void *context) {
     (void) context;
 }
index 5c1dae911a05d54438b0f2354942a349fe206b7b..78c906cf4332312187f423364e51ba97c6976b43 100644 (file)
 
 #include "movement.h"
 
-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);
+void pulsometer_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void pulsometer_face_activate(void *context);
+bool pulsometer_face_loop(movement_event_t event, void *context);
+void pulsometer_face_resign(void *context);
 
 #define pulsometer_face ((const watch_face_t){ \
     pulsometer_face_setup, \
index 3bbc147f6e0fe13bdb3c56dbe9c25c59b67a7aed..d070555a015314223ed23dc2aa6c6aead58ff270 100644 (file)
@@ -50,8 +50,7 @@ static void _get_entropy(randonaut_state_t *state);
 
 // MOVEMENT WATCH FACE FUNCTIONS //////////////////////////////////////////////
 
-void randonaut_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void randonaut_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(randonaut_state_t));
@@ -61,8 +60,7 @@ void randonaut_face_setup(movement_settings_t *settings, uint8_t watch_face_inde
     // Do any pin or peripheral setup here; this will be called whenever the watch wakes from deep sleep.
 }
 
-void randonaut_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void randonaut_face_activate(void *context) {
     randonaut_state_t *state = (randonaut_state_t *)context;
     _get_location_from_file(state);
     state->face.mode = 0;
@@ -72,7 +70,7 @@ void randonaut_face_activate(movement_settings_t *settings, void *context) {
     // Handle any tasks related to your watch face coming on screen.
 }
 
-bool randonaut_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool randonaut_face_loop(movement_event_t event, void *context) {
     randonaut_state_t *state = (randonaut_state_t *)context;
 
     switch (event.event_type) {
@@ -178,7 +176,7 @@ bool randonaut_face_loop(movement_event_t event, movement_settings_t *settings,
             // * EVENT_MODE_BUTTON_UP moves to the next watch face in the list
             // * EVENT_MODE_LONG_PRESS returns to the first watch face (or skips to the secondary watch face, if configured)
             // You can override any of these behaviors by adding a case for these events to this switch statement.
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     _randonaut_face_display(state);
@@ -192,8 +190,7 @@ bool randonaut_face_loop(movement_event_t event, movement_settings_t *settings,
     return true;
 }
 
-void randonaut_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void randonaut_face_resign(void *context) {
     (void) context;
 
     // handle any cleanup before your watch face goes off-screen.
index 2f18d45a79aeb6a41591114fd0b415ae6a58271b..72e4726196c9e868f95667e122124e64bbbeeb06 100644 (file)
@@ -96,10 +96,10 @@ typedef struct {
     char scratchpad[10];
 } randonaut_state_t;
 
-void randonaut_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void randonaut_face_activate(movement_settings_t *settings, void *context);
-bool randonaut_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void randonaut_face_resign(movement_settings_t *settings, void *context);
+void randonaut_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void randonaut_face_activate(void *context);
+bool randonaut_face_loop(movement_event_t event, void *context);
+void randonaut_face_resign(void *context);
 
 #define randonaut_face ((const watch_face_t){ \
     randonaut_face_setup, \
index 8ae80515dc818310b01174c4b8e25979c9530701..746ab39639983288cf2e963562e7caa2c146487e 100644 (file)
 #define RATEMETER_FACE_FREQUENCY_FACTOR (4ul) // refresh rate will be 2 to this power Hz (0 for 1 Hz, 2 for 4 Hz, etc.)
 #define RATEMETER_FACE_FREQUENCY (1 << RATEMETER_FACE_FREQUENCY_FACTOR)
 
-void ratemeter_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void ratemeter_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) *context_ptr = malloc(sizeof(ratemeter_state_t));
 }
 
-void ratemeter_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void ratemeter_face_activate(void *context) {
     memset(context, 0, sizeof(ratemeter_state_t));
 }
 
-bool ratemeter_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void) settings;
+bool ratemeter_face_loop(movement_event_t event, void *context) {
     ratemeter_state_t *ratemeter_state = (ratemeter_state_t *)context;
     char buf[14];
     switch (event.event_type) {
@@ -79,14 +76,13 @@ bool ratemeter_face_loop(movement_event_t event, movement_settings_t *settings,
             movement_move_to_face(0);
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
     return true;
 }
 
-void ratemeter_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void ratemeter_face_resign(void *context) {
     (void) context;
 }
index 4b10c0f92d1f91a5f2d13391e415ef45ddaf34fa..85ac255478e481154440a20ce42a6c35178d973c 100644 (file)
@@ -42,10 +42,10 @@ typedef struct {
     int16_t ticks;
 } ratemeter_state_t;
 
-void ratemeter_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void ratemeter_face_activate(movement_settings_t *settings, void *context);
-bool ratemeter_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void ratemeter_face_resign(movement_settings_t *settings, void *context);
+void ratemeter_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void ratemeter_face_activate(void *context);
+bool ratemeter_face_loop(movement_event_t event, void *context);
+void ratemeter_face_resign(void *context);
 
 #define ratemeter_face ((const watch_face_t){ \
     ratemeter_face_setup, \
index 4a191b7e7f7b11aa4ef025c795dec14ca31c0f95..03a75ec8956661b8ff5b28a0f616b02c04a24d3c 100644 (file)
@@ -30,8 +30,7 @@
 
 static void show_fn(calculator_state_t *state, uint8_t subsecond);
 
-void rpn_calculator_alt_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void rpn_calculator_alt_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
 
     if (*context_ptr == NULL) {
@@ -125,8 +124,7 @@ static void show_number(double num) {
 #define PUSH(x) (s->stack[++s->stack_size - 1] = x)
 #define POP() (s->stack[s->stack_size-- - 1])
 
-void rpn_calculator_alt_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void rpn_calculator_alt_face_activate(void *context) {
     calculator_state_t *s = (calculator_state_t *)context;
     s->min = s->max = NAN;
 }
@@ -344,9 +342,8 @@ static void show_stack_top(calculator_state_t *s) {
     }
 }
 
-bool rpn_calculator_alt_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool rpn_calculator_alt_face_loop(movement_event_t event, void *context) {
     calculator_state_t *s = (calculator_state_t *)context;
-    (void) settings;
 
     int proposed_stack_size;
 
@@ -410,7 +407,7 @@ bool rpn_calculator_alt_face_loop(movement_event_t event, movement_settings_t *s
         case EVENT_LOW_ENERGY_UPDATE:
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
@@ -419,8 +416,7 @@ bool rpn_calculator_alt_face_loop(movement_event_t event, movement_settings_t *s
     return true;
 }
 
-void rpn_calculator_alt_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void rpn_calculator_alt_face_resign(void *context) {
     (void) context;
 
     // handle any cleanup before your watch face goes off-screen.
index bb4fd7d0a1c6153797afea0eee6e199f11e6d998..4e74115a9231c8c70c4274f265b31e2f476268da 100644 (file)
@@ -79,10 +79,10 @@ typedef struct {
     enum calculator_mode mode;
 } calculator_state_t;
 
-void rpn_calculator_alt_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void rpn_calculator_alt_face_activate(movement_settings_t *settings, void *context);
-bool rpn_calculator_alt_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void rpn_calculator_alt_face_resign(movement_settings_t *settings, void *context);
+void rpn_calculator_alt_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void rpn_calculator_alt_face_activate(void *context);
+bool rpn_calculator_alt_face_loop(movement_event_t event, void *context);
+void rpn_calculator_alt_face_resign(void *context);
 
 #define rpn_calculator_alt_face ((const watch_face_t){ \
     rpn_calculator_alt_face_setup, \
index e1b2dfd83ca0df9858958bca42eb1cf3e289b8a2..2c5a8835ea6fecad5e4513c5dcadbcdc89596615 100644 (file)
@@ -232,8 +232,7 @@ static void draw(rpn_calculator_state_t *state, uint8_t subsecond) {
     watch_display_string(buf, 0);
 }
 
-void rpn_calculator_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void rpn_calculator_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(rpn_calculator_state_t));
@@ -245,15 +244,13 @@ void rpn_calculator_face_setup(movement_settings_t *settings, uint8_t watch_face
     // Do any pin or peripheral setup here; this will be called whenever the watch wakes from deep sleep.
 }
 
-void rpn_calculator_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void rpn_calculator_face_activate(void *context) {
     (void) context;
 
     // Handle any tasks related to your watch face coming on screen.
 }
 
-bool rpn_calculator_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void) settings;
+bool rpn_calculator_face_loop(movement_event_t event, void *context) {
 
     rpn_calculator_state_t *state = (rpn_calculator_state_t *)context;
 
@@ -333,7 +330,7 @@ bool rpn_calculator_face_loop(movement_event_t event, movement_settings_t *setti
         case EVENT_LOW_ENERGY_UPDATE:
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
@@ -342,8 +339,7 @@ bool rpn_calculator_face_loop(movement_event_t event, movement_settings_t *setti
     return true;
 }
 
-void rpn_calculator_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void rpn_calculator_face_resign(void *context) {
     (void) context;
 
     // handle any cleanup before your watch face goes off-screen.
index 57b59a27decd5bb39c1c09ee383796eafd05966a..a9daad61dd3b10cc1bbe306ac55524704050f06f 100644 (file)
@@ -64,10 +64,10 @@ typedef struct {
     uint8_t selection;
 } rpn_calculator_state_t;
 
-void rpn_calculator_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void rpn_calculator_face_activate(movement_settings_t *settings, void *context);
-bool rpn_calculator_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void rpn_calculator_face_resign(movement_settings_t *settings, void *context);
+void rpn_calculator_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void rpn_calculator_face_activate(void *context);
+bool rpn_calculator_face_loop(movement_event_t event, void *context);
+void rpn_calculator_face_resign(void *context);
 
 #define rpn_calculator_face ((const watch_face_t){ \
     rpn_calculator_face_setup, \
index 8d39fc3646f30db91334d8a4bbbf7ed2456a4ff7..32c6fa6fe6b9bac604ecb65af06781eba748d7cd 100644 (file)
@@ -33,7 +33,7 @@
 #define sl_SELECTIONS 6
 #define DEFAULT_MINUTES { 5,4,1,0,0,0 }
 
-static inline int32_t get_tz_offset(movement_settings_t *settings) {
+static inline int32_t get_tz_offset() {
     return movement_get_current_timezone_offset();
 }
 
@@ -62,8 +62,7 @@ static void counting(sailing_state_t *state) {
     watch_set_indicator(WATCH_INDICATOR_LAP);
 }
 
-static void draw(sailing_state_t *state, uint8_t subsecond, movement_settings_t *settings) {
-    (void) settings;
+static void draw(sailing_state_t *state, uint8_t subsecond) {
 
     char tmp[24];
     char buf[16];
@@ -152,7 +151,7 @@ static void draw(sailing_state_t *state, uint8_t subsecond, movement_settings_t
     watch_display_string(buf, 0);
 }
 
-static void ring(sailing_state_t *state, movement_settings_t *settings) {    
+static void ring(sailing_state_t *state) {    
 // if ring is called in background (while on another face), a button press can interrupt and cancel the execution.
 // To reduce the probability of cancelling all future alarms, the new alarm is set as soon as possible after calling ring.
     movement_cancel_background_task();
@@ -185,7 +184,7 @@ static void ring(sailing_state_t *state, movement_settings_t *settings) {
     beepflag++;
 }
 
-static void start(sailing_state_t *state, movement_settings_t *settings) {//gets called by starting / switching to next signal
+static void start(sailing_state_t *state) {//gets called by starting / switching to next signal
     while (beepseconds[beepflag] < state->minutes[state->index]*60) {
         state->index++;
     }
@@ -234,8 +233,7 @@ static void settings_increment(sailing_state_t *state) {
     return;
 }
 
-void sailing_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void sailing_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
 
     if (*context_ptr == NULL) {
@@ -248,8 +246,7 @@ void sailing_face_setup(movement_settings_t *settings, uint8_t watch_face_index,
     }
 }
 
-void sailing_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void sailing_face_activate(void *context) {
     sailing_state_t *state = (sailing_state_t *)context;
     if(state->mode == sl_running) {
         watch_date_time now = watch_rtc_get_date_time();
@@ -281,8 +278,7 @@ void sailing_face_activate(movement_settings_t *settings, void *context) {
 }
 
 
-bool sailing_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void) settings;
+bool sailing_face_loop(movement_event_t event, void *context) {
     sailing_state_t *state = (sailing_state_t *)context;
     switch (event.event_type) {
         case EVENT_ACTIVATE:
@@ -397,15 +393,14 @@ bool sailing_face_loop(movement_event_t event, movement_settings_t *settings, vo
             // don't light up every time light is hit
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
     return true;
 }
 
-void sailing_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void sailing_face_resign(void *context) {
     sailing_state_t *state = (sailing_state_t *)context;
     if (state->mode == sl_setting) {
         state->selection = 0;
index 5546f27550d4db8c53753ec8e3f55e6c00618f8c..b9a5cfaef0fed94cbe3581e507b1b06ded499152 100644 (file)
@@ -81,10 +81,10 @@ typedef struct {
 } sailing_state_t;
 
 
-void sailing_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void sailing_face_activate(movement_settings_t *settings, void *context);
-bool sailing_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void sailing_face_resign(movement_settings_t *settings, void *context);
+void sailing_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void sailing_face_activate(void *context);
+bool sailing_face_loop(movement_event_t event, void *context);
+void sailing_face_resign(void *context);
 
 #define sailing_face ((const watch_face_t){ \
     sailing_face_setup, \
index 3ce11f90335cd20c978effac9cf1b8f198aa8f85..6efbc52a90f8b0a5ea4c32d15731b6d4d5a33ce9 100644 (file)
@@ -61,8 +61,7 @@ static void ships_bell_draw(ships_bell_state_t *state) {
     watch_display_string(buf, 3);
 }
 
-void ships_bell_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void **context_ptr) {
-    (void) settings;
+void ships_bell_face_setup(uint8_t watch_face_index, void **context_ptr) {
     (void) watch_face_index;
 
     if (*context_ptr == NULL) {
@@ -71,8 +70,7 @@ void ships_bell_face_setup(movement_settings_t *settings, uint8_t watch_face_ind
     }
 }
 
-void ships_bell_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void ships_bell_face_activate(void *context) {
 
     ships_bell_state_t *state = (ships_bell_state_t *) context;
     if (state->bell_enabled) watch_set_indicator(WATCH_INDICATOR_BELL);
@@ -82,8 +80,7 @@ void ships_bell_face_activate(movement_settings_t *settings, void *context) {
     watch_set_colon();
 }
 
-bool ships_bell_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void) settings;
+bool ships_bell_face_loop(movement_event_t event, void *context) {
 
     ships_bell_state_t *state = (ships_bell_state_t *) context;
 
@@ -116,20 +113,18 @@ bool ships_bell_face_loop(movement_event_t event, movement_settings_t *settings,
             }
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
     return true;
 }
 
-void ships_bell_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void ships_bell_face_resign(void *context) {
     (void) context;
 }
 
-bool ships_bell_face_wants_background_task(movement_settings_t *settings, void *context) {
-    (void) settings;
+bool ships_bell_face_wants_background_task(void *context) {
 
     ships_bell_state_t *state = (ships_bell_state_t *) context;
     if (!state->bell_enabled) return false;
index 3a04b9384d2c1d823396bded952de48e683d16c8..7a17bd4d33373981a69b4647e18f6f19d82d0563 100644 (file)
@@ -51,11 +51,11 @@ typedef struct {
     uint8_t on_watch;
 } ships_bell_state_t;
 
-void ships_bell_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void ships_bell_face_activate(movement_settings_t *settings, void *context);
-bool ships_bell_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void ships_bell_face_resign(movement_settings_t *settings, void *context);
-bool ships_bell_face_wants_background_task(movement_settings_t *settings, void *context);
+void ships_bell_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void ships_bell_face_activate(void *context);
+bool ships_bell_face_loop(movement_event_t event, void *context);
+void ships_bell_face_resign(void *context);
+bool ships_bell_face_wants_background_task(void *context);
 
 #define ships_bell_face ((const watch_face_t){ \
     ships_bell_face_setup, \
index eb08f17ae218274dcff8e926c1ed0083eb350de0..41bc5c3d629f03465874ef1711f740df87a3b75f 100644 (file)
@@ -201,9 +201,8 @@ static void _simon_change_speed(simon_state_t *state){
   }
 }
 
-void simon_face_setup(movement_settings_t *settings, uint8_t watch_face_index,
+void simon_face_setup(uint8_t watch_face_index,
         void **context_ptr) {
-    (void)settings;
     (void)watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(simon_state_t));
@@ -220,7 +219,7 @@ void simon_face_setup(movement_settings_t *settings, uint8_t watch_face_index,
 #endif
 }
 
-void simon_face_activate(movement_settings_t *settings, void *context) {
+void simon_face_activate(void *context) {
   (void) settings;
   (void) context;
   simon_state_t *state = (simon_state_t *)context;
@@ -229,7 +228,7 @@ void simon_face_activate(movement_settings_t *settings, void *context) {
    _timer = 0;
 }
 
-bool simon_face_loop(movement_event_t event, movement_settings_t *settings,
+bool simon_face_loop(movement_event_t event,
         void *context) {
     simon_state_t *state = (simon_state_t *)context;
 
@@ -321,14 +320,13 @@ bool simon_face_loop(movement_event_t event, movement_settings_t *settings,
         case EVENT_LOW_ENERGY_UPDATE:
             break;
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     return true;
 }
 
-void simon_face_resign(movement_settings_t *settings, void *context) {
-    (void)settings;
+void simon_face_resign(void *context) {
     (void)context;
     watch_set_led_off();
     watch_set_buzzer_off();
index 44bc9f3c53c8723b31ab7f415783f4f787c1236a..63e8389521f23223cc2e1425980a0a295c7ddfe1 100644 (file)
@@ -90,10 +90,10 @@ typedef struct {
     SimonPlayingState playing_state;
 } simon_state_t;
 
-void simon_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void **context_ptr);
-void simon_face_activate(movement_settings_t *settings, void *context);
-bool simon_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void simon_face_resign(movement_settings_t *settings, void *context);
+void simon_face_setup(uint8_t watch_face_index, void **context_ptr);
+void simon_face_activate(void *context);
+bool simon_face_loop(movement_event_t event, void *context);
+void simon_face_resign(void *context);
 
 #define simon_face                                                             \
     ((const watch_face_t){                                                       \
index 53fdd87ddcc5b32cf6809e7c5f29374eddd60826..7c849cd4ea0735ad744ff0db1347314f001badee 100644 (file)
@@ -27,8 +27,7 @@
 #include <math.h>
 #include "simple_calculator_face.h"
 
-void simple_calculator_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void simple_calculator_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(simple_calculator_state_t));
@@ -46,8 +45,7 @@ static void reset_to_zero(calculator_number_t *number) {
     number->thousands = 0;
 }
 
-void simple_calculator_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void simple_calculator_face_activate(void *context) {
     simple_calculator_state_t *state = (simple_calculator_state_t *)context;
     state->placeholder = PLACEHOLDER_ONES;
     state->mode = MODE_ENTERING_FIRST_NUM;
@@ -266,7 +264,7 @@ static void reset_all(simple_calculator_state_t *state) {
     state->placeholder = PLACEHOLDER_ONES;
 }
 
-bool simple_calculator_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool simple_calculator_face_loop(movement_event_t event, void *context) {
     simple_calculator_state_t *state = (simple_calculator_state_t *)context;
     char display_string[10];
     char temp_display_string[10];  // Temporary buffer for blinking effect
@@ -451,14 +449,13 @@ bool simple_calculator_face_loop(movement_event_t event, movement_settings_t *se
             break;
 
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     return true;
 }
 
-void simple_calculator_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void simple_calculator_face_resign(void *context) {
     (void) context;
     movement_request_tick_frequency(1);
 }
index 1f77dc08839f2751e4f63c68cdd155505d10ae0e..8a8ea02049c270166343d048c804d884e18558bf 100644 (file)
@@ -128,10 +128,10 @@ typedef struct {
     calculator_placeholder_t placeholder;
 } simple_calculator_state_t;
 
-void simple_calculator_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void simple_calculator_face_activate(movement_settings_t *settings, void *context);
-bool simple_calculator_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void simple_calculator_face_resign(movement_settings_t *settings, void *context);
+void simple_calculator_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void simple_calculator_face_activate(void *context);
+bool simple_calculator_face_loop(movement_event_t event, void *context);
+void simple_calculator_face_resign(void *context);
 
 #define simple_calculator_face ((const watch_face_t){ \
     simple_calculator_face_setup, \
index 64431f9d18bacf145e55827643c725c40bc519bc..7e0003f3ced3ca6e2949baf8f01b6e130535d585 100644 (file)
@@ -34,8 +34,7 @@
 
 #define SIMPLE_COIN_FLIP_REQUIRE_LONG_PRESS_FOR_REFLIP true
 
-void simple_coin_flip_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void simple_coin_flip_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(simple_coin_flip_state_t));
@@ -43,8 +42,7 @@ void simple_coin_flip_face_setup(movement_settings_t *settings, uint8_t watch_fa
     }
 }
 
-void simple_coin_flip_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void simple_coin_flip_face_activate(void *context) {
     (void) context;
 }
 
@@ -74,7 +72,7 @@ static void animation_2() {
     watch_set_pixel(2, 4);
 }
 
-bool simple_coin_flip_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool simple_coin_flip_face_loop(movement_event_t event, void *context) {
     simple_coin_flip_state_t *state = (simple_coin_flip_state_t *)context;
 
     switch (event.event_type) {
@@ -126,14 +124,13 @@ bool simple_coin_flip_face_loop(movement_event_t event, movement_settings_t *set
             movement_move_to_face(0);
             break;
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     return true;
 }
 
-void simple_coin_flip_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void simple_coin_flip_face_resign(void *context) {
     (void) context;
 }
 
index f5e223b8151daa99ead3a739dfa45e238913e8b4..710acca5f89169828dc176dc736e560dd01a11b9 100644 (file)
@@ -45,10 +45,10 @@ typedef struct {
     uint8_t animation_frame;
 } simple_coin_flip_state_t;
 
-void simple_coin_flip_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void simple_coin_flip_face_activate(movement_settings_t *settings, void *context);
-bool simple_coin_flip_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void simple_coin_flip_face_resign(movement_settings_t *settings, void *context);
+void simple_coin_flip_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void simple_coin_flip_face_activate(void *context);
+bool simple_coin_flip_face_loop(movement_event_t event, void *context);
+void simple_coin_flip_face_resign(void *context);
 
 #define simple_coin_flip_face ((const watch_face_t){ \
     simple_coin_flip_face_setup, \
index df700640de5046a3e1185eacdf0fd3046c331a71..658387244b5729976761d862be4f0c7566411ce1 100644 (file)
@@ -40,8 +40,7 @@ static void smallchess_init_board(smallchess_face_state_t *state) {
     memset(state->moveable_dests, 0xff, sizeof(state->moveable_dests));
 }
 
-void smallchess_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void smallchess_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(smallchess_face_state_t));
@@ -54,8 +53,7 @@ void smallchess_face_setup(movement_settings_t *settings, uint8_t watch_face_ind
     }
 }
 
-void smallchess_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void smallchess_face_activate(void *context) {
     (void) context;
 }
 
@@ -463,8 +461,7 @@ static void _smallchess_handle_button_event(smallchess_face_state_t *state, move
     }
 }
 
-bool smallchess_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void) settings;
+bool smallchess_face_loop(movement_event_t event, void *context) {
     smallchess_face_state_t *state = (smallchess_face_state_t *)context;
 
     switch (event.event_type) {
@@ -490,15 +487,14 @@ bool smallchess_face_loop(movement_event_t event, movement_settings_t *settings,
         case EVENT_LIGHT_BUTTON_DOWN:
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
     return true;
 }
 
-void smallchess_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void smallchess_face_resign(void *context) {
     (void) context;
     watch_set_led_off();
 }
index 2eb0786ce765c732fa3c8fc1f5f8d560f5441254..97d8179e093fbaea8deb00d0ac6e1c05584e3280 100644 (file)
@@ -74,10 +74,10 @@ typedef struct {
     uint8_t ai_from_square, ai_to_square;
 } smallchess_face_state_t;
 
-void smallchess_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void smallchess_face_activate(movement_settings_t *settings, void *context);
-bool smallchess_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void smallchess_face_resign(movement_settings_t *settings, void *context);
+void smallchess_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void smallchess_face_activate(void *context);
+bool smallchess_face_loop(movement_event_t event, void *context);
+void smallchess_face_resign(void *context);
 
 #define smallchess_face ((const watch_face_t){ \
     smallchess_face_setup, \
index 66fe210eb26f7cef84b0017be3e30d50550ece0e..58139f4ec31c72f9c624baa05135947db954c4de 100644 (file)
@@ -122,15 +122,14 @@ static watch_date_time jde_to_date_time(double JDE) {
     return result;
 }
 
-static void calculate_datetimes(solstice_state_t *state, movement_settings_t *settings) {
+static void calculate_datetimes(solstice_state_t *state) {
     for (int i = 0; i < 4; i++) {
         // TODO: handle DST changes
         state->datetimes[i] = jde_to_date_time(calculate_solstice_equinox(2020 + state->year, i) + (movement_get_current_timezone_offset() / (3600.0*24.0)));
     }
 }
 
-void solstice_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void solstice_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(solstice_state_t));
@@ -150,8 +149,7 @@ void solstice_face_setup(movement_settings_t *settings, uint8_t watch_face_index
     }
 }
 
-void solstice_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void solstice_face_activate(void *context) {
     (void) context;
 }
 
@@ -162,7 +160,7 @@ static void show_main_screen(solstice_state_t *state) {
     watch_display_string(buf, 0);
 }
 
-static void show_date_time(movement_settings_t *settings, solstice_state_t *state) {
+static void show_date_time(solstice_state_t *state) {
     char buf[11];
     watch_date_time date_time = state->datetimes[state->index];
     if (!movement_clock_mode_24h()) {
@@ -179,12 +177,12 @@ static void show_date_time(movement_settings_t *settings, solstice_state_t *stat
     watch_display_string(buf, 0);
 }
 
-bool solstice_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool solstice_face_loop(movement_event_t event, void *context) {
     solstice_state_t *state = (solstice_state_t *)context;
 
     switch (event.event_type) {
         case EVENT_ALARM_LONG_PRESS:
-            show_date_time(settings, state);
+            show_date_time(state);
             break;
         case EVENT_LIGHT_BUTTON_UP:
             if (state->index == 0) {
@@ -223,14 +221,13 @@ bool solstice_face_loop(movement_event_t event, movement_settings_t *settings, v
             movement_move_to_face(0);
             break;
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     return true;
 }
 
-void solstice_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void solstice_face_resign(void *context) {
     (void) context;
 }
 
index ec537c098d7fbb33a9e459d56f18a6531bc1a49f..17e630d4ceca118147a19c638d316d099f6b11c7 100644 (file)
@@ -47,10 +47,10 @@ typedef struct {
     uint8_t index;
 } solstice_state_t;
 
-void solstice_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void solstice_face_activate(movement_settings_t *settings, void *context);
-bool solstice_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void solstice_face_resign(movement_settings_t *settings, void *context);
+void solstice_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void solstice_face_activate(void *context);
+bool solstice_face_loop(movement_event_t event, void *context);
+void solstice_face_resign(void *context);
 
 #define solstice_face ((const watch_face_t){ \
     solstice_face_setup, \
index 8e7e3941fb270cde4eab22449e6cf6a241f7b186..d4a0de792419764115f6a1ec40a7c8eb99f8a012 100644 (file)
@@ -123,7 +123,7 @@ void TC2_Handler(void) {
 
 #endif
 
-static inline void _button_beep(movement_settings_t *settings) {
+static inline void _button_beep() {
     // play a beep as confirmation for a button press (if applicable)
     if (movement_button_should_sound()) watch_buzzer_play_note(BUZZER_NOTE_C7, 50);
 }
@@ -202,8 +202,7 @@ static inline void _set_colon() {
     _colon = true;
 }
 
-void stock_stopwatch_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void stock_stopwatch_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(stock_stopwatch_state_t));
@@ -219,8 +218,7 @@ void stock_stopwatch_face_setup(movement_settings_t *settings, uint8_t watch_fac
     }
 }
 
-void stock_stopwatch_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void stock_stopwatch_face_activate(void *context) {
     (void) context;
     if (_is_running) {
         // The background task will keep the watch from entering low energy mode while the stopwatch is on screen.
@@ -228,7 +226,7 @@ void stock_stopwatch_face_activate(movement_settings_t *settings, void *context)
     }
 }
 
-bool stock_stopwatch_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool stock_stopwatch_face_loop(movement_event_t event, void *context) {
     stock_stopwatch_state_t *state = (stock_stopwatch_state_t *)context;
 
     // handle overflow of fast ticks
@@ -310,14 +308,13 @@ bool stock_stopwatch_face_loop(movement_event_t event, movement_settings_t *sett
             _draw();
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
     return true;
 }
 
-void stock_stopwatch_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void stock_stopwatch_face_resign(void *context) {
     (void) context;
     // cancel the keepalive task
     movement_cancel_background_task();
index 6796a8499a4328ae738785df150c0bc5cad4a6ca..349c166a4c6f1647560b36082ca4044dcd280f7b 100644 (file)
@@ -58,10 +58,10 @@ typedef struct {
     bool light_on_button;   // determines whether the light button actually triggers the led
 } stock_stopwatch_state_t;
 
-void stock_stopwatch_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void stock_stopwatch_face_activate(movement_settings_t *settings, void *context);
-bool stock_stopwatch_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void stock_stopwatch_face_resign(movement_settings_t *settings, void *context);
+void stock_stopwatch_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void stock_stopwatch_face_activate(void *context);
+bool stock_stopwatch_face_loop(movement_event_t event, void *context);
+void stock_stopwatch_face_resign(void *context);
 
 #if __EMSCRIPTEN__
 void em_cb_handler(void *userData);
index 9931e1c47ad206ba51dd5462ef1272960f4e2032..fc9550faa05f28985c29707d7b35179c00b54ef9 100644 (file)
@@ -35,8 +35,7 @@ static const watch_date_time distant_future = {
     .unit = {0, 0, 0, 1, 1, 63}
 };
 
-void stopwatch_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void stopwatch_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(stopwatch_state_t));
@@ -77,8 +76,7 @@ static void _stopwatch_face_update_display(stopwatch_state_t *stopwatch_state, b
     }
 }
 
-void stopwatch_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void stopwatch_face_activate(void *context) {
     if (watch_tick_animation_is_running()) watch_stop_tick_animation();
 
     stopwatch_state_t *stopwatch_state = (stopwatch_state_t *)context;
@@ -93,7 +91,7 @@ void stopwatch_face_activate(movement_settings_t *settings, void *context) {
     }
 }
 
-bool stopwatch_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool stopwatch_face_loop(movement_event_t event, void *context) {
     stopwatch_state_t *stopwatch_state = (stopwatch_state_t *)context;
 
     switch (event.event_type) {
@@ -158,14 +156,13 @@ bool stopwatch_face_loop(movement_event_t event, movement_settings_t *settings,
             }
             break;
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     return true;
 }
 
-void stopwatch_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void stopwatch_face_resign(void *context) {
     (void) context;
 
     // regardless of whether we're running or stopped, cancel the task
index 7bdf19c6528264b4b636b848c5a7cd9bc3d42dc4..e30562832955b8205062bd2f6269bd4d2715a4f5 100644 (file)
@@ -45,10 +45,10 @@ typedef struct {
     uint32_t seconds_counted;   // set this value when paused, and show that instead.
 } stopwatch_state_t;
 
-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);
+void stopwatch_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void stopwatch_face_activate(void *context);
+bool stopwatch_face_loop(movement_event_t event, void *context);
+void stopwatch_face_resign(void *context);
 
 #define stopwatch_face ((const watch_face_t){ \
     stopwatch_face_setup, \
index 5fd778898eefdbae4a3ba861464aaf9807a0707f..fa300cf9906bd004dce0f33f145182f073030104 100644 (file)
@@ -44,7 +44,7 @@ static void _sunrise_sunset_set_expiration(sunrise_sunset_state_t *state, watch_
     state->rise_set_expires = watch_utility_date_time_from_unix_time(timestamp + 60, 0);
 }
 
-static void _sunrise_sunset_face_update(movement_settings_t *settings, sunrise_sunset_state_t *state) {
+static void _sunrise_sunset_face_update(sunrise_sunset_state_t *state) {
     char buf[14];
     double rise, set, minutes, seconds;
     bool show_next_match = false;
@@ -291,8 +291,7 @@ static void _sunrise_sunset_face_advance_digit(sunrise_sunset_state_t *state) {
     }
 }
 
-void sunrise_sunset_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void sunrise_sunset_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(sunrise_sunset_state_t));
@@ -300,8 +299,7 @@ void sunrise_sunset_face_setup(movement_settings_t *settings, uint8_t watch_face
     }
 }
 
-void sunrise_sunset_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void sunrise_sunset_face_activate(void *context) {
     if (watch_tick_animation_is_running()) watch_stop_tick_animation();
 
 #if __EMSCRIPTEN__
@@ -326,12 +324,12 @@ void sunrise_sunset_face_activate(movement_settings_t *settings, void *context)
     state->working_longitude = _sunrise_sunset_face_struct_from_latlon(movement_location.bit.longitude);
 }
 
-bool sunrise_sunset_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool sunrise_sunset_face_loop(movement_event_t event, void *context) {
     sunrise_sunset_state_t *state = (sunrise_sunset_state_t *)context;
 
     switch (event.event_type) {
         case EVENT_ACTIVATE:
-            _sunrise_sunset_face_update(settings, state);
+            _sunrise_sunset_face_update(state);
             break;
         case EVENT_LOW_ENERGY_UPDATE:
         case EVENT_TICK:
@@ -343,7 +341,7 @@ bool sunrise_sunset_face_loop(movement_event_t event, movement_settings_t *setti
                 if (date_time.reg >= state->rise_set_expires.reg) {
                     // and on the off chance that this happened before EVENT_TIMEOUT snapped us back to rise/set 0, go back now
                     state->rise_index = 0;
-                    _sunrise_sunset_face_update(settings, state);
+                    _sunrise_sunset_face_update(state);
                 }
             } else {
                 _sunrise_sunset_face_update_settings_display(event, state);
@@ -364,7 +362,7 @@ bool sunrise_sunset_face_loop(movement_event_t event, movement_settings_t *setti
             }
             if (state->page == 0) {
                 movement_request_tick_frequency(1);
-                _sunrise_sunset_face_update(settings, state);
+                _sunrise_sunset_face_update(state);
             }
             break;
         case EVENT_LIGHT_LONG_PRESS:
@@ -374,7 +372,7 @@ bool sunrise_sunset_face_loop(movement_event_t event, movement_settings_t *setti
         case EVENT_LIGHT_BUTTON_UP:
             if (state->page == 0 && _location_count > 1) {
                 state->longLatToUse = (state->longLatToUse + 1) % _location_count;
-                _sunrise_sunset_face_update(settings, state);
+                _sunrise_sunset_face_update(state);
             }
             break;
         case EVENT_ALARM_BUTTON_UP:
@@ -383,14 +381,14 @@ bool sunrise_sunset_face_loop(movement_event_t event, movement_settings_t *setti
                 _sunrise_sunset_face_update_settings_display(event, context);
             } else {
                 state->rise_index = (state->rise_index + 1) % 2;
-                _sunrise_sunset_face_update(settings, state);
+                _sunrise_sunset_face_update(state);
             }
             break;
         case EVENT_ALARM_LONG_PRESS:
             if (state->page == 0) {
             if (state->longLatToUse != 0) {
                 state->longLatToUse = 0;
-                _sunrise_sunset_face_update(settings, state);
+                _sunrise_sunset_face_update(state);
                 break;
             }
                 state->page++;
@@ -403,7 +401,7 @@ bool sunrise_sunset_face_loop(movement_event_t event, movement_settings_t *setti
                 state->active_digit = 0;
                 state->page = 0;
                 _sunrise_sunset_face_update_location_register(state);
-                _sunrise_sunset_face_update(settings, state);
+                _sunrise_sunset_face_update(state);
             }
             break;
         case EVENT_TIMEOUT:
@@ -415,18 +413,17 @@ bool sunrise_sunset_face_loop(movement_event_t event, movement_settings_t *setti
                 state->page = 0;
                 state->rise_index = 0;
                 movement_request_tick_frequency(1);
-                _sunrise_sunset_face_update(settings, state);
+                _sunrise_sunset_face_update(state);
             }
             break;
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     return true;
 }
 
-void sunrise_sunset_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void sunrise_sunset_face_resign(void *context) {
     sunrise_sunset_state_t *state = (sunrise_sunset_state_t *)context;
     state->page = 0;
     state->active_digit = 0;
index df5fda5c128e4c2407889737c4b5d166dfa29672..133eed0282cd11de4f963c782b7961691a8e4d1e 100644 (file)
@@ -58,10 +58,10 @@ typedef struct {
     uint8_t longLatToUse;
 } sunrise_sunset_state_t;
 
-void sunrise_sunset_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void sunrise_sunset_face_activate(movement_settings_t *settings, void *context);
-bool sunrise_sunset_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void sunrise_sunset_face_resign(movement_settings_t *settings, void *context);
+void sunrise_sunset_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void sunrise_sunset_face_activate(void *context);
+bool sunrise_sunset_face_loop(movement_event_t event, void *context);
+void sunrise_sunset_face_resign(void *context);
 
 #define sunrise_sunset_face ((const watch_face_t){ \
     sunrise_sunset_face_setup, \
index 056ac845692ff9338d68994adb219afce2cdc419..84748b899d3f440d71a3f5679b13bba7d2c8b2c0 100644 (file)
@@ -38,8 +38,7 @@ static uint32_t _distance_from_struct(distance_digits_t dist_digits) {
     return retval;
 }
 
-void tachymeter_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void)settings;
+void tachymeter_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void)watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(tachymeter_state_t));
@@ -51,8 +50,7 @@ void tachymeter_face_setup(movement_settings_t *settings, uint8_t watch_face_ind
     }
 }
 
-void tachymeter_face_activate(movement_settings_t *settings, void *context) {
-    (void)settings;
+void tachymeter_face_activate(void *context) {
     (void)context;
     movement_request_tick_frequency(4); // 4Hz
 }
@@ -91,8 +89,7 @@ static void _tachymeter_face_totals_lcd(tachymeter_state_t *state, bool show_tim
     }
 }
 
-bool tachymeter_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void)settings;
+bool tachymeter_face_loop(movement_event_t event, void *context) {
     tachymeter_state_t *state = (tachymeter_state_t *)context;
     switch (event.event_type) {
         case EVENT_ACTIVATE:
@@ -254,7 +251,7 @@ bool tachymeter_face_loop(movement_event_t event, movement_settings_t *settings,
             // don't light up every time light is hit
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
     // return true if the watch can enter standby mode. If you are PWM'ing an LED or buzzing the buzzer here,
@@ -262,8 +259,7 @@ bool tachymeter_face_loop(movement_event_t event, movement_settings_t *settings,
     return true;
 }
 
-void tachymeter_face_resign(movement_settings_t *settings, void *context) {
-    (void)settings;
+void tachymeter_face_resign(void *context) {
     (void)context;
     // handle any cleanup before your watch face goes off-screen.
 }
index 3b23525f9a3e7b0c34c694b8f6dd2f529a76499a..98f96e25253d2f5b6dc670bce87839a55f52aaaf 100644 (file)
@@ -92,10 +92,10 @@ typedef struct {
     uint32_t total_speed;          // 3600 * 100 * distance / total_time
 } tachymeter_state_t;
 
-void tachymeter_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void tachymeter_face_activate(movement_settings_t *settings, void *context);
-bool tachymeter_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void tachymeter_face_resign(movement_settings_t *settings, void *context);
+void tachymeter_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void tachymeter_face_activate(void *context);
+bool tachymeter_face_loop(movement_event_t event, void *context);
+void tachymeter_face_resign(void *context);
 
 #define tachymeter_face ((const watch_face_t){ \
     tachymeter_face_setup, \
index 07b43023e61553862ecf9f904ca02bc1736d437b..75d59c86a14fcdd3e327f3015c7b64ded01f8804 100644 (file)
@@ -50,8 +50,7 @@ static const int16_t _tally_default[] = {
 
 #define TALLY_FACE_PRESETS_SIZE() (sizeof(_tally_default) / sizeof(int16_t))
 
-void tally_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void tally_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(tally_state_t));
@@ -63,8 +62,7 @@ void tally_face_setup(movement_settings_t *settings, uint8_t watch_face_index, v
     }
 }
 
-void tally_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void tally_face_activate(void *context) {
     (void) context;
     _quick_ticks_running = false;
 }
@@ -110,7 +108,7 @@ static bool tally_face_should_move_back(tally_state_t *state) {
     return state->tally_idx == _tally_default[state->tally_default_idx];
 }
 
-bool tally_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool tally_face_loop(movement_event_t event, void *context) {
     tally_state_t *state = (tally_state_t *)context;
     static bool using_led = false;
 
@@ -188,7 +186,7 @@ bool tally_face_loop(movement_event_t event, movement_settings_t *settings, void
             // ignore timeout
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
@@ -209,7 +207,6 @@ void print_tally(tally_state_t *state, bool sound_on) {
     watch_display_string(buf, 0);
 }
 
-void tally_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void tally_face_resign(void *context) {
     (void) context;
 }
index 80623f492f4ed20789e785b5423c972dabdd9b39..7b18a33bcd3127599258cea04381e047e2e1b718 100644 (file)
@@ -58,10 +58,10 @@ typedef struct {
 //#define TALLY_FACE_PRESETS_YUGIOH
 
 
-void tally_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void tally_face_activate(movement_settings_t *settings, void *context);
-bool tally_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void tally_face_resign(movement_settings_t *settings, void *context);
+void tally_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void tally_face_activate(void *context);
+bool tally_face_loop(movement_event_t event, void *context);
+void tally_face_resign(void *context);
 
 void print_tally(tally_state_t *state, bool sound_on);
 
index 44b01de4c25da94cb0ba3e915d88b1b5c871bf02..ae8194120318a068d2dc2c1db952489a2c3b01d5 100644 (file)
@@ -208,8 +208,7 @@ static void display_animation(tarot_state_t *state) {
 // ---------------------------
 // Standard watch face methods
 // ---------------------------
-void tarot_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void tarot_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(tarot_state_t));
@@ -221,8 +220,7 @@ void tarot_face_setup(movement_settings_t *settings, uint8_t watch_face_index, v
     #endif
 }
 
-void tarot_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void tarot_face_activate(void *context) {
     tarot_state_t *state = (tarot_state_t *)context;
 
     watch_display_string("TA", 0);
@@ -231,8 +229,7 @@ void tarot_face_activate(movement_settings_t *settings, void *context) {
     state->major_arcana_only = true;
 }
 
-bool tarot_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void) settings;
+bool tarot_face_loop(movement_event_t event, void *context) {
     tarot_state_t *state = (tarot_state_t *)context;
 
     if (state->is_picking && event.event_type != EVENT_TICK) {
@@ -288,14 +285,13 @@ bool tarot_face_loop(movement_event_t event, movement_settings_t *settings, void
             // don't light up every time light is hit
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
     return true;
 }
 
-void tarot_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void tarot_face_resign(void *context) {
     (void) context;
 }
index b48a7ae969fef57051138a963a337a2b4e6d4224..8c83d5187e47535817ca00ea7c1d782e8e939b3c 100644 (file)
@@ -73,10 +73,10 @@ typedef struct {
     bool is_picking;
 } tarot_state_t;
 
-void tarot_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void tarot_face_activate(movement_settings_t *settings, void *context);
-bool tarot_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void tarot_face_resign(movement_settings_t *settings, void *context);
+void tarot_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void tarot_face_activate(void *context);
+bool tarot_face_loop(movement_event_t event, void *context);
+void tarot_face_resign(void *context);
 
 #define tarot_face ((const watch_face_t){ \
     tarot_face_setup, \
index 6c6d1bd90623817b0c19554e967e8feba440597a..6825c78ed7201ce9d6fa11490719aa1d61e0d803 100644 (file)
@@ -40,10 +40,9 @@ static void tempchart_save(void) {
     filesystem_write_file("tempchart.ini", (char*)&tempchart_state, sizeof(tempchart_state));
 }
 
-void tempchart_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
+void tempchart_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     // These next two lines just silence the compiler warnings associated with unused parameters.
     // We have no use for the settings or the watch_face_index, so we make that explicit here.
-    (void) settings;
     (void) context_ptr;
     (void) watch_face_index;
     // At boot, context_ptr will be NULL indicating that we don't have anyplace to store our context.
@@ -58,9 +57,8 @@ void tempchart_face_setup(movement_settings_t *settings, uint8_t watch_face_inde
 
 }
 
-void tempchart_face_activate(movement_settings_t *settings, void *context) {
+void tempchart_face_activate(void *context) {
     // same as above: silence the warning, we don't need to check the settings.
-    (void) settings;
     (void) context;
 }
 
@@ -74,8 +72,7 @@ static void display(void) {
     watch_display_string(buf, 0);
 }
 
-bool tempchart_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void) settings;
+bool tempchart_face_loop(movement_event_t event, void *context) {
     (void) context;
 
     switch (event.event_type) {
@@ -122,23 +119,21 @@ bool tempchart_face_loop(movement_event_t event, movement_settings_t *settings,
             break;
 
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
     return true;
 }
 
-void tempchart_face_resign(movement_settings_t *settings, void *context) {
+void tempchart_face_resign(void *context) {
     // our watch face, like most watch faces, has nothing special to do when resigning.
     // watch faces that enable a peripheral or interact with a sensor may want to turn it off here.
-    (void) settings;
     (void) context;
 }
 
 //background freq correction
-bool tempchart_face_wants_background_task(movement_settings_t *settings, void *context) {
-    (void) settings;
+bool tempchart_face_wants_background_task(void *context) {
     (void) context;
     watch_date_time date_time = watch_rtc_get_date_time();
 
index 3c9a389fbfe44d1b7066873751330a8b7d32580a..db89d204896d20fa58dd38acf48722c4798e47fa 100644 (file)
 
 #include "movement.h"
 
-void tempchart_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void tempchart_face_activate(movement_settings_t *settings, void *context);
-bool tempchart_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void tempchart_face_resign(movement_settings_t *settings, void *context);
-bool tempchart_face_wants_background_task(movement_settings_t *settings, void *context);
+void tempchart_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void tempchart_face_activate(void *context);
+bool tempchart_face_loop(movement_event_t event, void *context);
+void tempchart_face_resign(void *context);
+bool tempchart_face_wants_background_task(void *context);
 
 
 #define tempchart_face ((const watch_face_t){ \
index 99b0f87fd9a64fdf3dfb22aa8f60d20a40765f6e..9e8caf8706869174b4b0ec6bc6dee89c5317a3d8 100644 (file)
@@ -205,8 +205,7 @@ static void _abort_quick_ticks() {
     }
 }
 
-void time_left_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void time_left_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(time_left_state_t));
@@ -230,8 +229,7 @@ void time_left_face_setup(movement_settings_t *settings, uint8_t watch_face_inde
     }
 }
 
-void time_left_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void time_left_face_activate(void *context) {
     time_left_state_t *state = (time_left_state_t *)context;
 
     // stash the current year, useful in birthday setting mode
@@ -244,8 +242,7 @@ void time_left_face_activate(movement_settings_t *settings, void *context) {
     state->birth_date_when_activated.reg = state->birth_date.reg;
 }
 
-bool time_left_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void) settings;
+bool time_left_face_loop(movement_event_t event, void *context) {
     time_left_state_t *state = (time_left_state_t *)context;
 
     switch (event.event_type) {
@@ -326,15 +323,14 @@ bool time_left_face_loop(movement_event_t event, movement_settings_t *settings,
             movement_move_to_face(0);
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
     return true;
 }
 
-void time_left_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void time_left_face_resign(void *context) {
     time_left_state_t *state = (time_left_state_t *)context;
 
     if (state->current_page >= TIME_LEFT_FACE_SETTINGS_STATE) _resume_setting(state);
index 805fd198e9af87d85856dbd4eb6d2e24bd92f624..8f20ca0ae75413d472b7d223382be9386afff1cb 100644 (file)
@@ -75,10 +75,10 @@ typedef struct {
     movement_birthdate_t target_date;
 } time_left_state_t;
 
-void time_left_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void time_left_face_activate(movement_settings_t *settings, void *context);
-bool time_left_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void time_left_face_resign(movement_settings_t *settings, void *context);
+void time_left_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void time_left_face_activate(void *context);
+bool time_left_face_loop(movement_event_t event, void *context);
+void time_left_face_resign(void *context);
 
 #define time_left_face ((const watch_face_t){ \
     time_left_face_setup, \
index 50b93ec985c520a2b734b6c8906b82326d31ef23..b993a615b043f1853149560f0500bd3b1e6f8677 100644 (file)
@@ -36,10 +36,6 @@ static const int8_t _sound_seq_start[] = {BUZZER_NOTE_C8, 2, 0};
 
 static uint8_t _beeps_to_play;    // temporary counter for ring signals playing
 
-static inline int32_t _get_tz_offset(movement_settings_t *settings) {
-    return movement_get_current_timezone_offset();
-}
-
 static void _signal_callback() {
     if (_beeps_to_play) {
         _beeps_to_play--;
@@ -47,10 +43,10 @@ static void _signal_callback() {
     }
 }
 
-static void _start(timer_state_t *state, movement_settings_t *settings, bool with_beep) {
+static void _start(timer_state_t *state, bool with_beep) {
     if (state->timers[state->current_timer].value == 0) return;
     watch_date_time now = watch_rtc_get_date_time();
-    state->now_ts = watch_utility_date_time_to_unix_time(now, _get_tz_offset(settings));
+    state->now_ts = watch_utility_date_time_to_unix_time(now, movement_get_current_timezone_offset());
     if (state->mode == pausing)
         state->target_ts = state->now_ts + state->paused_left;
     else
@@ -58,7 +54,7 @@ static void _start(timer_state_t *state, movement_settings_t *settings, bool wit
                                                           state->timers[state->current_timer].unit.hours, 
                                                           state->timers[state->current_timer].unit.minutes, 
                                                           state->timers[state->current_timer].unit.seconds);
-    watch_date_time target_dt = watch_utility_date_time_from_unix_time(state->target_ts, _get_tz_offset(settings));
+    watch_date_time target_dt = watch_utility_date_time_from_unix_time(state->target_ts, movement_get_current_timezone_offset());
     state->mode = running;
     movement_schedule_background_task_for_face(state->watch_face_index, target_dt);
     watch_set_indicator(WATCH_INDICATOR_BELL);
@@ -189,8 +185,7 @@ static inline bool _check_for_signal() {
     return false;
 }
 
-void timer_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void timer_face_setup(uint8_t watch_face_index, void ** context_ptr) {
 
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(timer_state_t));
@@ -203,14 +198,13 @@ void timer_face_setup(movement_settings_t *settings, uint8_t watch_face_index, v
     }
 }
 
-void timer_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void timer_face_activate(void *context) {
     timer_state_t *state = (timer_state_t *)context;
     watch_display_string("TR", 0);
     watch_set_colon();
     if(state->mode == running) {
         watch_date_time now = watch_rtc_get_date_time();
-        state->now_ts = watch_utility_date_time_to_unix_time(now, _get_tz_offset(settings));
+        state->now_ts = watch_utility_date_time_to_unix_time(now, movement_get_current_timezone_offset());
         watch_set_indicator(WATCH_INDICATOR_BELL);
     } else {
         state->pausing_seconds = 1;
@@ -218,8 +212,7 @@ void timer_face_activate(movement_settings_t *settings, void *context) {
     }
 }
 
-bool timer_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void) settings;
+bool timer_face_loop(movement_event_t event, void *context) {
     timer_state_t *state = (timer_state_t *)context;
     uint8_t subsecond = event.subsecond;
 
@@ -272,14 +265,14 @@ bool timer_face_loop(movement_event_t event, movement_settings_t *settings, void
                     movement_cancel_background_task();
                     break;
                 case pausing:
-                    _start(state, settings, false);
+                    _start(statemovement_get_current_timezone_offset(), false);
                     break;
                 case waiting: {
                     uint8_t last_timer = state->current_timer;
                     state->current_timer = (state->current_timer + 1) % TIMER_SLOTS;
                     _set_next_valid_timer(state);
                     // start the time immediately if there is only one valid timer slot
-                    if (last_timer == state->current_timer) _start(state, settings, true);
+                    if (last_timer == state->current_timer) _start(statemovement_get_current_timezone_offset(), true);
                     break;
                 }
                 case setting:
@@ -306,7 +299,7 @@ bool timer_face_loop(movement_event_t event, movement_settings_t *settings, void
             _beeps_to_play = 4;
             watch_buzzer_play_sequence((int8_t *)_sound_seq_beep, _signal_callback);
             _reset(state);
-            if (state->timers[state->current_timer].unit.repeat) _start(state, settings, false);
+            if (state->timers[state->current_timer].unit.repeat) _start(statemovement_get_current_timezone_offset(), false);
             break;
         case EVENT_ALARM_LONG_PRESS:
             switch(state->mode) {
@@ -326,7 +319,7 @@ bool timer_face_loop(movement_event_t event, movement_settings_t *settings, void
                     }
                     break;
                 case waiting:
-                    _start(state, settings, true);
+                    _start(statemovement_get_current_timezone_offset(), true);
                     break;
                 case pausing:
                 case running:
@@ -347,15 +340,14 @@ bool timer_face_loop(movement_event_t event, movement_settings_t *settings, void
             movement_move_to_face(0);
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
     return true;
 }
 
-void timer_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void timer_face_resign(void *context) {
     timer_state_t *state = (timer_state_t *)context;
     if (state->mode == setting) {
         state->settings_state = 0;
index 3302f125dcee69ec499f8aff0f769b7c1ebdef31..b59c95899731ed012dc1d191bb7eafa90c35897a 100644 (file)
@@ -86,10 +86,10 @@ typedef struct {
     bool quick_cycle : 1;
 } timer_state_t;
 
-void timer_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void timer_face_activate(movement_settings_t *settings, void *context);
-bool timer_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void timer_face_resign(movement_settings_t *settings, void *context);
+void timer_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void timer_face_activate(void *context);
+bool timer_face_loop(movement_event_t event, void *context);
+void timer_face_resign(void *context);
 
 #define timer_face ((const watch_face_t){ \
     timer_face_setup, \
index b4b7ae379e9b10b19c7d13ba0f6e070db605b1ac..6e9f6bbd88bba00260420fec6d4a2a6743418ccc 100644 (file)
 static uint8_t focus_min = 25;
 static uint8_t break_min = 5;
 
-static inline int32_t get_tz_offset(movement_settings_t *settings) {
-    return movement_get_current_timezone_offset();
-}
-
 static uint8_t get_length(tomato_state_t *state) {
     uint8_t length;
     if (state->kind == tomato_focus) {
@@ -45,14 +41,14 @@ static uint8_t get_length(tomato_state_t *state) {
     return length;
 }
 
-static void tomato_start(tomato_state_t *state, movement_settings_t *settings) {
+static void tomato_start(tomato_state_t *state) {
     watch_date_time now = watch_rtc_get_date_time();
     int8_t length = (int8_t) get_length(state);
 
     state->mode = tomato_run;
-    state->now_ts = watch_utility_date_time_to_unix_time(now, get_tz_offset(settings));
+    state->now_ts = watch_utility_date_time_to_unix_time(now, movement_get_current_timezone_offset());
     state->target_ts = watch_utility_offset_timestamp(state->now_ts, 0, length, 0);
-    watch_date_time target_dt = watch_utility_date_time_from_unix_time(state->target_ts, get_tz_offset(settings));
+    watch_date_time target_dt = watch_utility_date_time_from_unix_time(state->target_ts, movement_get_current_timezone_offset());
     movement_schedule_background_task(target_dt);
     watch_set_indicator(WATCH_INDICATOR_BELL);
 }
@@ -107,8 +103,7 @@ static void tomato_ring(tomato_state_t *state) {
     }
 }
 
-void tomato_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void tomato_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
 
     if (*context_ptr == NULL) {
@@ -122,18 +117,18 @@ void tomato_face_setup(movement_settings_t *settings, uint8_t watch_face_index,
     }
 }
 
-void tomato_face_activate(movement_settings_t *settings, void *context) {
+void tomato_face_activate(void *context) {
     tomato_state_t *state = (tomato_state_t *)context;
     if (state->mode == tomato_run) {
         watch_date_time now = watch_rtc_get_date_time();
-        state->now_ts = watch_utility_date_time_to_unix_time(now, get_tz_offset(settings));
+        state->now_ts = watch_utility_date_time_to_unix_time(now, movement_get_current_timezone_offset());
         watch_set_indicator(WATCH_INDICATOR_BELL);
     }
     watch_set_colon();
     state->visible = true;
 }
 
-bool tomato_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool tomato_face_loop(movement_event_t event, void *context) {
     tomato_state_t *state = (tomato_state_t *)context;
 
     switch (event.event_type) {
@@ -163,7 +158,7 @@ bool tomato_face_loop(movement_event_t event, movement_settings_t *settings, voi
                     tomato_reset(state);
                     break;
                 case tomato_ready:
-                    tomato_start(state, settings);
+                    tomato_start(state);
                     break;
             }
             tomato_draw(state);
@@ -180,17 +175,16 @@ bool tomato_face_loop(movement_event_t event, movement_settings_t *settings, voi
             movement_move_to_face(0);
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
     return true;
 }
 
-void tomato_face_resign(movement_settings_t *settings, void *context) {
+void tomato_face_resign(void *context) {
     tomato_state_t *state = (tomato_state_t *)context;
     state->visible = false;
-    (void) settings;
     (void) context;
 }
 
index 25f7db0e5d0e16c0a8903eb031d81ce2b921b28c..e06a7c8ce8371acd5374835085d32c1e597cfa74 100644 (file)
@@ -67,10 +67,10 @@ typedef struct {
     bool visible;
 } tomato_state_t;
 
-void tomato_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void tomato_face_activate(movement_settings_t *settings, void *context);
-bool tomato_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void tomato_face_resign(movement_settings_t *settings, void *context);
+void tomato_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void tomato_face_activate(void *context);
+bool tomato_face_loop(movement_event_t event, void *context);
+void tomato_face_resign(void *context);
 
 #define tomato_face ((const watch_face_t){ \
     tomato_face_setup, \
index cf6ca68042a6b1edbbdc9f58261a110f2c02c17e..28b99c9988728a5db173dc904f6f6bc3d68d0e4f 100644 (file)
@@ -44,9 +44,8 @@ static void _coin_animation(toss_up_state_t *state);
 
 // PUBLIC FUNCTIONS ///////////////////////////////////////////////////////////
 
-void toss_up_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
+void toss_up_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
-    (void) settings;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(toss_up_state_t));
         memset(*context_ptr, 0, sizeof(toss_up_state_t));
@@ -63,12 +62,11 @@ void toss_up_face_setup(movement_settings_t *settings, uint8_t watch_face_index,
     }
 }
 
-void toss_up_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void toss_up_face_activate(void *context) {
     (void) context;
 }
 
-bool toss_up_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool toss_up_face_loop(movement_event_t event, void *context) {
     toss_up_state_t *state = (toss_up_state_t *)context;
     uint8_t i = 0;
     switch (event.event_type) {
@@ -170,14 +168,13 @@ bool toss_up_face_loop(movement_event_t event, movement_settings_t *settings, vo
             _toss_up_face_display(state);
             break;
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     return true;
 }
 
-void toss_up_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void toss_up_face_resign(void *context) {
     (void) context;
 }
 
index cff340965f9a1f4c34afb56a1a9cc1f8f14345ca..d6a77d7f75c32d0f54e146fdc80028035b46ee0d 100644 (file)
@@ -95,10 +95,10 @@ typedef struct {
 uint32_t get_true_entropy(void);
 uint8_t divine_bit(void);
 uint8_t roll_dice(uint8_t sides);
-void toss_up_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void toss_up_face_activate(movement_settings_t *settings, void *context);
-bool toss_up_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void toss_up_face_resign(movement_settings_t *settings, void *context);
+void toss_up_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void toss_up_face_activate(void *context);
+bool toss_up_face_loop(movement_event_t event, void *context);
+void toss_up_face_resign(void *context);
 
 #define toss_up_face ((const watch_face_t){ \
     toss_up_face_setup, \
index 7fb45e564f9f78a94ebe779ecb158cd27090448d..c159f596f0d11f1aafc5cad1dee441df9e90e873 100644 (file)
@@ -157,12 +157,11 @@ static void totp_generate_and_display(totp_state_t *totp_state) {
     totp_display(totp_state);
 }
 
-static inline uint32_t totp_compute_base_timestamp(movement_settings_t *settings) {
+static inline uint32_t totp_compute_base_timestamp() {
     return watch_utility_date_time_to_unix_time(watch_rtc_get_date_time(), movement_get_current_timezone_offset());
 }
 
-void totp_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void totp_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
 
     totp_validate_key_lengths();
@@ -174,12 +173,11 @@ void totp_face_setup(movement_settings_t *settings, uint8_t watch_face_index, vo
     }
 }
 
-void totp_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void totp_face_activate(void *context) {
 
     totp_state_t *totp = (totp_state_t *) context;
 
-    totp->timestamp = totp_compute_base_timestamp(settings);
+    totp->timestamp = totp_compute_base_timestamp();
     totp->steps = 0;
     totp->current_code = 0;
     totp->current_index = 0;
@@ -189,8 +187,7 @@ void totp_face_activate(movement_settings_t *settings, void *context) {
     totp_generate_and_display(totp);
 }
 
-bool totp_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void) settings;
+bool totp_face_loop(movement_event_t event, void *context) {
 
     totp_state_t *totp_state = (totp_state_t *) context;
 
@@ -234,14 +231,13 @@ bool totp_face_loop(movement_event_t event, movement_settings_t *settings, void
             movement_illuminate_led();
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
     return true;
 }
 
-void totp_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void totp_face_resign(void *context) {
     (void) context;
 }
index acdcc8b10170db6478b529e37d1fdd779904e1d8..0dc1b8e6e2aeac129e2bce65e26ca037e249653f 100644 (file)
@@ -78,10 +78,10 @@ typedef struct {
     size_t current_decoded_key_length;
 } totp_state_t;
 
-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);
+void totp_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void totp_face_activate(void *context);
+bool totp_face_loop(movement_event_t event, void *context);
+void totp_face_resign(void *context);
 
 #define totp_face ((const watch_face_t){ \
     totp_face_setup, \
index 8823cbc907bc161fbd0cf1af46039abcadfc9250..439aca3f0e9a35423809cd89cfe9d04a0eb82dff 100644 (file)
@@ -189,8 +189,7 @@ static void totp_face_lfs_read_file(char *filename) {
     }
 }
 
-void totp_face_lfs_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void totp_face_lfs_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(totp_lfs_state_t));
@@ -241,8 +240,7 @@ static void totp_face_set_record(totp_lfs_state_t *totp_state, int i) {
     totp_state->steps = totp_state->timestamp / record->period;
 }
 
-void totp_face_lfs_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void totp_face_lfs_activate(void *context) {
     memset(context, 0, sizeof(totp_lfs_state_t));
     totp_lfs_state_t *totp_state = (totp_lfs_state_t *)context;
 
@@ -279,8 +277,7 @@ static void totp_face_display(totp_lfs_state_t *totp_state) {
     watch_display_string(buf, 0);
 }
 
-bool totp_face_lfs_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void) settings;
+bool totp_face_lfs_loop(movement_event_t event, void *context) {
 
     totp_lfs_state_t *totp_state = (totp_lfs_state_t *)context;
 
@@ -311,14 +308,13 @@ bool totp_face_lfs_loop(movement_event_t event, movement_settings_t *settings, v
             movement_illuminate_led();
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
     return true;
 }
 
-void totp_face_lfs_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void totp_face_lfs_resign(void *context) {
     (void) context;
 }
index 67dcd0b879e641664b28c65648b1fa819ffa3f13..16276a2efbba0884bf96fca56b164fcbb0674d7a 100644 (file)
@@ -61,10 +61,10 @@ typedef struct {
     uint8_t current_index;
 } totp_lfs_state_t;
 
-void totp_face_lfs_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void totp_face_lfs_activate(movement_settings_t *settings, void *context);
-bool totp_face_lfs_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void totp_face_lfs_resign(movement_settings_t *settings, void *context);
+void totp_face_lfs_setup(uint8_t watch_face_index, void ** context_ptr);
+void totp_face_lfs_activate(void *context);
+bool totp_face_lfs_loop(movement_event_t event, void *context);
+void totp_face_lfs_resign(void *context);
 
 #define totp_face_lfs ((const watch_face_t){ \
     totp_face_lfs_setup, \
index 8898397aea51bb2ee487af8a7bc437f26694fa4f..686de688531368b0dba79220126765b67fe9cf58 100644 (file)
@@ -64,8 +64,7 @@ static void draw(tuning_tones_state_t *state)
     watch_display_string(notes[state->note_ind].name, 8);
 }
 
-void tuning_tones_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void tuning_tones_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         tuning_tones_state_t *state = malloc(sizeof *state);
@@ -75,8 +74,7 @@ void tuning_tones_face_setup(movement_settings_t *settings, uint8_t watch_face_i
     }
 }
 
-void tuning_tones_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void tuning_tones_face_activate(void *context) {
     (void) context;
 }
 
@@ -89,7 +87,7 @@ static void update_buzzer(const tuning_tones_state_t *state)
     }
 }
 
-bool tuning_tones_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool tuning_tones_face_loop(movement_event_t event, void *context) {
     tuning_tones_state_t *state = (tuning_tones_state_t *)context;
 
     switch (event.event_type) {
@@ -123,14 +121,13 @@ bool tuning_tones_face_loop(movement_event_t event, movement_settings_t *setting
         case EVENT_LOW_ENERGY_UPDATE:
             break;
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     return !state->playing;
 }
 
-void tuning_tones_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void tuning_tones_face_resign(void *context) {
     tuning_tones_state_t *state = (tuning_tones_state_t *)context;
 
     if (state->playing) {
index d6e3495e8bc0d89bcd405f65ae6d0c4bf376bf27..08672a547c75262a45a9f55e00ea6586d500d98e 100644 (file)
@@ -40,10 +40,10 @@ typedef struct {
     size_t note_ind;
 } tuning_tones_state_t;
 
-void tuning_tones_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void tuning_tones_face_activate(movement_settings_t *settings, void *context);
-bool tuning_tones_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void tuning_tones_face_resign(movement_settings_t *settings, void *context);
+void tuning_tones_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void tuning_tones_face_activate(void *context);
+bool tuning_tones_face_loop(movement_event_t event, void *context);
+void tuning_tones_face_resign(void *context);
 
 #define tuning_tones_face ((const watch_face_t){ \
     tuning_tones_face_setup, \
index 7926256380d1b6bea3925fd9753aeb6a3916df96..1829aee43e124a56502e064175de0a088469b28a 100644 (file)
@@ -33,8 +33,7 @@
 //
 
 static
-void _wake_face_update_display(movement_settings_t *settings, wake_face_state_t *state) {
-    (void) settings;
+void _wake_face_update_display(wake_face_state_t *state) {
     uint8_t hour = state->hour;
 
     watch_clear_display();
@@ -60,8 +59,7 @@ void _wake_face_update_display(movement_settings_t *settings, wake_face_state_t
 // Exported
 //
 
-void wake_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void **context_ptr) {
-    (void) settings;
+void wake_face_setup(uint8_t watch_face_index, void **context_ptr) {
     (void) watch_face_index;
 
     if (*context_ptr == NULL) {
@@ -75,17 +73,14 @@ void wake_face_setup(movement_settings_t *settings, uint8_t watch_face_index, vo
     }
 }
 
-void wake_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void wake_face_activate(void *context) {
     (void) context;
 }
-void wake_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void wake_face_resign(void *context) {
     (void) context;
 }
 
-bool wake_face_wants_background_task(movement_settings_t *settings, void *context) {
-    (void) settings;
+bool wake_face_wants_background_task(void *context) {
     wake_face_state_t *state = (wake_face_state_t *)context;
 
     bool rc = false;
@@ -103,30 +98,29 @@ bool wake_face_wants_background_task(movement_settings_t *settings, void *contex
     return rc;
 }
 
-bool wake_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void) settings;
+bool wake_face_loop(movement_event_t event, void *context) {
     wake_face_state_t *state = (wake_face_state_t *)context;
 
     switch (event.event_type) {
     case EVENT_ACTIVATE:
     case EVENT_TICK:
-        _wake_face_update_display(settings, state);
+        _wake_face_update_display(state);
         break;
     case EVENT_LIGHT_BUTTON_UP:
         state->hour = (state->hour + 1) % 24;
-        _wake_face_update_display(settings, state);
+        _wake_face_update_display(state);
         break;
     case EVENT_LIGHT_LONG_PRESS:
         state->hour = (state->hour + 6) % 24;
-        _wake_face_update_display(settings, state);
+        _wake_face_update_display(state);
         break;
     case EVENT_ALARM_BUTTON_UP:
         state->minute = (state->minute + 10) % 60;
-        _wake_face_update_display(settings, state);
+        _wake_face_update_display(state);
         break;
     case EVENT_ALARM_LONG_PRESS:
         state->mode ^= 1;
-        _wake_face_update_display(settings, state);
+        _wake_face_update_display(state);
         break;
     case EVENT_BACKGROUND_TASK:
         movement_play_alarm();
@@ -141,7 +135,7 @@ bool wake_face_loop(movement_event_t event, movement_settings_t *settings, void
         // don't light up every time light is hit
         break;
     default:
-        movement_default_loop_handler(event, settings);
+        movement_default_loop_handler(event);
         break;
     }
 
index b4a25a9cc3ce752bffa03a4f2f2ad162dc35575e..72606afd64a752de8b884e8969e387d0d6f860d8 100644 (file)
@@ -48,11 +48,11 @@ typedef struct {
     uint32_t mode : 1;
 } wake_face_state_t;
 
-void wake_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void **context_ptr);
-void wake_face_activate(movement_settings_t *settings, void *context);
-bool wake_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void wake_face_resign(movement_settings_t *settings, void *context);
-bool wake_face_wants_background_task(movement_settings_t *settings, void *context);
+void wake_face_setup(uint8_t watch_face_index, void **context_ptr);
+void wake_face_activate(void *context);
+bool wake_face_loop(movement_event_t event, void *context);
+void wake_face_resign(void *context);
+bool wake_face_wants_background_task(void *context);
 
 #define wake_face ((const watch_face_t){ \
     wake_face_setup, \
index 154a5682f63d6aa4a04d59dd34ff879b6e4c4430..ce9777b24b605b36690ec60977fa5d0169e09e93 100644 (file)
@@ -10,11 +10,10 @@ static bool _alarm_button_press;
 static bool _light_button_press;
 
 
-void wareki_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
+void wareki_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     
     //printf("wareki_setup() \n");
-    (void) settings;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(wareki_state_t));
         memset(*context_ptr, 0, sizeof(wareki_state_t));
@@ -53,11 +52,10 @@ static void draw_year_and_wareki(wareki_state_t *state) {
 }
 
 
-void wareki_activate(movement_settings_t *settings, void *context) {
+void wareki_activate(void *context) {
 
     //printf("wareki_activate() \n");
 
-    (void) settings;
     wareki_state_t *state = (wareki_state_t *)context;
 
     if (watch_tick_animation_is_running()) watch_stop_tick_animation();
@@ -101,7 +99,7 @@ void subYear(wareki_state_t* state,int count){
 }
 
 
-bool wareki_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool wareki_loop(movement_event_t event, void *context) {
     wareki_state_t *state = (wareki_state_t *)context;
 
     state->real_year = watch_rtc_get_date_time().unit.year + WATCH_RTC_REFERENCE_YEAR;
@@ -208,14 +206,13 @@ bool wareki_loop(movement_event_t event, movement_settings_t *settings, void *co
             // * EVENT_MODE_BUTTON_UP moves to the next watch face in the list
             // * EVENT_MODE_LONG_PRESS returns to the first watch face (or skips to the secondary watch face, if configured)
             // You can override any of these behaviors by adding a case for these events to this switch statement.
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     return true;
 }
 
-void wareki_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void wareki_resign(void *context) {
     (void) context;
 }
 
index a07f3f684d0793c785a31eb6bb39f2822b710dc4..4dffc46d8ab8bf4e383ef521797c33d49a1510d5 100644 (file)
@@ -15,10 +15,10 @@ typedef struct {
 } wareki_state_t;
 
 
-void wareki_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void wareki_activate(movement_settings_t *settings, void *context);
-bool wareki_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void wareki_resign(movement_settings_t *settings, void *context);
+void wareki_setup(uint8_t watch_face_index, void ** context_ptr);
+void wareki_activate(void *context);
+bool wareki_loop(movement_event_t event, void *context);
+void wareki_resign(void *context);
 void addYear(wareki_state_t* state,int count);
 void subYear(wareki_state_t* state,int count);
 
index 8381cec4f1fd30a891d99fde8f3f3eda70f40618..cae36eb406551c6464d49e893bd8887effeb07cf 100644 (file)
@@ -476,8 +476,7 @@ static void insert_random_guess(wordle_state_t *state) {
 }
 #endif
 
-void wordle_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void wordle_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(wordle_state_t));
@@ -490,8 +489,7 @@ void wordle_face_setup(movement_settings_t *settings, uint8_t watch_face_index,
     // Do any pin or peripheral setup here; this will be called whenever the watch wakes from deep sleep.
 }
 
-void wordle_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void wordle_face_activate(void *context) {
     wordle_state_t *state = (wordle_state_t *)context;
 #if WORDLE_USE_DAILY_STREAK != 0
     uint32_t now = get_day_unix_time();
@@ -511,7 +509,7 @@ void wordle_face_activate(movement_settings_t *settings, void *context) {
     display_title(state);
 }
 
-bool wordle_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool wordle_face_loop(movement_event_t event, void *context) {
     wordle_state_t *state = (wordle_state_t *)context;
 
     switch (event.event_type) {
@@ -590,13 +588,12 @@ bool wordle_face_loop(movement_event_t event, movement_settings_t *settings, voi
                 display_title(state);
             break;
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
     return true;
 }
 
-void wordle_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void wordle_face_resign(void *context) {
     (void) context;
 }
 
index f390e736a2c32695755ed2c1a3ba7fa6494d1137..5cc2f09a866de55208dc6f201b6ecaec10963b70 100644 (file)
@@ -132,10 +132,10 @@ typedef struct {
     uint32_t day_last_game_started;
 } wordle_state_t;
 
-void wordle_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void wordle_face_activate(movement_settings_t *settings, void *context);
-bool wordle_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void wordle_face_resign(movement_settings_t *settings, void *context);
+void wordle_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void wordle_face_activate(void *context);
+bool wordle_face_loop(movement_event_t event, void *context);
+void wordle_face_resign(void *context);
 
 #define wordle_face ((const watch_face_t){ \
     wordle_face_setup, \
index 5deeb623c1da89ecdcd15ab91e19e14491daa909..5211271939f39463229dc077aefb8ad0887cd1c4 100644 (file)
@@ -26,8 +26,7 @@
 #include <string.h>
 #include "beeps_face.h"
 
-void beeps_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void beeps_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(beeps_state_t));
@@ -36,8 +35,7 @@ void beeps_face_setup(movement_settings_t *settings, uint8_t watch_face_index, v
     }
 }
 
-void beeps_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void beeps_face_activate(void *context) {
     (void) context;
 }
 
@@ -48,7 +46,7 @@ static void _beep_face_update_lcd(beeps_state_t *state) {
     watch_display_string(buf, 0);
 }
 
-bool beeps_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool beeps_face_loop(movement_event_t event, void *context) {
     beeps_state_t *state = (beeps_state_t *)context;
 
     switch (event.event_type) {
@@ -237,13 +235,12 @@ bool beeps_face_loop(movement_event_t event, movement_settings_t *settings, void
             }
             break;
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
     return true;
 }
 
-void beeps_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void beeps_face_resign(void *context) {
     (void) context;
 }
 
index 73606fdbe10a78aac9ea168a7e480725b065fb50..5e44c9079782769b9877ed44ae42292b34749e1b 100644 (file)
@@ -44,10 +44,10 @@ typedef struct {
     uint8_t frequency;
 } beeps_state_t;
 
-void beeps_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void beeps_face_activate(movement_settings_t *settings, void *context);
-bool beeps_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void beeps_face_resign(movement_settings_t *settings, void *context);
+void beeps_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void beeps_face_activate(void *context);
+bool beeps_face_loop(movement_event_t event, void *context);
+void beeps_face_resign(void *context);
 
 #define beeps_face ((const watch_face_t){ \
     beeps_face_setup, \
index 21bbc793a8627b2a0f879a57b7bd2780e47dbaae..833362edade52fe3c1ac69511b5af19e0bf49e84 100644 (file)
 #include "character_set_face.h"
 #include "watch.h"
 
-void character_set_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void character_set_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) *context_ptr = malloc(sizeof(char));
 }
 
-void character_set_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void character_set_face_activate(void *context) {
     char *c = (char *)context;
     *c = '@';
     movement_request_tick_frequency(0);
 }
 
-bool character_set_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void) settings;
+bool character_set_face_loop(movement_event_t event, void *context) {
     char *c = (char *)context;
     char buf[11];
     switch (event.event_type) {
@@ -57,14 +54,13 @@ bool character_set_face_loop(movement_event_t event, movement_settings_t *settin
             movement_move_to_face(0);
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
     return true;
 }
 
-void character_set_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void character_set_face_resign(void *context) {
     (void) context;
 }
index 2fac26ad52cfd4f3ed34060229aad8a9d8613336..b7c4c26bf35186fc995cf6a3cfefac33988dc205 100644 (file)
 
 #include "movement.h"
 
-void character_set_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void character_set_face_activate(movement_settings_t *settings, void *context);
-bool character_set_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void character_set_face_resign(movement_settings_t *settings, void *context);
+void character_set_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void character_set_face_activate(void *context);
+bool character_set_face_loop(movement_event_t event, void *context);
+void character_set_face_resign(void *context);
 
 #define character_set_face ((const watch_face_t){ \
     character_set_face_setup, \
index 5c6990187312f17e8ec3e7021e78634942031d2b..84e16705545f25f47e7e92d444866cfc648483ac 100644 (file)
@@ -96,8 +96,7 @@ static uint8_t short_data[] = {
 static uint8_t *nanosec_buffer = 0;
 static uint16_t nanosec_buffer_size = 0;
 
-void chirpy_demo_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void **context_ptr) {
-    (void)settings;
+void chirpy_demo_face_setup(uint8_t watch_face_index, void **context_ptr) {
     (void)watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(chirpy_demo_state_t));
@@ -107,8 +106,7 @@ void chirpy_demo_face_setup(movement_settings_t *settings, uint8_t watch_face_in
     // Do any pin or peripheral setup here; this will be called whenever the watch wakes from deep sleep.
 }
 
-void chirpy_demo_face_activate(movement_settings_t *settings, void *context) {
-    (void)settings;
+void chirpy_demo_face_activate(void *context) {
     chirpy_demo_state_t *state = (chirpy_demo_state_t *)context;
 
     memset(context, 0, sizeof(chirpy_demo_state_t));
@@ -254,8 +252,7 @@ static void _cdm_setup_chirp(chirpy_demo_state_t *state) {
     state->tick_state.tick_fun = _cdf_countdown_tick;
 }
 
-bool chirpy_demo_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void)settings;
+bool chirpy_demo_face_loop(movement_event_t event, void *context) {
     chirpy_demo_state_t *state = (chirpy_demo_state_t *)context;
 
     switch (event.event_type) {
@@ -323,8 +320,7 @@ bool chirpy_demo_face_loop(movement_event_t event, movement_settings_t *settings
         return true;
 }
 
-void chirpy_demo_face_resign(movement_settings_t *settings, void *context) {
-    (void)settings;
+void chirpy_demo_face_resign(void *context) {
     (void)context;
 
     if (nanosec_buffer != 0) {
index 90a6133b17b1340e3b082f2470348f2ee6cf2a9f..a3ada8d8951c632ec0a4d45365f747a4cda47fe5 100644 (file)
 
 #include "movement.h"
 
-void chirpy_demo_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void chirpy_demo_face_activate(movement_settings_t *settings, void *context);
-bool chirpy_demo_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void chirpy_demo_face_resign(movement_settings_t *settings, void *context);
+void chirpy_demo_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void chirpy_demo_face_activate(void *context);
+bool chirpy_demo_face_loop(movement_event_t event, void *context);
+void chirpy_demo_face_resign(void *context);
 
 #define chirpy_demo_face ((const watch_face_t){ \
     chirpy_demo_face_setup, \
index 0587a06bd8d5efa4b857cfcd44b5177c18db06ac..e423b7de231cc3f49e89352e1312092f28263685 100644 (file)
@@ -43,8 +43,7 @@ typedef enum {
     DEMO_FACE_NUM_FACES
 } demo_face_index_t;
 
-void demo_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void demo_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(demo_face_index_t));
@@ -52,8 +51,7 @@ void demo_face_setup(movement_settings_t *settings, uint8_t watch_face_index, vo
     }
 }
 
-void demo_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void demo_face_activate(void *context) {
     (void) context;
     movement_request_tick_frequency(0);
     // ensure the watch never enters low energy mode
@@ -61,8 +59,7 @@ void demo_face_activate(movement_settings_t *settings, void *context) {
     movement_set_backlight_dwell(3);
 }
 
-bool demo_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void) settings;
+bool demo_face_loop(movement_event_t event, void *context) {
     demo_face_index_t *screen = (demo_face_index_t *)context;
     switch (event.event_type) {
         case EVENT_ALARM_BUTTON_UP:
@@ -123,14 +120,13 @@ bool demo_face_loop(movement_event_t event, movement_settings_t *settings, void
             // ignore timeout
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
     return true;
 }
 
-void demo_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void demo_face_resign(void *context) {
     (void) context;
 }
index 669f3872f4de05d8b1c3f3842520b7d2731a12cc..ec336e5b52874da3097b08351847cf4845f68082 100644 (file)
 
 #include "movement.h"
 
-void demo_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void demo_face_activate(movement_settings_t *settings, void *context);
-bool demo_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void demo_face_resign(movement_settings_t *settings, void *context);
+void demo_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void demo_face_activate(void *context);
+bool demo_face_loop(movement_event_t event, void *context);
+void demo_face_resign(void *context);
 
 #define demo_face ((const watch_face_t){ \
     demo_face_setup, \
index 17457177c079830fc7a835d61a28b2472d7adf1c..916f135324ee2b32bb3014ca04e4bcf7652f4b07 100644 (file)
@@ -69,8 +69,7 @@ static void _disable_output() {
     while (RTC->MODE2.SYNCBUSY.bit.ENABLE);
 }
 
-void frequency_correction_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void frequency_correction_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(frequency_correction_state_t));
@@ -79,14 +78,12 @@ void frequency_correction_face_setup(movement_settings_t *settings, uint8_t watc
     }
 }
 
-void frequency_correction_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void frequency_correction_face_activate(void *context) {
     frequency_correction_state_t *state = (frequency_correction_state_t *)context;
     _enable_output(state->period_event_output);
 }
 
-bool frequency_correction_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void) settings;
+bool frequency_correction_face_loop(movement_event_t event, void *context) {
     frequency_correction_state_t *state = (frequency_correction_state_t *)context;
     int8_t freqcorr;
 
@@ -123,15 +120,14 @@ bool frequency_correction_face_loop(movement_event_t event, movement_settings_t
             watch_start_tick_animation(500);
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
     return true;
 }
 
-void frequency_correction_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void frequency_correction_face_resign(void *context) {
     (void) context;
 
     _disable_output();
@@ -139,27 +135,23 @@ void frequency_correction_face_resign(movement_settings_t *settings, void *conte
 
 #else
 
-void frequency_correction_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void frequency_correction_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     (void) context_ptr;
 }
 
-void frequency_correction_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void frequency_correction_face_activate(void *context) {
     (void) context;
 }
 
-bool frequency_correction_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void) settings;
+bool frequency_correction_face_loop(movement_event_t event, void *context) {
     (void) context;
     (void) event;
 
     return true;
 }
 
-void frequency_correction_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void frequency_correction_face_resign(void *context) {
     (void) context;
 }
 
index 0b9c435d909d5e4078c4edfe6ba14380bdc4e23e..7d25866a9df902b803e68822e57fbe7832812283 100644 (file)
@@ -43,10 +43,10 @@ typedef struct {
     uint8_t period_event_output;
 } frequency_correction_state_t;
 
-void frequency_correction_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void frequency_correction_face_activate(movement_settings_t *settings, void *context);
-bool frequency_correction_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void frequency_correction_face_resign(movement_settings_t *settings, void *context);
+void frequency_correction_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void frequency_correction_face_activate(void *context);
+bool frequency_correction_face_loop(movement_event_t event, void *context);
+void frequency_correction_face_resign(void *context);
 
 #define frequency_correction_face ((const watch_face_t){ \
     frequency_correction_face_setup, \
index 97af2579834780e72d1b288330fdbf7d7c3720d8..39ab8bc16c8f888df7bffe4a56c0f1fe2fc724f9 100644 (file)
 #include "hello_there_face.h"
 #include "watch.h"
 
-void hello_there_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
+void hello_there_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     // These next two lines just silence the compiler warnings associated with unused parameters.
     // We have no use for the settings or the watch_face_index, so we make that explicit here.
-    (void) settings;
     (void) watch_face_index;
     // At boot, context_ptr will be NULL indicating that we don't have anyplace to store our context.
     if (*context_ptr == NULL) {
@@ -39,9 +38,8 @@ void hello_there_face_setup(movement_settings_t *settings, uint8_t watch_face_in
     }
 }
 
-void hello_there_face_activate(movement_settings_t *settings, void *context) {
+void hello_there_face_activate(void *context) {
     // same as above: silence the warning, we don't need to check the settings.
-    (void) settings;
     // we do however need to set some things in our context. Here we cast it to the correct type...
     hello_there_state_t *state = (hello_there_state_t *)context;
     // ...and set the initial state of our watch face. We start out displaying the word 'Hello',
@@ -50,8 +48,7 @@ void hello_there_face_activate(movement_settings_t *settings, void *context) {
     state->animating = true;
 }
 
-bool hello_there_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void) settings;
+bool hello_there_face_loop(movement_event_t event, void *context) {
     hello_there_state_t *state = (hello_there_state_t *)context;
 
     switch (event.event_type) {
@@ -87,16 +84,15 @@ bool hello_there_face_loop(movement_event_t event, movement_settings_t *settings
             movement_move_to_face(0);
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
     return true;
 }
 
-void hello_there_face_resign(movement_settings_t *settings, void *context) {
+void hello_there_face_resign(void *context) {
     // our watch face, like most watch faces, has nothing special to do when resigning.
     // watch faces that enable a peripheral or interact with a sensor may want to turn it off here.
-    (void) settings;
     (void) context;
 }
index dc76f5f5298af8b9d5a579fd71d7bf53036d37c6..df942d05ae27e290ebc6af1023ae1f96fd4906d1 100644 (file)
@@ -39,10 +39,10 @@ typedef struct {
     bool animating;
 } hello_there_state_t;
 
-void hello_there_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void hello_there_face_activate(movement_settings_t *settings, void *context);
-bool hello_there_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void hello_there_face_resign(movement_settings_t *settings, void *context);
+void hello_there_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void hello_there_face_activate(void *context);
+bool hello_there_face_loop(movement_event_t event, void *context);
+void hello_there_face_resign(void *context);
 
 #define hello_there_face ((const watch_face_t){ \
     hello_there_face_setup, \
index 4e87e2c3f0c66afc1d695f5ecb1abe5d43fb7f72..9792a7452c9648cd17315f92f2fc17dc528566b5 100644 (file)
@@ -36,7 +36,7 @@
 // Pressing the alarm button enters the log mode, where the main display shows the number of interrupts detected in each of the last
 // 24 hours (the hour is shown in the top right digit and AM/PM indicator, if the clock is set to 12 hour mode)
 
-static void _lis2dw_logging_face_update_display(movement_settings_t *settings, lis2dw_logger_state_t *logger_state, lis2dw_wakeup_source wakeup_source) {
+static void _lis2dw_logging_face_update_display(lis2dw_logger_state_t *logger_state, lis2dw_wakeup_source wakeup_source) {
     char buf[14];
     char time_indication_character;
     int8_t pos;
@@ -111,8 +111,7 @@ static void _lis2dw_logging_face_log_data(lis2dw_logger_state_t *logger_state) {
     logger_state->z_interrupts_this_hour = 0;
 }
 
-void lis2dw_logging_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void lis2dw_logging_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(lis2dw_logger_state_t));
@@ -128,15 +127,14 @@ void lis2dw_logging_face_setup(movement_settings_t *settings, uint8_t watch_face
     }
 }
 
-void lis2dh_logging_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void lis2dh_logging_face_activate(void *context) {
     lis2dh_logger_state_t *logger_state = (lis2dh_logger_state_t *)context;
     logger_state->display_index = 0;
     logger_state->log_ticks = 0;
     watch_enable_digital_input(A4);
 }
 
-bool lis2dw_logging_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool lis2dw_logging_face_loop(movement_event_t event, void *context) {
     lis2dw_logger_state_t *logger_state = (lis2dw_logger_state_t *)context;
     lis2dw_wakeup_source wakeup_source = 0;
     lis2dw_interrupt_source interrupt_source = 0;
@@ -145,13 +143,13 @@ bool lis2dw_logging_face_loop(movement_event_t event, movement_settings_t *setti
         case EVENT_LIGHT_BUTTON_DOWN:
             logger_state->axis_index = (logger_state->axis_index + 1) % 4;
             logger_state->log_ticks = 255;
-            _lis2dw_logging_face_update_display(settings, logger_state, wakeup_source);
+            _lis2dw_logging_face_update_display(logger_state, wakeup_source);
             break;
         case EVENT_ALARM_BUTTON_UP:
             if (logger_state->log_ticks) logger_state->display_index = (logger_state->display_index + 1) % LIS2DW_LOGGING_NUM_DATA_POINTS;
             logger_state->log_ticks = 255;
             logger_state->axis_index = 0;
-            _lis2dw_logging_face_update_display(settings, logger_state, wakeup_source);
+            _lis2dw_logging_face_update_display(logger_state, wakeup_source);
             break;
         case EVENT_ACTIVATE:
         case EVENT_TICK:
@@ -171,27 +169,25 @@ bool lis2dw_logging_face_loop(movement_event_t event, movement_settings_t *setti
             } else {
                 watch_clear_indicator(WATCH_INDICATOR_SIGNAL);
             }
-            _lis2dw_logging_face_update_display(settings, logger_state, wakeup_source);
+            _lis2dw_logging_face_update_display(logger_state, wakeup_source);
             break;
         case EVENT_BACKGROUND_TASK:
             _lis2dw_logging_face_log_data(logger_state);
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
     return true;
 }
 
-void lis2dw_logging_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void lis2dw_logging_face_resign(void *context) {
     (void) context;
     watch_disable_digital_input(A4);
 }
 
-bool lis2dw_logging_face_wants_background_task(movement_settings_t *settings, void *context) {
-    (void) settings;
+bool lis2dw_logging_face_wants_background_task(void *context) {
     lis2dw_logger_state_t *logger_state = (lis2dw_logger_state_t *)context;
     watch_date_time date_time = watch_rtc_get_date_time();
 
index ad3251843f1e3ad5ec064a2d41a4deff43541aea..0272cd8f6e5fb4beaafe5b2aaa107727e7fc2851 100644 (file)
@@ -57,11 +57,11 @@ typedef struct {
     lis2dw_logger_data_point_t data[LIS2DW_LOGGING_NUM_DATA_POINTS];
 } lis2dw_logger_state_t;
 
-void lis2dw_logging_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void lis2dw_logging_face_activate(movement_settings_t *settings, void *context);
-bool lis2dw_logging_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void lis2dw_logging_face_resign(movement_settings_t *settings, void *context);
-bool lis2dw_logging_face_wants_background_task(movement_settings_t *settings, void *context);
+void lis2dw_logging_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void lis2dw_logging_face_activate(void *context);
+bool lis2dw_logging_face_loop(movement_event_t event, void *context);
+void lis2dw_logging_face_resign(void *context);
+bool lis2dw_logging_face_wants_background_task(void *context);
 
 #define lis2dw_logging_face ((const watch_face_t){ \
     lis2dw_logging_face_setup, \
index d224851be5c2de3e36144979d5c5f58fbe63a8c2..75f4adb00b58266df790289aea9d0906c57db0a5 100644 (file)
@@ -39,19 +39,16 @@ static void _voltage_face_update_display(void) {
     watch_display_string(buf, 0);
 }
 
-void voltage_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void voltage_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     (void) context_ptr;
 }
 
-void voltage_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void voltage_face_activate(void *context) {
     (void) context;
 }
 
-bool voltage_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void) settings;
+bool voltage_face_loop(movement_event_t event, void *context) {
     (void) context;
     watch_date_time date_time;
     switch (event.event_type) {
@@ -81,14 +78,13 @@ bool voltage_face_loop(movement_event_t event, movement_settings_t *settings, vo
             }
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
     return true;
 }
 
-void voltage_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void voltage_face_resign(void *context) {
     (void) context;
 }
index 59d0f9ead624d553480cf42f918458ddc23428b9..92576715f58397b448d8bcb4475f8a9e83c1b119 100644 (file)
 
 #include "movement.h"
 
-void voltage_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void voltage_face_activate(movement_settings_t *settings, void *context);
-bool voltage_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void voltage_face_resign(movement_settings_t *settings, void *context);
+void voltage_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void voltage_face_activate(void *context);
+bool voltage_face_loop(movement_event_t event, void *context);
+void voltage_face_resign(void *context);
 
 #define voltage_face ((const watch_face_t){ \
     voltage_face_setup, \
index b0eb28d52bd3e324c9259bd470324f7acdd86899..82679c54a92c727d7986269cce6f27701acb013d 100644 (file)
@@ -55,8 +55,7 @@ static void _accel_interrupt_count_face_configure_threshold(uint8_t threshold) {
     lis2dw_configure_wakeup_int1(threshold, false, true);
 }
 
-void accel_interrupt_count_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void accel_interrupt_count_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(accel_interrupt_count_state_t));
@@ -75,7 +74,7 @@ void accel_interrupt_count_face_setup(movement_settings_t *settings, uint8_t wat
     }
 }
 
-void accel_interrupt_count_face_activate(movement_settings_t *settings, void *context) {
+void accel_interrupt_count_face_activate(void *context) {
     accel_interrupt_count_state_t *state = (accel_interrupt_count_state_t *)context;
 
     // never in settings mode at the start
@@ -85,7 +84,7 @@ void accel_interrupt_count_face_activate(movement_settings_t *settings, void *co
     movement_set_low_energy_timeout(0);
 }
 
-bool accel_interrupt_count_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool accel_interrupt_count_face_loop(movement_event_t event, void *context) {
     accel_interrupt_count_state_t *state = (accel_interrupt_count_state_t *)context;
 
     if (state->is_setting) {
@@ -107,7 +106,7 @@ bool accel_interrupt_count_face_loop(movement_event_t event, movement_settings_t
                 state->is_setting = false;
                 break;
             default:
-                movement_default_loop_handler(event, settings);
+                movement_default_loop_handler(event);
                 break;
         }
     } else {
@@ -142,7 +141,7 @@ bool accel_interrupt_count_face_loop(movement_event_t event, movement_settings_t
                 }
                 return false;
             default:
-                movement_default_loop_handler(event, settings);
+                movement_default_loop_handler(event);
                 break;
         }
     }
@@ -150,13 +149,11 @@ bool accel_interrupt_count_face_loop(movement_event_t event, movement_settings_t
     return true;
 }
 
-void accel_interrupt_count_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void accel_interrupt_count_face_resign(void *context) {
     (void) context;
 }
 
-bool accel_interrupt_count_face_wants_background_task(movement_settings_t *settings, void *context) {
-    (void) settings;
+bool accel_interrupt_count_face_wants_background_task(void *context) {
     (void) context;
     return false;
 }
index 3308b01728cc6a9f9f2abb900788189cad5b8504..0f91363dd98262412bbc0f2d63659a2e12fb4a46 100644 (file)
@@ -43,11 +43,11 @@ typedef struct {
     bool is_setting;
 } accel_interrupt_count_state_t;
 
-void accel_interrupt_count_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void accel_interrupt_count_face_activate(movement_settings_t *settings, void *context);
-bool accel_interrupt_count_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void accel_interrupt_count_face_resign(movement_settings_t *settings, void *context);
-bool accel_interrupt_count_face_wants_background_task(movement_settings_t *settings, void *context);
+void accel_interrupt_count_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void accel_interrupt_count_face_activate(void *context);
+bool accel_interrupt_count_face_loop(movement_event_t event, void *context);
+void accel_interrupt_count_face_resign(void *context);
+bool accel_interrupt_count_face_wants_background_task(void *context);
 
 #define accel_interrupt_count_face ((const watch_face_t){ \
     accel_interrupt_count_face_setup, \
index 5acb9f09dd9d8620cd82953dd3bac4390c0fa016..f5548f5c9a26f4428e9d2217d2371c148308fc00 100644 (file)
@@ -56,7 +56,7 @@ static const char activity_types[][3] = {
 static void update(accelerometer_data_acquisition_state_t *state);
 static void update_settings(accelerometer_data_acquisition_state_t *state);
 static void advance_current_setting(accelerometer_data_acquisition_state_t *state);
-static void start_reading(accelerometer_data_acquisition_state_t *state, movement_settings_t *settings);
+static void start_reading(accelerometer_data_acquisition_state_t *state);
 static void continue_reading(accelerometer_data_acquisition_state_t *state);
 static void finish_reading(accelerometer_data_acquisition_state_t *state);
 static bool wait_for_flash_ready(void);
@@ -65,8 +65,7 @@ static void write_buffer_to_page(uint8_t *buf, uint16_t page);
 static void write_page(accelerometer_data_acquisition_state_t *state);
 static void log_data_point(accelerometer_data_acquisition_state_t *state, lis2dw_reading_t reading, uint8_t centiseconds);
 
-void accelerometer_data_acquisition_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void accelerometer_data_acquisition_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     accelerometer_data_acquisition_state_t *state = (accelerometer_data_acquisition_state_t *)*context_ptr;
     if (*context_ptr == NULL) {
@@ -92,14 +91,12 @@ void accelerometer_data_acquisition_face_setup(movement_settings_t *settings, ui
 
 }
 
-void accelerometer_data_acquisition_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void accelerometer_data_acquisition_face_activate(void *context) {
     accelerometer_data_acquisition_state_t *state = (accelerometer_data_acquisition_state_t *)context;
     state->next_available_page = get_next_available_page();
 }
 
-bool accelerometer_data_acquisition_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void) settings;
+bool accelerometer_data_acquisition_face_loop(movement_event_t event, void *context) {
     accelerometer_data_acquisition_state_t *state = (accelerometer_data_acquisition_state_t *)context;
 
     switch (event.event_type) {
@@ -131,7 +128,7 @@ bool accelerometer_data_acquisition_face_loop(movement_event_t event, movement_s
                             state->reading_ticks = SECONDS_TO_RECORD + 1;
                             // also beep if the user asked for it
                             if (state->beep_with_countdown) watch_buzzer_play_note(BUZZER_NOTE_C6, 75);
-                            start_reading(state, settings);
+                            start_reading(state);
                         } else if (state->countdown_ticks < 3) {
                             // beep for last two ticks before reading
                             if (state->beep_with_countdown) watch_buzzer_play_note(BUZZER_NOTE_C5, 75);
@@ -218,15 +215,14 @@ bool accelerometer_data_acquisition_face_loop(movement_event_t event, movement_s
             // don't light up every time light is hit
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
     return true;
 }
 
-void accelerometer_data_acquisition_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void accelerometer_data_acquisition_face_resign(void *context) {
     accelerometer_data_acquisition_state_t *state = (accelerometer_data_acquisition_state_t *)context;
     if (state->reading_ticks) {
         state->reading_ticks = 0;
@@ -429,7 +425,7 @@ static void log_data_point(accelerometer_data_acquisition_state_t *state, lis2dw
     }
 }
 
-static void start_reading(accelerometer_data_acquisition_state_t *state, movement_settings_t *settings) {
+static void start_reading(accelerometer_data_acquisition_state_t *state) {
     printf("Start reading\n");
     watch_enable_i2c();
     lis2dw_begin();
index 946639daf0d2ee51f51a2c630f8cced9855c8425..107faeafa486d669d745540fee0a3cdd442c7637 100644 (file)
@@ -101,10 +101,10 @@ typedef struct {
     uint16_t pos;
 } accelerometer_data_acquisition_state_t;
 
-void accelerometer_data_acquisition_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void accelerometer_data_acquisition_face_activate(movement_settings_t *settings, void *context);
-bool accelerometer_data_acquisition_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void accelerometer_data_acquisition_face_resign(movement_settings_t *settings, void *context);
+void accelerometer_data_acquisition_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void accelerometer_data_acquisition_face_activate(void *context);
+bool accelerometer_data_acquisition_face_loop(movement_event_t event, void *context);
+void accelerometer_data_acquisition_face_resign(void *context);
 
 #define accelerometer_data_acquisition_face ((const watch_face_t){ \
     accelerometer_data_acquisition_face_setup, \
index e4827e3d1cb175355f09ecddc699a76024b5da65..63e6a8a42c22bdef0a79d0c90988d4efe753de09 100644 (file)
@@ -48,8 +48,7 @@ static void _alarm_thermometer_face_clear(int last[]) {
     }
 }
 
-void alarm_thermometer_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void alarm_thermometer_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(alarm_thermometer_state_t));
@@ -57,15 +56,14 @@ void alarm_thermometer_face_setup(movement_settings_t *settings, uint8_t watch_f
     }
 }
 
-void alarm_thermometer_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void alarm_thermometer_face_activate(void *context) {
     alarm_thermometer_state_t *state = (alarm_thermometer_state_t *)context;
     state->mode = MODE_NORMAL;
     _alarm_thermometer_face_clear(state->last);
     watch_display_string("AT", 0);
 }
 
-bool alarm_thermometer_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool alarm_thermometer_face_loop(movement_event_t event, void *context) {
     alarm_thermometer_state_t *state = (alarm_thermometer_state_t *)context;
 
     switch (event.event_type) {
@@ -142,13 +140,12 @@ bool alarm_thermometer_face_loop(movement_event_t event, movement_settings_t *se
             }
             break;
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     return true;
 }
 
-void alarm_thermometer_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void alarm_thermometer_face_resign(void *context) {
     (void) context;
 }
index 1b3aabf415e7063b963292138c2f12ef8ac635c6..6b1ecde752585b8a802b3523bd1b0a2bc3a45f35 100644 (file)
@@ -58,10 +58,10 @@ typedef struct {
     alarm_thermometer_mode_t mode;
 } alarm_thermometer_state_t;
 
-void alarm_thermometer_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void alarm_thermometer_face_activate(movement_settings_t *settings, void *context);
-bool alarm_thermometer_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void alarm_thermometer_face_resign(movement_settings_t *settings, void *context);
+void alarm_thermometer_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void alarm_thermometer_face_activate(void *context);
+bool alarm_thermometer_face_loop(movement_event_t event, void *context);
+void alarm_thermometer_face_resign(void *context);
 
 #define alarm_thermometer_face ((const watch_face_t){ \
     alarm_thermometer_face_setup, \
index 9fb489a280ad452205d57d663b21ae520f15f337..243613c16519dbfd54ed89374d3ae5a63415cb3c 100644 (file)
@@ -31,8 +31,7 @@
 
 uint16_t lightmeter_mod(uint16_t m, uint16_t n) { return (m%n + n)%n; }  
 
-void lightmeter_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void lightmeter_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(lightmeter_state_t));
@@ -45,8 +44,7 @@ void lightmeter_face_setup(movement_settings_t *settings, uint8_t watch_face_ind
     }
 }
 
-void lightmeter_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void lightmeter_face_activate(void *context) {
     lightmeter_state_t *state = (lightmeter_state_t*) context;
     state->waiting_for_conversion = 0;
     lightmeter_show_ev(state); // Print most current reading
@@ -101,8 +99,7 @@ void lightmeter_show_ev(lightmeter_state_t *state) {
     return;
 }
 
-bool lightmeter_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void) settings;
+bool lightmeter_face_loop(movement_event_t event, void *context) {
     lightmeter_state_t *state = (lightmeter_state_t*) context;
     
     opt3001_Config_t c;
@@ -160,14 +157,13 @@ bool lightmeter_face_loop(movement_event_t event, movement_settings_t *settings,
             break;
 
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
     return true;
 }
 
-void lightmeter_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void lightmeter_face_resign(void *context) {
     (void) context;
     opt3001_writeConfig(lightmeter_addr, lightmeter_off);
     watch_disable_i2c();
index affae2e431566e08b227531fe2101a3704e56d4d..fcb7cdae64b9f4cd01b52c87083f0a920939ac12 100644 (file)
@@ -172,11 +172,11 @@ static const opt3001_Config_t lightmeter_off = {
 
 uint16_t lightmeter_mod(uint16_t m, uint16_t n); 
 
-void lightmeter_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void lightmeter_face_activate(movement_settings_t *settings, void *context);
+void lightmeter_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void lightmeter_face_activate(void *context);
 void lightmeter_show_ev(lightmeter_state_t *state);
-bool lightmeter_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void lightmeter_face_resign(movement_settings_t *settings, void *context);
+bool lightmeter_face_loop(movement_event_t event, void *context);
+void lightmeter_face_resign(void *context);
 
 static const uint8_t lightmeter_addr = 0x44;
 
index f35760c6e8630a5ada2257052197ae3d6d66e101..10e2a9ed2fea8a6c2a8157d53e84f5b90a696b4a 100644 (file)
@@ -83,8 +83,7 @@ static void _minmax_face_update_display(float temperature_c, bool in_fahrenheit)
 }
 
 
-void minmax_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void minmax_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(minmax_state_t));
@@ -93,14 +92,13 @@ void minmax_face_setup(movement_settings_t *settings, uint8_t watch_face_index,
 }
 
 
-void minmax_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void minmax_face_activate(void *context) {
     minmax_state_t *state = (minmax_state_t *)context;
     state->show_min = true;
     watch_display_string("MN", 0); // Start with minimum temp
 }
 
-bool minmax_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool minmax_face_loop(movement_event_t event, void *context) {
     minmax_state_t *state = (minmax_state_t *)context;
     float temp_c;
 
@@ -134,20 +132,18 @@ bool minmax_face_loop(movement_event_t event, movement_settings_t *settings, voi
             _minmax_face_log_data(state);
             break;
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
     return true;
 }
 
 
-void minmax_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void minmax_face_resign(void *context) {
     (void) context;
 }
 
 
-bool minmax_face_wants_background_task(movement_settings_t *settings, void *context) {
-    (void) settings;
+bool minmax_face_wants_background_task(void *context) {
     (void) context;
     // this will get called at the top of each minute; always request bg task
     return true;
index 1fd3c48d796c4688c15d8d753d46598503b681a4..4faf6794c71c566643ac9d2898ad94fdafe9df14 100644 (file)
@@ -51,11 +51,11 @@ typedef struct {
   float hourly_maxs[LOGGING_DATA_POINTS];
 } minmax_state_t;
 
-void minmax_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void minmax_face_activate(movement_settings_t *settings, void *context);
-bool minmax_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void minmax_face_resign(movement_settings_t *settings, void *context);
-bool minmax_face_wants_background_task(movement_settings_t *settings, void *context);
+void minmax_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void minmax_face_activate(void *context);
+bool minmax_face_loop(movement_event_t event, void *context);
+void minmax_face_resign(void *context);
+bool minmax_face_wants_background_task(void *context);
 
 #define minmax_face ((const watch_face_t){ \
     minmax_face_setup, \
index 7c8d5b98fd92a279907e845e7d8be4c1a2863a31..fe34e2ccf329dee08d7e815cc6ba8344cb82b33f 100644 (file)
@@ -72,8 +72,7 @@ static void _thermistor_logging_face_update_display(thermistor_logger_state_t *l
     watch_display_string(buf, 0);
 }
 
-void thermistor_logging_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void thermistor_logging_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(thermistor_logger_state_t));
@@ -81,14 +80,13 @@ void thermistor_logging_face_setup(movement_settings_t *settings, uint8_t watch_
     }
 }
 
-void thermistor_logging_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void thermistor_logging_face_activate(void *context) {
     thermistor_logger_state_t *logger_state = (thermistor_logger_state_t *)context;
     logger_state->display_index = 0;
     logger_state->ts_ticks = 0;
 }
 
-bool thermistor_logging_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool thermistor_logging_face_loop(movement_event_t event, void *context) {
     thermistor_logger_state_t *logger_state = (thermistor_logger_state_t *)context;
     switch (event.event_type) {
         case EVENT_TIMEOUT:
@@ -118,20 +116,18 @@ bool thermistor_logging_face_loop(movement_event_t event, movement_settings_t *s
             _thermistor_logging_face_log_data(logger_state);
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
     return true;
 }
 
-void thermistor_logging_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void thermistor_logging_face_resign(void *context) {
     (void) context;
 }
 
-bool thermistor_logging_face_wants_background_task(movement_settings_t *settings, void *context) {
-    (void) settings;
+bool thermistor_logging_face_wants_background_task(void *context) {
     (void) context;
     // this will get called at the top of each minute, so all we check is if we're at the top of the hour as well.
     // if we are, we ask for a background task.
index 0debfbf43bd77094085698c584dfef34a136d1ac..346f23f774549d9234778f354b45d3b46f749067 100644 (file)
@@ -70,11 +70,11 @@ typedef struct {
     thermistor_logger_data_point_t data[THERMISTOR_LOGGING_NUM_DATA_POINTS];
 } thermistor_logger_state_t;
 
-void thermistor_logging_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void thermistor_logging_face_activate(movement_settings_t *settings, void *context);
-bool thermistor_logging_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void thermistor_logging_face_resign(movement_settings_t *settings, void *context);
-bool thermistor_logging_face_wants_background_task(movement_settings_t *settings, void *context);
+void thermistor_logging_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void thermistor_logging_face_activate(void *context);
+bool thermistor_logging_face_loop(movement_event_t event, void *context);
+void thermistor_logging_face_resign(void *context);
+bool thermistor_logging_face_wants_background_task(void *context);
 
 #define thermistor_logging_face ((const watch_face_t){ \
     thermistor_logging_face_setup, \
index 74b3ef752801f28762ca129b7168c004db0a3ff8..32df0d1388ee5a0b75d88a6ccb05428677431e8d 100644 (file)
@@ -41,19 +41,17 @@ static void _thermistor_readout_face_update_display(bool in_fahrenheit) {
     thermistor_driver_disable();
 }
 
-void thermistor_readout_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void thermistor_readout_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     (void) context_ptr;
 }
 
-void thermistor_readout_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void thermistor_readout_face_activate(void *context) {
     (void) context;
     watch_display_string("TE", 0);
 }
 
-bool thermistor_readout_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool thermistor_readout_face_loop(movement_event_t event, void *context) {
     (void) context;
     watch_date_time date_time = watch_rtc_get_date_time();
     switch (event.event_type) {
@@ -90,14 +88,13 @@ bool thermistor_readout_face_loop(movement_event_t event, movement_settings_t *s
             }
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
     return true;
 }
 
-void thermistor_readout_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void thermistor_readout_face_resign(void *context) {
     (void) context;
 }
index 10cdcc1940dde2a71691427580715f7cf843e617..6ca5a1a0dc0c4833a54c5bc6d60c9867a160b55a 100644 (file)
 
 #include "movement.h"
 
-void thermistor_readout_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void thermistor_readout_face_activate(movement_settings_t *settings, void *context);
-bool thermistor_readout_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void thermistor_readout_face_resign(movement_settings_t *settings, void *context);
+void thermistor_readout_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void thermistor_readout_face_activate(void *context);
+bool thermistor_readout_face_loop(movement_event_t event, void *context);
+void thermistor_readout_face_resign(void *context);
 
 #define thermistor_readout_face ((const watch_face_t){ \
     thermistor_readout_face_setup, \
index 26b8e001f84d8aacb3320dcc35078279db44aaaa..964ef4486bc1b9a4f48a3690fffcfd4b2894d7c8 100644 (file)
@@ -41,7 +41,7 @@ static void _thermistor_testing_face_update_display(bool in_fahrenheit) {
     thermistor_driver_disable();
 }
 
-void thermistor_testing_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
+void thermistor_testing_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     (void) context_ptr;
     // force one setting: never enter low energy mode.
@@ -49,14 +49,13 @@ void thermistor_testing_face_setup(movement_settings_t *settings, uint8_t watch_
     movement_set_low_energy_timeout(0);
 }
 
-void thermistor_testing_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void thermistor_testing_face_activate(void *context) {
     (void) context;
     watch_display_string("TE", 0);
     movement_request_tick_frequency(8);
 }
 
-bool thermistor_testing_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool thermistor_testing_face_loop(movement_event_t event, void *context) {
     (void) context;
     switch (event.event_type) {
         case EVENT_ALARM_BUTTON_DOWN:
@@ -68,14 +67,13 @@ bool thermistor_testing_face_loop(movement_event_t event, movement_settings_t *s
             _thermistor_testing_face_update_display(movement_use_imperial_units());
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
     return true;
 }
 
-void thermistor_testing_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void thermistor_testing_face_resign(void *context) {
     (void) context;
 }
index 9721484a11ef6463525269807b8aa8ab0a1e515d..e1efcaa07b95df7197872f05f8ea9fe4c71ea8dc 100644 (file)
 
 #include "movement.h"
 
-void thermistor_testing_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void thermistor_testing_face_activate(movement_settings_t *settings, void *context);
-bool thermistor_testing_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void thermistor_testing_face_resign(movement_settings_t *settings, void *context);
+void thermistor_testing_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void thermistor_testing_face_activate(void *context);
+bool thermistor_testing_face_loop(movement_event_t event, void *context);
+void thermistor_testing_face_resign(void *context);
 
 #define thermistor_testing_face ((const watch_face_t){ \
     thermistor_testing_face_setup, \
index 67680ed95ad97d3e1c53e1a2f404f59543ffbcd7..0d225ca2bd79d7ab0784832dfb6839db3e0a46a1 100644 (file)
@@ -34,15 +34,13 @@ extern nanosec_state_t nanosec_state;
 int total_adjustment;
 int8_t finetune_page;
 
-void finetune_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void finetune_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     (void) context_ptr;
     // Do any pin or peripheral setup here; this will be called whenever the watch wakes from deep sleep.
 }
 
-void finetune_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void finetune_face_activate(void *context) {
     (void) context;
 
     // Handle any tasks related to your watch face coming on screen.
@@ -131,9 +129,8 @@ static void finetune_update_correction_time(void) {
     movement_move_to_face(0); // Go to main face after saving settings
 }
 
-bool finetune_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool finetune_face_loop(movement_event_t event, void *context) {
 
-    (void) settings;
     (void) context;
 
     switch (event.event_type) {
@@ -227,7 +224,7 @@ bool finetune_face_loop(movement_event_t event, movement_settings_t *settings, v
             // don't light up every time light is hit
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
@@ -236,8 +233,7 @@ bool finetune_face_loop(movement_event_t event, movement_settings_t *settings, v
     return true;
 }
 
-void finetune_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void finetune_face_resign(void *context) {
     (void) context;
 
     if (total_adjustment != 0) {
index 95ac570521ae838a1074d0948b55b683a2014b13..905df760e5d9ec4b821d7dc750cd292a8e0a0053 100644 (file)
@@ -60,10 +60,10 @@ typedef struct {
     uint8_t unused;
 } finetune_state_t;
 
-void finetune_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void finetune_face_activate(movement_settings_t *settings, void *context);
-bool finetune_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void finetune_face_resign(movement_settings_t *settings, void *context);
+void finetune_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void finetune_face_activate(void *context);
+bool finetune_face_loop(movement_event_t event, void *context);
+void finetune_face_resign(void *context);
 
 #define finetune_face ((const watch_face_t){ \
     finetune_face_setup, \
index 37dd08ef922d069ec5b35bbd422d76170b9371af..965fdc6bbedd8bfc41cedb98ae408d29ff2884e0 100644 (file)
@@ -146,9 +146,8 @@ void nanosec_save(void) {
     nanosec_changed = false;
 }
 
-void nanosec_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
+void nanosec_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
-    (void) settings;
 
     if (*context_ptr == NULL) {
         if (filesystem_get_file_size("nanosec.ini") != sizeof(nanosec_state)) {
@@ -167,8 +166,7 @@ void nanosec_face_setup(movement_settings_t *settings, uint8_t watch_face_index,
     }
 }
 
-void nanosec_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void nanosec_face_activate(void *context) {
     (void) context;
 
     // Handle any tasks related to your watch face coming on screen.
@@ -267,8 +265,7 @@ float nanosec_get_aging() // Returns aging correction in ppm
 }
 
 
-bool nanosec_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void) settings;
+bool nanosec_face_loop(movement_event_t event, void *context) {
     (void) context;
 
     switch (event.event_type) {
@@ -348,7 +345,7 @@ bool nanosec_face_loop(movement_event_t event, movement_settings_t *settings, vo
             // don't light up every time light is hit
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
@@ -357,16 +354,14 @@ bool nanosec_face_loop(movement_event_t event, movement_settings_t *settings, vo
     return true;
 }
 
-void nanosec_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void nanosec_face_resign(void *context) {
     (void) context;
 
     nanosec_ui_save();
 }
 
 // Background freq correction
-bool nanosec_face_wants_background_task(movement_settings_t *settings, void *context) {
-    (void) settings;
+bool nanosec_face_wants_background_task(void *context) {
     (void) context;
     if (nanosec_state.correction_profile == 0)
         return 0; // No need for background correction if we are on profile 0 - static hardware correction.
index 545eed29fd58fc2c906708acf35ca3d4858166c9..58167ee79432ec3abaa13cb2ad5d7cb72e1afeec 100644 (file)
@@ -86,11 +86,11 @@ typedef struct {
     int16_t aging_ppm_pa; // multiplied by 100. Aging per year. 
 } nanosec_state_t;
 
-void nanosec_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void nanosec_face_activate(movement_settings_t *settings, void *context);
-bool nanosec_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void nanosec_face_resign(movement_settings_t *settings, void *context);
-bool nanosec_face_wants_background_task(movement_settings_t *settings, void *context);
+void nanosec_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void nanosec_face_activate(void *context);
+bool nanosec_face_loop(movement_event_t event, void *context);
+void nanosec_face_resign(void *context);
+bool nanosec_face_wants_background_task(void *context);
 void nanosec_ui_save(void);
 void nanosec_save(void);
 float nanosec_get_aging(void);
index a98c264213f11c712d415303e25920ff65b49794..94bf16433fdd73021d7c5ec2543b1e9e91f4d9eb 100644 (file)
@@ -211,10 +211,10 @@ typedef struct {
 
 // PUBLIC WATCH FACE FUNCTIONS ////////////////////////////////////////////////
 
-void place_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void place_face_activate(movement_settings_t *settings, void *context);
-bool place_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void place_face_resign(movement_settings_t *settings, void *context);
+void place_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void place_face_activate(void *context);
+bool place_face_loop(movement_event_t event, void *context);
+void place_face_resign(void *context);
 
 void place_latlon_to_olc(char *pluscode, double latitude, double longitude);
 void place_latlon_to_geohash(char *geohash, double latitude, double longitude);
index 033587262e781bad51ab912738296cd9425d97f6..d298229dbc7cb1941bb732969119fd0a3fdcfce0 100644 (file)
@@ -46,7 +46,7 @@ static void save(save_load_state_t *state) {
     filesystem_write_file(filename, (char*)&savefile, sizeof(savefile_t));
 }
 
-static void load(save_load_state_t *state, movement_settings_t *settings) {
+static void load(save_load_state_t *state) {
     watch_store_backup_data(state->slot[state->index].b0, 0);
     watch_store_backup_data(state->slot[state->index].b1, 1);
     watch_store_backup_data(state->slot[state->index].b2, 2);
@@ -72,8 +72,7 @@ static void load_saves_to_state(save_load_state_t *state) {
     }
 }
 
-void save_load_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void save_load_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(save_load_state_t));
@@ -81,8 +80,7 @@ void save_load_face_setup(movement_settings_t *settings, uint8_t watch_face_inde
     }
 }
 
-void save_load_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void save_load_face_activate(void *context) {
     save_load_state_t *state = (save_load_state_t *)context;
     state->index = 0;
     state->update_timeout = 0;
@@ -102,7 +100,7 @@ static void update_display(save_load_state_t *state) {
     }
 }
 
-bool save_load_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool save_load_face_loop(movement_event_t event, void *context) {
     save_load_state_t *state = (save_load_state_t *)context;
 
     switch (event.event_type) {
@@ -127,7 +125,7 @@ bool save_load_face_loop(movement_event_t event, movement_settings_t *settings,
             break;
         case EVENT_ALARM_LONG_PRESS:
             if (state->slot[state->index].version) {
-                load(state, settings);
+                load(state);
                 watch_display_string("Loaded", 4);
                 state->update_timeout = 3;
             }
@@ -136,14 +134,13 @@ bool save_load_face_loop(movement_event_t event, movement_settings_t *settings,
             movement_move_to_face(0);
             break;
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     return true;
 }
 
-void save_load_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void save_load_face_resign(void *context) {
     (void) context;
 
     // handle any cleanup before your watch face goes off-screen.
index fc1553172cb5044dd8c466756a0faf74e6c5a873..786b5f546bfb1d841267e340cce399f842c8fe75 100644 (file)
@@ -65,10 +65,10 @@ typedef struct {
     savefile_t slot[SAVE_LOAD_SLOTS];
 } save_load_state_t;
 
-void save_load_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void save_load_face_activate(movement_settings_t *settings, void *context);
-bool save_load_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void save_load_face_resign(movement_settings_t *settings, void *context);
+void save_load_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void save_load_face_activate(void *context);
+bool save_load_face_loop(movement_event_t event, void *context);
+void save_load_face_resign(void *context);
 
 #define save_load_face ((const watch_face_t){ \
     save_load_face_setup, \
index c27f4047011fb2d4381494091b88ee6110e51dc8..d10917a87183e80815e12324a6c172c7094a5400 100644 (file)
@@ -34,20 +34,18 @@ char set_time_hackwatch_face_titles[][3] = {"HR", "M1", "SE", "YR", "MO", "DA",
 
 watch_date_time date_time_settings;
 
-void set_time_hackwatch_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void set_time_hackwatch_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) *context_ptr = malloc(sizeof(uint8_t));
 }
 
-void set_time_hackwatch_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void set_time_hackwatch_face_activate(void *context) {
     *((uint8_t *)context) = 3;
     movement_request_tick_frequency(32);
     date_time_settings = watch_rtc_get_date_time();
 }
 
-bool set_time_hackwatch_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool set_time_hackwatch_face_loop(movement_event_t event, void *context) {
     uint8_t current_page = *((uint8_t *)context);
 
     if (event.subsecond == 15) // Delay displayed time update by ~0.5 seconds, to align phase exactly to main clock at 1Hz
@@ -185,7 +183,7 @@ bool set_time_hackwatch_face_loop(movement_event_t event, movement_settings_t *s
             // don't light up every time light is hit
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
@@ -263,8 +261,7 @@ bool set_time_hackwatch_face_loop(movement_event_t event, movement_settings_t *s
     return true;
 }
 
-void set_time_hackwatch_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void set_time_hackwatch_face_resign(void *context) {
     (void) context;
     watch_set_led_off();
     movement_store_settings();
index 41b91ac4f98d1565c9fe9934401d27a0c32ed8e5..ad883a66520cf39b3b4a6194789e41225d667d86 100644 (file)
 
 #include "movement.h"
 
-void set_time_hackwatch_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void set_time_hackwatch_face_activate(movement_settings_t *settings, void *context);
-bool set_time_hackwatch_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void set_time_hackwatch_face_resign(movement_settings_t *settings, void *context);
+void set_time_hackwatch_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void set_time_hackwatch_face_activate(void *context);
+bool set_time_hackwatch_face_loop(movement_event_t event, void *context);
+void set_time_hackwatch_face_resign(void *context);
 
 #define set_time_hackwatch_face ((const watch_face_t){ \
     set_time_hackwatch_face_setup, \
index 9a9ffb94172feda1cafa69dd883141a5bbb782e3..39e5f6e4b32c5ff614b73ea1a3554b175b1cc187 100644 (file)
@@ -29,8 +29,7 @@
 
 const uint8_t BEAT_REFRESH_FREQUENCY = 8;
 
-void beats_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void beats_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     (void) context_ptr;
     if (*context_ptr == NULL) {
@@ -38,16 +37,14 @@ void beats_face_setup(movement_settings_t *settings, uint8_t watch_face_index, v
     }
 }
 
-void beats_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void beats_face_activate(void *context) {
     beats_face_state_t *state = (beats_face_state_t *)context;
     state->next_subsecond_update = 0;
     state->last_centibeat_displayed = 0;
     movement_request_tick_frequency(BEAT_REFRESH_FREQUENCY);
 }
 
-bool beats_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void) settings;
+bool beats_face_loop(movement_event_t event, void *context) {
     beats_face_state_t *state = (beats_face_state_t *)context;
     if (event.event_type == EVENT_TICK && event.subsecond != state->next_subsecond_update) {
          return true; // math is hard, don't do it if we don't have to.
@@ -82,15 +79,14 @@ bool beats_face_loop(movement_event_t event, movement_settings_t *settings, void
             watch_display_text(WATCH_POSITION_FULL, buf);
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
     return true;
 }
 
-void beats_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void beats_face_resign(void *context) {
     (void) context;
 }
 
index 4a066241f2677c054062cd3d53a3426426f91eb6..66afdd89435253d790feffcab35d2ca3a13286e4 100644 (file)
@@ -44,10 +44,10 @@ 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, 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);
+void beats_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void beats_face_activate(void *context);
+bool beats_face_loop(movement_event_t event, void *context);
+void beats_face_resign(void *context);
 
 #define beats_face ((const watch_face_t){ \
     beats_face_setup, \
index 79bcd9be31f43f94eea72fdccee8220af72c9c09..3943a6a2a6424d417df1f03066e026197f1aef26 100644 (file)
@@ -60,7 +60,7 @@ static void clock_indicate(watch_indicator_t indicator, bool on) {
     }
 }
 
-static void clock_indicate_alarm(movement_settings_t *settings) {
+static void clock_indicate_alarm() {
     clock_indicate(WATCH_INDICATOR_SIGNAL, movement_alarm_enabled());
 }
 
@@ -68,7 +68,7 @@ static void clock_indicate_time_signal(clock_state_t *clock) {
     clock_indicate(WATCH_INDICATOR_BELL, clock->time_signal_enabled);
 }
 
-static void clock_indicate_24h(movement_settings_t *settings) {
+static void clock_indicate_24h() {
     clock_indicate(WATCH_INDICATOR_24H, !!movement_clock_mode_24h());
 }
 
@@ -76,7 +76,7 @@ static bool clock_is_pm(watch_date_time date_time) {
     return date_time.unit.hour >= 12;
 }
 
-static void clock_indicate_pm(movement_settings_t *settings, watch_date_time date_time) {
+static void clock_indicate_pm(watch_date_time date_time) {
     if (movement_clock_mode_24h()) { return; }
     clock_indicate(WATCH_INDICATOR_PM, clock_is_pm(date_time));
 }
@@ -166,10 +166,10 @@ static bool clock_display_some(watch_date_time current, watch_date_time previous
     }
 }
 
-static void clock_display_clock(movement_settings_t *settings, clock_state_t *clock, watch_date_time current) {
+static void clock_display_clock(clock_state_t *clock, watch_date_time current) {
     if (!clock_display_some(current, clock->date_time.previous)) {
         if (movement_clock_mode_24h() == MOVEMENT_CLOCK_MODE_12H) {
-            clock_indicate_pm(settings, current);
+            clock_indicate_pm(current);
             current = clock_24h_to_12h(current);
         }
         clock_display_all(current, movement_clock_mode_24h() == MOVEMENT_CLOCK_MODE_024H);
@@ -204,8 +204,7 @@ static void clock_stop_tick_tock_animation(void) {
     }
 }
 
-void clock_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void clock_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
 
     if (*context_ptr == NULL) {
@@ -216,14 +215,14 @@ void clock_face_setup(movement_settings_t *settings, uint8_t watch_face_index, v
     }
 }
 
-void clock_face_activate(movement_settings_t *settings, void *context) {
+void clock_face_activate(void *context) {
     clock_state_t *clock = (clock_state_t *) context;
 
     clock_stop_tick_tock_animation();
 
     clock_indicate_time_signal(clock);
-    clock_indicate_alarm(settings);
-    clock_indicate_24h(settings);
+    clock_indicate_alarm();
+    clock_indicate_24h();
 
     watch_set_colon();
 
@@ -231,7 +230,7 @@ void clock_face_activate(movement_settings_t *settings, void *context) {
     clock->date_time.previous.reg = 0xFFFFFFFF;
 }
 
-bool clock_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool clock_face_loop(movement_event_t event, void *context) {
     clock_state_t *state = (clock_state_t *) context;
     watch_date_time current;
 
@@ -244,7 +243,7 @@ bool clock_face_loop(movement_event_t event, movement_settings_t *settings, void
         case EVENT_ACTIVATE:
             current = watch_rtc_get_date_time();
 
-            clock_display_clock(settings, state, current);
+            clock_display_clock(state, current);
 
             clock_check_battery_periodically(state, current);
 
@@ -260,19 +259,17 @@ bool clock_face_loop(movement_event_t event, movement_settings_t *settings, void
             movement_play_signal();
             break;
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     return true;
 }
 
-void clock_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void clock_face_resign(void *context) {
     (void) context;
 }
 
-bool clock_face_wants_background_task(movement_settings_t *settings, void *context) {
-    (void) settings;
+bool clock_face_wants_background_task(void *context) {
     clock_state_t *state = (clock_state_t *) context;
     if (!state->time_signal_enabled) return false;
 
index c4209e3bde69e786f01a050be8fb126003cc929d..864cf7e73a7d31b5e773f7275a391a1b19ad5827 100644 (file)
 
 #include "movement.h"
 
-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);
-void clock_face_resign(movement_settings_t *settings, void *context);
-bool clock_face_wants_background_task(movement_settings_t *settings, void *context);
+void clock_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void clock_face_activate(void *context);
+bool clock_face_loop(movement_event_t event, void *context);
+void clock_face_resign(void *context);
+bool clock_face_wants_background_task(void *context);
 
 #define clock_face ((const watch_face_t) { \
     clock_face_setup, \
index 7723d8be0536ff01d98d6c0711eabf0b6bcdb9c3..c616c64f9754580174a7efee8881cd3310a72af7 100644 (file)
@@ -34,8 +34,7 @@ static void _update_alarm_indicator(bool settings_alarm_enabled, simple_clock_st
     else watch_clear_indicator(WATCH_INDICATOR_SIGNAL);
 }
 
-void simple_clock_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void simple_clock_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
 
     if (*context_ptr == NULL) {
@@ -46,7 +45,7 @@ void simple_clock_face_setup(movement_settings_t *settings, uint8_t watch_face_i
     }
 }
 
-void simple_clock_face_activate(movement_settings_t *settings, void *context) {
+void simple_clock_face_activate(void *context) {
     simple_clock_state_t *state = (simple_clock_state_t *)context;
 
     if (watch_tick_animation_is_running()) watch_stop_tick_animation();
@@ -66,7 +65,7 @@ void simple_clock_face_activate(movement_settings_t *settings, void *context) {
     state->previous_date_time = 0xFFFFFFFF;
 }
 
-bool simple_clock_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool simple_clock_face_loop(movement_event_t event, void *context) {
     simple_clock_state_t *state = (simple_clock_state_t *)context;
     char buf[11];
 
@@ -143,19 +142,17 @@ bool simple_clock_face_loop(movement_event_t event, movement_settings_t *setting
             movement_play_signal();
             break;
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     return true;
 }
 
-void simple_clock_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void simple_clock_face_resign(void *context) {
     (void) context;
 }
 
-bool simple_clock_face_wants_background_task(movement_settings_t *settings, void *context) {
-    (void) settings;
+bool simple_clock_face_wants_background_task(void *context) {
     simple_clock_state_t *state = (simple_clock_state_t *)context;
     if (!state->signal_enabled) return false;
 
index e74a6e864e501d2911626048f54f5aa4aa29e690..ce9aa93e78ae6f33773c5f591a8d3121b77fd394 100644 (file)
@@ -45,11 +45,11 @@ typedef struct {
     bool alarm_enabled;
 } simple_clock_state_t;
 
-void simple_clock_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void simple_clock_face_activate(movement_settings_t *settings, void *context);
-bool simple_clock_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void simple_clock_face_resign(movement_settings_t *settings, void *context);
-bool simple_clock_face_wants_background_task(movement_settings_t *settings, void *context);
+void simple_clock_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void simple_clock_face_activate(void *context);
+bool simple_clock_face_loop(movement_event_t event, void *context);
+void simple_clock_face_resign(void *context);
+bool simple_clock_face_wants_background_task(void *context);
 
 #define simple_clock_face ((const watch_face_t){ \
     simple_clock_face_setup, \
index ddbcc94ea2750f6d40a69910b480433899650125..28adb4d5937d2cd25ee2f4813cddd8b765fd0a33 100644 (file)
@@ -35,8 +35,7 @@ void _update_timezone_offset(world_clock_state_t *state) {
     state->current_offset = movement_get_current_timezone_offset_for_zone(state->settings.bit.timezone_index);
 }
 
-void world_clock_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void world_clock_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(world_clock_state_t));
@@ -51,8 +50,7 @@ void world_clock_face_setup(movement_settings_t *settings, uint8_t watch_face_in
     }
 }
 
-void world_clock_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void world_clock_face_activate(void *context) {
     world_clock_state_t *state = (world_clock_state_t *)context;
 
     state->current_screen = 0;
@@ -61,7 +59,7 @@ void world_clock_face_activate(movement_settings_t *settings, void *context) {
     if (watch_tick_animation_is_running()) watch_stop_tick_animation();
 }
 
-static bool world_clock_face_do_display_mode(movement_event_t event, movement_settings_t *settings, world_clock_state_t *state) {
+static bool world_clock_face_do_display_mode(movement_event_t event, world_clock_state_t *state) {
     char buf[11];
 
     uint32_t previous_date_time;
@@ -121,13 +119,13 @@ static bool world_clock_face_do_display_mode(movement_event_t event, movement_se
             state->current_screen = 1;
             break;
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     return true;
 }
 
-static bool _world_clock_face_do_settings_mode(movement_event_t event, movement_settings_t *settings, world_clock_state_t *state) {
+static bool _world_clock_face_do_settings_mode(movement_event_t event, world_clock_state_t *state) {
     switch (event.event_type) {
         case EVENT_MODE_BUTTON_UP:
             if (state->backup_register) watch_store_backup_data(state->settings.reg, state->backup_register);
@@ -141,7 +139,7 @@ static bool _world_clock_face_do_settings_mode(movement_event_t event, movement_
                 state->current_screen = 0;
                 if (state->backup_register) watch_store_backup_data(state->settings.reg, state->backup_register);
                 event.event_type = EVENT_ACTIVATE;
-                return world_clock_face_do_display_mode(event, settings, state);
+                return world_clock_face_do_display_mode(event, state);
             }
             break;
         case EVENT_ALARM_BUTTON_DOWN:
@@ -198,17 +196,16 @@ static bool _world_clock_face_do_settings_mode(movement_event_t event, movement_
     return true;
 }
 
-bool world_clock_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool world_clock_face_loop(movement_event_t event, void *context) {
     world_clock_state_t *state = (world_clock_state_t *)context;
 
     if (state->current_screen == 0) {
-        return world_clock_face_do_display_mode(event, settings, state);
+        return world_clock_face_do_display_mode(event, state);
     } else {
-        return _world_clock_face_do_settings_mode(event, settings, state);
+        return _world_clock_face_do_settings_mode(event, state);
     }
 }
 
-void world_clock_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void world_clock_face_resign(void *context) {
     (void) context;
 }
index bca82cd94ac90892dfbf9591f25b3e53eba11b29..7cb1b252cccfb3b0b0646741c48e05aa42bdca19 100644 (file)
@@ -65,10 +65,10 @@ typedef struct {
     int32_t current_offset;
 } world_clock_state_t;
 
-void world_clock_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void world_clock_face_activate(movement_settings_t *settings, void *context);
-bool world_clock_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void world_clock_face_resign(movement_settings_t *settings, void *context);
+void world_clock_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void world_clock_face_activate(void *context);
+bool world_clock_face_loop(movement_event_t event, void *context);
+void world_clock_face_resign(void *context);
 
 uint8_t world_clock_face_get_weekday(uint16_t day, uint16_t month, uint16_t year);
 
index 781481dfccf129238845fdc0dc737f9c12ddfa0a..2ef3ef9763333c6430ff99e7b9d853394ee2445b 100644 (file)
@@ -59,14 +59,13 @@ static inline void load_countdown(countdown_state_t *state) {
     state->seconds = state->set_seconds;
 }
 
-static inline void button_beep(movement_settings_t *settings) {
+static inline void button_beep() {
     // play a beep as confirmation for a button press (if applicable)
     if (movement_button_should_sound())
         watch_buzzer_play_note(BUZZER_NOTE_C7, 50);
 }
 
-static void schedule_countdown(countdown_state_t *state, movement_settings_t *settings) {
-    (void) settings;
+static void schedule_countdown(countdown_state_t *state) {
 
     // Calculate the new state->now_ts but don't update it until we've updated the target - 
     // avoid possible race where the old target is compared to the new time and immediately triggers
@@ -77,15 +76,15 @@ static void schedule_countdown(countdown_state_t *state, movement_settings_t *se
     movement_schedule_background_task_for_face(state->watch_face_index, target_dt);
 }
 
-static void auto_repeat(countdown_state_t *state, movement_settings_t *settings) {
+static void auto_repeat(countdown_state_t *state) {
     movement_play_alarm();
     load_countdown(state);
-    schedule_countdown(state, settings);
+    schedule_countdown(state);
 }
 
-static void start(countdown_state_t *state, movement_settings_t *settings) {
+static void start(countdown_state_t *state) {
     state->mode = cd_running;
-    schedule_countdown(state, settings);
+    schedule_countdown(state);
 }
 
 
@@ -153,9 +152,9 @@ static void ring(countdown_state_t *state) {
     reset(state);
 }
 
-static void times_up(movement_settings_t *settings, countdown_state_t *state) {
+static void times_up(countdown_state_t *state) {
     if(state->repeat) {
-        auto_repeat(state, settings);
+        auto_repeat(state);
     }
     else {
         ring(state);
@@ -180,8 +179,7 @@ static void settings_increment(countdown_state_t *state) {
     return;
 }
 
-void countdown_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void countdown_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
 
     if (*context_ptr == NULL) {
@@ -195,8 +193,7 @@ void countdown_face_setup(movement_settings_t *settings, uint8_t watch_face_inde
     }
 }
 
-void countdown_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void countdown_face_activate(void *context) {
     countdown_state_t *state = (countdown_state_t *)context;
     if(state->mode == cd_running) {
         watch_date_time now = watch_rtc_get_date_time();
@@ -211,8 +208,7 @@ void countdown_face_activate(movement_settings_t *settings, void *context) {
     quick_ticks_running = false;
 }
 
-bool countdown_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
-    (void) settings;
+bool countdown_face_loop(movement_event_t event, void *context) {
     countdown_state_t *state = (countdown_state_t *)context;
 
     switch (event.event_type) {
@@ -244,7 +240,7 @@ bool countdown_face_loop(movement_event_t event, movement_settings_t *settings,
                     break;
                 case cd_paused:
                     reset(state);
-                    button_beep(settings);
+                    button_beep();
                     break;
                 case cd_setting:
                     state->selection++;
@@ -253,7 +249,7 @@ bool countdown_face_loop(movement_event_t event, movement_settings_t *settings,
                         state->mode = cd_reset;
                         store_countdown(state);
                         movement_request_tick_frequency(1);
-                        button_beep(settings);
+                        button_beep();
                     }
                     break;
             }
@@ -263,14 +259,14 @@ bool countdown_face_loop(movement_event_t event, movement_settings_t *settings,
             switch(state->mode) {
                 case cd_running:
                     pause(state);
-                    button_beep(settings);
+                    button_beep();
                     break;
                 case cd_reset:
                 case cd_paused:
                     if (!(state->hours == 0 && state->minutes == 0 && state->seconds == 0)) {
                         // Only start the timer if we have a valid time.
-                        start(state, settings);
-                        button_beep(settings);
+                        start(state);
+                        button_beep();
                         watch_set_indicator(WATCH_INDICATOR_SIGNAL);
                     }
                     break;
@@ -286,7 +282,7 @@ bool countdown_face_loop(movement_event_t event, movement_settings_t *settings,
                     // long press in reset mode enters settings
                     state->mode = cd_setting;
                     movement_request_tick_frequency(4);
-                    button_beep(settings);
+                    button_beep();
                     break;
                 case cd_setting:
                     // long press in settings mode starts quick ticks for adjusting the time
@@ -314,7 +310,7 @@ bool countdown_face_loop(movement_event_t event, movement_settings_t *settings,
                 }
             } else {
                 // Toggle auto-repeat
-                button_beep(settings);
+                button_beep();
                 state->repeat = !state->repeat;
                 if(state->repeat)
                     watch_set_indicator(WATCH_INDICATOR_BELL);
@@ -326,7 +322,7 @@ bool countdown_face_loop(movement_event_t event, movement_settings_t *settings,
             abort_quick_ticks(state);
             break;
         case EVENT_BACKGROUND_TASK:
-            times_up(settings, state);
+            times_up(state);
             break;
         case EVENT_TIMEOUT:
             if (state->mode == cd_setting) {
@@ -334,7 +330,7 @@ bool countdown_face_loop(movement_event_t event, movement_settings_t *settings,
                 state->mode = cd_reset;
                 store_countdown(state);
                 movement_request_tick_frequency(1);
-                button_beep(settings);
+                button_beep();
             }
             break;
         case EVENT_LOW_ENERGY_UPDATE:
@@ -342,15 +338,14 @@ bool countdown_face_loop(movement_event_t event, movement_settings_t *settings,
             // intentionally squelch the light default event; we only show the light when cd is running or reset
             break;
         default:
-            movement_default_loop_handler(event, settings);
+            movement_default_loop_handler(event);
             break;
     }
 
     return true;
 }
 
-void countdown_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void countdown_face_resign(void *context) {
     countdown_state_t *state = (countdown_state_t *)context;
     if (state->mode == cd_setting) {
         state->selection = 0;
index 0f9cd8d400510b5868360b2700c17c3b17b568d5..dc8b1bfc79f48d7f76181f7d440a55ac224d7ba5 100644 (file)
@@ -67,10 +67,10 @@ typedef struct {
 } countdown_state_t;
 
 
-void countdown_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void countdown_face_activate(movement_settings_t *settings, void *context);
-bool countdown_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void countdown_face_resign(movement_settings_t *settings, void *context);
+void countdown_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void countdown_face_activate(void *context);
+bool countdown_face_loop(movement_event_t event, void *context);
+void countdown_face_resign(void *context);
 
 #define countdown_face ((const watch_face_t){ \
     countdown_face_setup, \
index 8fc1466e0227dfb9f1f9559e94f1c4bb78b0dedb..53237cb91c042ff89846280513a4579d1e7f0c2f 100644 (file)
@@ -37,8 +37,7 @@ const char preferences_face_titles[PREFERENCES_PAGE_NUM_PREFERENCES][11] = {
     "LT   blue ",   // Light: blue component (for watches with blue LED)
 };
 
-void preferences_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void preferences_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) {
         *context_ptr = malloc(sizeof(preferences_state_t));
@@ -62,14 +61,13 @@ void preferences_face_setup(movement_settings_t *settings, uint8_t watch_face_in
     }
 }
 
-void preferences_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void preferences_face_activate(void *context) {
     preferences_state_t *state = (preferences_state_t *)context;
     state->current_page = 0;
     movement_request_tick_frequency(4); // we need to manually blink some pixels
 }
 
-bool preferences_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool preferences_face_loop(movement_event_t event, void *context) {
     preferences_state_t *state = (preferences_state_t *)context;
     movement_color_t color; // to use in the switch if we need it
 
@@ -225,7 +223,7 @@ bool preferences_face_loop(movement_event_t event, movement_settings_t *settings
             movement_move_to_face(0);
             break;
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     if (state->current_page == PREFERENCES_PAGE_LED_RED ||
@@ -243,8 +241,7 @@ bool preferences_face_loop(movement_event_t event, movement_settings_t *settings
     }
 }
 
-void preferences_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void preferences_face_resign(void *context) {
     (void) context;
     movement_force_led_off();
     movement_store_settings();
index c9ab68f6d4b8e793a355a971191ac139f004a7b3..7b085d862ea59d7b8d5c40ca7dd30b51c7809924 100644 (file)
@@ -99,10 +99,10 @@ typedef struct {
     preferences_page_t current_page;
 } preferences_state_t;
 
-void preferences_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void preferences_face_activate(movement_settings_t *settings, void *context);
-bool preferences_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void preferences_face_resign(movement_settings_t *settings, void *context);
+void preferences_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void preferences_face_activate(void *context);
+bool preferences_face_loop(movement_event_t event, void *context);
+void preferences_face_resign(void *context);
 
 #define preferences_face ((const watch_face_t){ \
     preferences_face_setup, \
index 312a886f641d20f0a1184a46952c06052e1f79d1..ff7f46ba8cb6154f0c2c2b05a9ece7e2bd438180 100644 (file)
@@ -34,7 +34,7 @@ const char set_time_face_titles[SET_TIME_FACE_NUM_SETTINGS][3] = {"HR", "M1", "S
 
 static bool _quick_ticks_running;
 
-static void _handle_alarm_button(movement_settings_t *settings, watch_date_time date_time, uint8_t current_page) {
+static void _handle_alarm_button(watch_date_time date_time, uint8_t current_page) {
     // handles short or long pressing of the alarm button
 
     switch (current_page) {
@@ -74,27 +74,25 @@ static void _abort_quick_ticks() {
     }
 }
 
-void set_time_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
-    (void) settings;
+void set_time_face_setup(uint8_t watch_face_index, void ** context_ptr) {
     (void) watch_face_index;
     if (*context_ptr == NULL) *context_ptr = malloc(sizeof(uint8_t));
 }
 
-void set_time_face_activate(movement_settings_t *settings, void *context) {
-    (void) settings;
+void set_time_face_activate(void *context) {
     *((uint8_t *)context) = 0;
     movement_request_tick_frequency(4);
     _quick_ticks_running = false;
 }
 
-bool set_time_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
+bool set_time_face_loop(movement_event_t event, void *context) {
     uint8_t current_page = *((uint8_t *)context);
     watch_date_time date_time = watch_rtc_get_date_time();
 
     switch (event.event_type) {
         case EVENT_TICK:
             if (_quick_ticks_running) {
-                if (HAL_GPIO_BTN_ALARM_read()) _handle_alarm_button(settings, date_time, current_page);
+                if (HAL_GPIO_BTN_ALARM_read()) _handle_alarm_button(date_time, current_page);
                 else _abort_quick_ticks();
             }
             break;
@@ -117,14 +115,14 @@ bool set_time_face_loop(movement_event_t event, movement_settings_t *settings, v
             break;
         case EVENT_ALARM_BUTTON_UP:
             _abort_quick_ticks();
-            _handle_alarm_button(settings, date_time, current_page);
+            _handle_alarm_button(date_time, current_page);
             break;
         case EVENT_TIMEOUT:
             _abort_quick_ticks();
             movement_move_to_face(0);
             break;
         default:
-            return movement_default_loop_handler(event, settings);
+            return movement_default_loop_handler(event);
     }
 
     char buf[11];
@@ -178,8 +176,7 @@ bool set_time_face_loop(movement_event_t event, movement_settings_t *settings, v
     return true;
 }
 
-void set_time_face_resign(movement_settings_t *settings, void *context) {
-    (void) settings;
+void set_time_face_resign(void *context) {
     (void) context;
     watch_set_led_off();
     movement_store_settings();
index f66dc9e42a14a3635c04ae5982aab73c4e9f62b7..7f2c26310cb9f45dc13893e22df813c3263dd58d 100644 (file)
 
 #include "movement.h"
 
-void set_time_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
-void set_time_face_activate(movement_settings_t *settings, void *context);
-bool set_time_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
-void set_time_face_resign(movement_settings_t *settings, void *context);
+void set_time_face_setup(uint8_t watch_face_index, void ** context_ptr);
+void set_time_face_activate(void *context);
+bool set_time_face_loop(movement_event_t event, void *context);
+void set_time_face_resign(void *context);
 
 #define set_time_face ((const watch_face_t){ \
     set_time_face_setup, \