refactor time zone index to function calls
This commit is contained in:
@@ -58,8 +58,8 @@ static void _handle_alarm_button(movement_settings_t *settings, watch_date_time
|
||||
break;
|
||||
}
|
||||
case 6: // time zone
|
||||
settings->bit.time_zone++;
|
||||
if (settings->bit.time_zone >= NUM_ZONE_NAMES) settings->bit.time_zone = 0;
|
||||
movement_set_timezone_index(movement_get_timezone_index() + 1);
|
||||
if (movement_get_timezone_index() >= NUM_ZONE_NAMES) movement_set_timezone_index(0);
|
||||
break;
|
||||
}
|
||||
if (date_time.unit.day > days_in_month(date_time.unit.month, date_time.unit.year + WATCH_RTC_REFERENCE_YEAR))
|
||||
@@ -150,8 +150,8 @@ bool set_time_face_loop(movement_event_t event, movement_settings_t *settings, v
|
||||
if (event.subsecond % 2) {
|
||||
memset(buf, ' ', sizeof(buf));
|
||||
} else {
|
||||
watch_display_text(WATCH_POSITION_TOP_LEFT, (char *) (zone_names + 11 * settings->bit.time_zone));
|
||||
sprintf(buf, "%s", (char *) (3 + zone_names + 11 * settings->bit.time_zone));
|
||||
watch_display_text(WATCH_POSITION_TOP_LEFT, (char *) (zone_names + 11 * movement_get_timezone_index()));
|
||||
sprintf(buf, "%s", (char *) (3 + zone_names + 11 * movement_get_timezone_index()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user