Revert PR #470 - fixes world_clock2 face

The DST code has not yet been fully tested, the upcoming movement
refactor is upon us and it will integrate with the micro timezone
library anyway. Revert it so that next can be merged into main.

This reverts commit 3c86a42aa8, reversing
changes made to be969c4deb.
This commit is contained in:
Matheus Afonso Martins Moreira 2024-09-17 17:19:05 -03:00
parent a9d503b807
commit 30267dfc0c
2 changed files with 4 additions and 11 deletions

View file

@ -238,7 +238,6 @@ static bool mode_display(movement_event_t event, movement_settings_t *settings,
break;
case EVENT_ALARM_BUTTON_UP:
state->current_zone = find_selected_zone(state, FORWARD);
state->tz_curr = get_timezone_offset(state->current_zone, watch_rtc_get_date_time());
state->previous_date_time = REFRESH_TIME;
break;
case EVENT_LIGHT_BUTTON_DOWN:
@ -246,7 +245,6 @@ static bool mode_display(movement_event_t event, movement_settings_t *settings,
break;
case EVENT_LIGHT_BUTTON_UP:
state->current_zone = find_selected_zone(state, BACKWARD);
state->tz_curr = get_timezone_offset(state->current_zone, watch_rtc_get_date_time());
state->previous_date_time = REFRESH_TIME;
break;
case EVENT_LIGHT_LONG_PRESS:
@ -320,21 +318,17 @@ static bool mode_settings(movement_event_t event, movement_settings_t *settings,
break;
case EVENT_ALARM_BUTTON_UP:
state->current_zone = mod(state->current_zone + FORWARD, NUM_TIME_ZONES);
state->tz_curr = get_timezone_offset(state->current_zone, watch_rtc_get_date_time());
break;
case EVENT_LIGHT_BUTTON_UP:
state->current_zone = mod(state->current_zone + BACKWARD, NUM_TIME_ZONES);
state->tz_curr = get_timezone_offset(state->current_zone, watch_rtc_get_date_time());
break;
case EVENT_LIGHT_BUTTON_DOWN:
/* Do nothing */
break;
case EVENT_ALARM_LONG_PRESS:
/* Find next selected zone */
if (!state->zones[state->current_zone].selected) {
if (!state->zones[state->current_zone].selected)
state->current_zone = find_selected_zone(state, FORWARD);
state->tz_curr = get_timezone_offset(state->current_zone, watch_rtc_get_date_time());
}
/* Switch to display mode */
state->current_mode = WORLD_CLOCK2_MODE_DISPLAY;

View file

@ -162,7 +162,6 @@ static bool _world_clock_face_do_settings_mode(movement_event_t event, movement_
case 3:
state->settings.bit.timezone_index++;
if (state->settings.bit.timezone_index > 40) state->settings.bit.timezone_index = 0;
state->tz_curr = get_timezone_offset(state->settings.bit.timezone_index, watch_rtc_get_date_time());
break;
}
break;