summaryrefslogtreecommitdiffstats
path: root/launcher/widgets/settings
diff options
context:
space:
mode:
authorJoey Castillo <jose.castillo@gmail.com>2021-10-06 10:25:28 -0400
committerJoey Castillo <jose.castillo@gmail.com>2021-10-06 11:17:16 -0400
commit3516f4295eafbb04f7ccd1f4947c4921fae6e9bf (patch)
treecf70627d085cf3a6a9b51330ec82b7543f1e029f /launcher/widgets/settings
parent12ee9221354c863bddb21a076dd3e3bdface3c67 (diff)
downloadSensor-Watch-3516f4295eafbb04f7ccd1f4947c4921fae6e9bf.tar.gz
Sensor-Watch-3516f4295eafbb04f7ccd1f4947c4921fae6e9bf.tar.bz2
Sensor-Watch-3516f4295eafbb04f7ccd1f4947c4921fae6e9bf.zip
launcher: clean up structs
Diffstat (limited to 'launcher/widgets/settings')
-rw-r--r--launcher/widgets/settings/preferences_widget.c4
-rw-r--r--launcher/widgets/settings/set_time_widget.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/launcher/widgets/settings/preferences_widget.c b/launcher/widgets/settings/preferences_widget.c
index 40e0ac50..1618a72c 100644
--- a/launcher/widgets/settings/preferences_widget.c
+++ b/launcher/widgets/settings/preferences_widget.c
@@ -19,7 +19,7 @@ void preferences_widget_activate(LauncherSettings *settings, void *context) {
bool preferences_widget_loop(LauncherEvent event, LauncherSettings *settings, void *context) {
printf("preferences_widget_loop\n");
uint8_t current_page = *((uint8_t *)context);
- switch (event.bit.event_type) {
+ switch (event.event_type) {
case EVENT_MODE_BUTTON_UP:
watch_set_led_off();
launcher_move_to_next_widget();
@@ -53,7 +53,7 @@ bool preferences_widget_loop(LauncherEvent event, LauncherSettings *settings, vo
watch_display_string((char *)preferences_widget_titles[current_page], 0);
- if (event.bit.subsecond % 2) return current_page <= 2;
+ if (event.subsecond % 2) return current_page <= 2;
char buf[3];
switch (current_page) {
case 0:
diff --git a/launcher/widgets/settings/set_time_widget.c b/launcher/widgets/settings/set_time_widget.c
index c7949a4f..d8cfb9fc 100644
--- a/launcher/widgets/settings/set_time_widget.c
+++ b/launcher/widgets/settings/set_time_widget.c
@@ -21,7 +21,7 @@ bool set_time_widget_loop(LauncherEvent event, LauncherSettings *settings, void
const uint8_t days_in_month[12] = {31, 28, 31, 30, 31, 30, 30, 31, 30, 31, 30, 31};
watch_date_time date_time = watch_rtc_get_date_time();
- switch (event.bit.event_type) {
+ switch (event.event_type) {
case EVENT_MODE_BUTTON_UP:
launcher_move_to_next_widget();
return false;
@@ -79,7 +79,7 @@ bool set_time_widget_loop(LauncherEvent event, LauncherSettings *settings, void
watch_clear_indicator(WATCH_INDICATOR_PM);
sprintf(buf, "%s %2d%02d%02d", set_time_widget_titles[current_page], date_time.unit.year + 20, date_time.unit.month, date_time.unit.day);
}
- if (event.bit.subsecond % 2) {
+ if (event.subsecond % 2) {
switch (current_page) {
case 0:
case 3: