Skip to content

Commit

Permalink
Merge pull request #10 from prplecake/update
Browse files Browse the repository at this point in the history
Use new DateTime lib
  • Loading branch information
wosk authored Apr 8, 2024
2 parents 6110a60 + 47c8b60 commit 837c854
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions protocols/tpms_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
8 changes: 4 additions & 4 deletions views/tpms_receiver_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 837c854

Please sign in to comment.