summaryrefslogtreecommitdiffstats
path: root/launcher/widgets/settings/preferences_widget.c
diff options
context:
space:
mode:
authorJoey Castillo <jose.castillo@gmail.com>2021-10-04 00:37:58 -0400
committerJoey Castillo <jose.castillo@gmail.com>2021-10-04 00:38:09 -0400
commit51e2f0d77d95a6e5c3b1426fbc7874c3a59a5e00 (patch)
tree7f8f5a03415ef46d8bb11a7195bbc310aa1a64e5 /launcher/widgets/settings/preferences_widget.c
parenta6115de94d977da69a6a81f93a92706e76324a37 (diff)
downloadSensor-Watch-51e2f0d77d95a6e5c3b1426fbc7874c3a59a5e00.tar.gz
Sensor-Watch-51e2f0d77d95a6e5c3b1426fbc7874c3a59a5e00.tar.bz2
Sensor-Watch-51e2f0d77d95a6e5c3b1426fbc7874c3a59a5e00.zip
event type / subsecond refactor
Diffstat (limited to 'launcher/widgets/settings/preferences_widget.c')
-rw-r--r--launcher/widgets/settings/preferences_widget.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/launcher/widgets/settings/preferences_widget.c b/launcher/widgets/settings/preferences_widget.c
index 5877c237..d4abeb8e 100644
--- a/launcher/widgets/settings/preferences_widget.c
+++ b/launcher/widgets/settings/preferences_widget.c
@@ -16,12 +16,12 @@ void preferences_widget_activate(LauncherSettings *settings, void *context) {
launcher_request_tick_frequency(4); // we need to manually blink some pixels
}
-void preferences_widget_loop(LauncherEvent event, LauncherSettings *settings, uint8_t subsecond, void *context) {
+void preferences_widget_loop(LauncherEvent event, LauncherSettings *settings, void *context) {
(void) settings;
(void) context;
printf("preferences_widget_loop\n");
uint8_t current_page = *((uint8_t *)context);
- switch (event) {
+ switch (event.bit.event_type) {
case EVENT_MODE_BUTTON_UP:
launcher_move_to_next_widget();
return;
@@ -63,7 +63,7 @@ void preferences_widget_loop(LauncherEvent event, LauncherSettings *settings, ui
watch_set_led_off();
}
- if (subsecond % 2) return;
+ if (event.bit.subsecond % 2) return;
char buf[3];
switch (current_page) {
case 0: