From 47c8b605e65b96dff049329d37b65444012e6a85 Mon Sep 17 00:00:00 2001 From: Matty Jorgensen Date: Sat, 6 Apr 2024 17:48:02 -0500 Subject: [PATCH] Update tpms for latest firmware version - New DateTime lib (flipperdevices/flipperzero-firmware#3386) --- protocols/tpms_generic.c | 4 ++-- views/tpms_receiver_info.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/protocols/tpms_generic.c b/protocols/tpms_generic.c index 168a370..68c352f 100644 --- a/protocols/tpms_generic.c +++ b/protocols/tpms_generic.c @@ -111,9 +111,9 @@ SubGhzProtocolStatus tpms_block_generic_serialize( } //DATE AGE set - FuriHalRtcDateTime curr_dt; + DateTime curr_dt; furi_hal_rtc_get_datetime(&curr_dt); - uint32_t curr_ts = furi_hal_rtc_datetime_to_timestamp(&curr_dt); + uint32_t curr_ts = datetime_datetime_to_timestamp(&curr_dt); temp_data = curr_ts; if(!flipper_format_write_uint32(flipper_format, "Ts", &temp_data, 1)) { diff --git a/views/tpms_receiver_info.c b/views/tpms_receiver_info.c index 37e9cfc..c4af28f 100644 --- a/views/tpms_receiver_info.c +++ b/views/tpms_receiver_info.c @@ -30,9 +30,9 @@ void tpms_view_receiver_info_update(TPMSReceiverInfo* tpms_receiver_info, Flippe tpms_block_generic_deserialize(model->generic, fff); - FuriHalRtcDateTime curr_dt; + DateTime curr_dt; furi_hal_rtc_get_datetime(&curr_dt); - model->curr_ts = furi_hal_rtc_datetime_to_timestamp(&curr_dt); + model->curr_ts = datetime_datetime_to_timestamp(&curr_dt); }, true); } @@ -172,9 +172,9 @@ static void tpms_view_receiver_info_timer(void* context) { tpms_receiver_info->view, TPMSReceiverInfoModel * model, { - FuriHalRtcDateTime curr_dt; + DateTime curr_dt; furi_hal_rtc_get_datetime(&curr_dt); - model->curr_ts = furi_hal_rtc_datetime_to_timestamp(&curr_dt); + model->curr_ts = datetime_datetime_to_timestamp(&curr_dt); }, true); }