launcher: clean up structs

This commit is contained in:
Joey Castillo
2021-10-06 10:25:28 -04:00
parent 12ee922135
commit 3516f4295e
6 changed files with 31 additions and 34 deletions

View File

@@ -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:

View File

@@ -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: