create movement_get_date_time function

This commit is contained in:
joeycastillo
2022-12-23 18:37:13 -06:00
parent 283a219783
commit a6333f7b8b
25 changed files with 48 additions and 42 deletions

View File

@@ -440,7 +440,7 @@ static void start_reading(accelerometer_data_acquisition_state_t *state, movemen
lis2dw_enable_fifo();
accelerometer_data_acquisition_record_t record;
watch_date_time date_time = watch_rtc_get_date_time();
watch_date_time date_time = movement_get_date_time();
state->starting_timestamp = watch_utility_date_time_to_unix_time(date_time, movement_timezone_offsets[settings->bit.time_zone] * 60);
record.header.info.record_type = ACCELEROMETER_DATA_ACQUISITION_HEADER;
record.header.info.range = ACCELEROMETER_RANGE;

View File

@@ -30,7 +30,7 @@
static void _thermistor_logging_face_log_data(thermistor_logger_state_t *logger_state) {
thermistor_driver_enable();
watch_date_time date_time = watch_rtc_get_date_time();
watch_date_time date_time = movement_get_date_time();
size_t pos = logger_state->data_points % THERMISTOR_LOGGING_NUM_DATA_POINTS;
logger_state->data[pos].timestamp.reg = date_time.reg;
@@ -137,5 +137,5 @@ bool thermistor_logging_face_wants_background_task(movement_settings_t *settings
(void) context;
// this will get called at the top of each minute, so all we check is if we're at the top of the hour as well.
// if we are, we ask for a background task.
return watch_rtc_get_date_time().unit.minute == 0;
return movement_get_date_time().unit.minute == 0;
}

View File

@@ -55,7 +55,7 @@ void thermistor_readout_face_activate(movement_settings_t *settings, void *conte
bool thermistor_readout_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
(void) context;
watch_date_time date_time = watch_rtc_get_date_time();
watch_date_time date_time = movement_get_date_time();
switch (event.event_type) {
case EVENT_MODE_BUTTON_UP:
movement_move_to_next_face();