DST roll is now a global variable in watch_rtc

This commit is contained in:
David Volovskiy
2024-08-03 09:33:49 -04:00
parent 74421c7e65
commit e50390b673
12 changed files with 75 additions and 55 deletions

View File

@@ -39,6 +39,19 @@ ext_irq_cb_t btn_alarm_callback;
ext_irq_cb_t a2_callback;
ext_irq_cb_t a4_callback;
static bool dst_skip_rolling_back;
bool get_dst_skip_rolling_back(void) {
return dst_skip_rolling_back;
}
void set_dst_skip_rolling_back(void) {
dst_skip_rolling_back = true;
}
void clear_dst_skip_rolling_back(void) {
dst_skip_rolling_back = false;
}
bool _watch_rtc_is_enabled(void) {
return true;
}
@@ -57,6 +70,7 @@ void watch_rtc_set_date_time(watch_date_time date_time) {
const date = new Date(year, month - 1, day, hour, minute, second);
return date - Date.now();
}, date_time.reg);
clear_dst_skip_rolling_back();
}
watch_date_time watch_rtc_get_date_time(void) {