diff --git a/applications/external b/applications/external index ae8e6f476..a1fd07bd3 160000 --- a/applications/external +++ b/applications/external @@ -1 +1 @@ -Subproject commit ae8e6f4764f80cd6f9522664b60c72704118b764 +Subproject commit a1fd07bd395ec091e4eb7df6d2ea2f9526a6e2fa diff --git a/applications/main/subghz/scenes/subghz_scene_receiver.c b/applications/main/subghz/scenes/subghz_scene_receiver.c index dd9016ee9..5fad0405b 100644 --- a/applications/main/subghz/scenes/subghz_scene_receiver.c +++ b/applications/main/subghz/scenes/subghz_scene_receiver.c @@ -206,7 +206,7 @@ static void subghz_scene_add_to_history_callback( const char* suf = subghz->last_settings->protocol_file_names ? decoder_base->protocol->name : SUBGHZ_APP_FILENAME_PREFIX; - FuriHalRtcDateTime time = subghz_history_get_datetime(history, idx); + DateTime time = subghz_history_get_datetime(history, idx); name_generator_make_detailed_datetime(file, sizeof(file), suf, &time, true); // Dir name FuriString* path = furi_string_alloc_set(SUBGHZ_APP_FOLDER "/Autosave"); @@ -493,7 +493,7 @@ bool subghz_scene_receiver_on_event(void* context, SceneManagerEvent event) { subghz->threshold_rssi, subghz_txrx_radio_device_get_rssi(subghz->txrx)); if(subghz->last_settings->gps_baudrate != 0) { - FuriHalRtcDateTime datetime; + DateTime datetime; furi_hal_rtc_get_datetime(&datetime); if((datetime.second - subghz->gps->fix_second) > 15) { subghz->gps->latitude = NAN; diff --git a/applications/main/subghz/scenes/subghz_scene_saved_show_gps.c b/applications/main/subghz/scenes/subghz_scene_saved_show_gps.c index fa085888d..cbc95f400 100644 --- a/applications/main/subghz/scenes/subghz_scene_saved_show_gps.c +++ b/applications/main/subghz/scenes/subghz_scene_saved_show_gps.c @@ -10,7 +10,7 @@ void subghz_scene_saved_show_gps_draw_satellites(void* context) { subghz_txrx_get_latitude_and_longitude(subghz->txrx, lat_str, lon_str); - FuriHalRtcDateTime datetime; + DateTime datetime; furi_hal_rtc_get_datetime(&datetime); if((datetime.second - subghz->gps->fix_second) > 15) { subghz->gps->latitude = NAN; diff --git a/applications/main/subghz/scenes/subghz_scene_show_gps.c b/applications/main/subghz/scenes/subghz_scene_show_gps.c index ef3d18709..f28607652 100644 --- a/applications/main/subghz/scenes/subghz_scene_show_gps.c +++ b/applications/main/subghz/scenes/subghz_scene_show_gps.c @@ -7,7 +7,7 @@ void subghz_scene_show_gps_draw_satellites(void* context) { FuriString* text = furi_string_alloc(); FuriString* time_text = furi_string_alloc(); - FuriHalRtcDateTime datetime; + DateTime datetime; furi_hal_rtc_get_datetime(&datetime); if((datetime.second - subghz->gps->fix_second) > 15) { subghz->gps->latitude = NAN; diff --git a/applications/main/subghz/subghz_history.c b/applications/main/subghz/subghz_history.c index c9024857b..e312039dc 100644 --- a/applications/main/subghz/subghz_history.c +++ b/applications/main/subghz/subghz_history.c @@ -210,10 +210,7 @@ bool subghz_history_get_text_space_left( furi_string_printf(output, "%02u", instance->last_index_write); return false; } else { - FuriHalRtcDateTime datetime; - furi_hal_rtc_get_datetime(&datetime); - - if(furi_hal_rtc_datetime_to_timestamp(&datetime) % 2) { + if(furi_hal_rtc_get_timestamp() % 2) { furi_string_printf(output, "%02u", instance->last_index_write); } else { furi_string_printf(output, "%d sats", sats); diff --git a/applications/services/desktop/views/desktop_view_locked.c b/applications/services/desktop/views/desktop_view_locked.c index 12f27bba0..24ebd760b 100644 --- a/applications/services/desktop/views/desktop_view_locked.c +++ b/applications/services/desktop/views/desktop_view_locked.c @@ -69,7 +69,7 @@ void desktop_view_locked_draw_lockscreen(Canvas* canvas, void* m) { char second_str[5]; char date_str[14]; char meridian_str[3]; - FuriHalRtcDateTime datetime; + DateTime datetime; furi_hal_rtc_get_datetime(&datetime); LocaleTimeFormat time_format = locale_get_time_format(); LocaleDateFormat date_format = locale_get_date_format(); diff --git a/applications/services/dolphin/helpers/dolphin_state.c b/applications/services/dolphin/helpers/dolphin_state.c index 6d493ade6..7dba83129 100644 --- a/applications/services/dolphin/helpers/dolphin_state.c +++ b/applications/services/dolphin/helpers/dolphin_state.c @@ -73,9 +73,7 @@ bool dolphin_state_load(DolphinState* dolphin_state) { } uint64_t dolphin_state_timestamp() { - DateTime datetime; - furi_hal_rtc_get_datetime(&datetime); - return datetime_datetime_to_timestamp(&datetime); + return furi_hal_rtc_get_timestamp(); } bool dolphin_state_is_levelup(uint32_t icounter) { diff --git a/applications/system/nightstand/clock_app.c b/applications/system/nightstand/clock_app.c index b692d6d3f..e8d00906b 100644 --- a/applications/system/nightstand/clock_app.c +++ b/applications/system/nightstand/clock_app.c @@ -225,9 +225,7 @@ static void clock_tick(void* ctx) { void timer_start_stop(ClockState* plugin_state) { // START/STOP TIMER - FuriHalRtcDateTime 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 = furi_hal_rtc_get_timestamp(); if(plugin_state->timer_running) { // Update stopped seconds diff --git a/lib/subghz/protocols/tpms_generic.c b/lib/subghz/protocols/tpms_generic.c index 0251c2161..882c08eb6 100644 --- a/lib/subghz/protocols/tpms_generic.c +++ b/lib/subghz/protocols/tpms_generic.c @@ -120,9 +120,7 @@ SubGhzProtocolStatus tpms_block_generic_serialize( } //DATE AGE set - FuriHalRtcDateTime 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 = furi_hal_rtc_get_timestamp(); temp_data = curr_ts; if(!flipper_format_write_uint32(flipper_format, "Ts", &temp_data, 1)) { diff --git a/lib/subghz/protocols/ws_generic.c b/lib/subghz/protocols/ws_generic.c index 0fcbd3f33..3db1c4835 100644 --- a/lib/subghz/protocols/ws_generic.c +++ b/lib/subghz/protocols/ws_generic.c @@ -121,9 +121,7 @@ SubGhzProtocolStatus ws_block_generic_serialize( } //DATE AGE set - FuriHalRtcDateTime 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 = furi_hal_rtc_get_timestamp(); temp_data = curr_ts; if(!flipper_format_write_uint32(flipper_format, "Ts", &temp_data, 1)) {