mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-12 16:28:36 -07:00
We can haz debugger support!!!!! Begone -Og
This commit is contained in:
@@ -165,6 +165,15 @@ static bool update_task_post_update(UpdateTask* update_task) {
|
||||
|
||||
CHECK_RESULT(lfs_backup_unpack(update_task->storage, furi_string_get_cstr(file_path)));
|
||||
|
||||
#ifdef FURI_DEBUG
|
||||
furi_hal_rtc_set_flag(FuriHalRtcFlagDebug);
|
||||
#else
|
||||
furi_hal_rtc_set_log_level(FuriLogLevelNone);
|
||||
furi_hal_rtc_reset_flag(FuriHalRtcFlagDebug);
|
||||
furi_hal_rtc_reset_flag(FuriHalRtcFlagLegacySleep);
|
||||
furi_hal_rtc_set_heap_track_mode(FuriHalRtcHeapTrackModeNone);
|
||||
#endif
|
||||
|
||||
if(update_task->state.groups & UpdateTaskStageGroupResources) {
|
||||
TarUnpackProgress progress = {
|
||||
.update_task = update_task,
|
||||
|
||||
@@ -344,13 +344,7 @@ int32_t update_task_worker_flash_writer(void* context) {
|
||||
furi_hal_rtc_set_boot_mode(FuriHalRtcBootModePostUpdate);
|
||||
// Format LFS before restoring backup on next boot
|
||||
furi_hal_rtc_set_flag(FuriHalRtcFlagStorageFormatInternal);
|
||||
#ifdef FURI_NDEBUG
|
||||
// Production
|
||||
furi_hal_rtc_set_log_level(FuriLogLevelNone);
|
||||
furi_hal_rtc_reset_flag(FuriHalRtcFlagDebug);
|
||||
furi_hal_rtc_reset_flag(FuriHalRtcFlagLegacySleep);
|
||||
furi_hal_rtc_set_heap_track_mode(FuriHalRtcHeapTrackModeNone);
|
||||
#endif
|
||||
|
||||
update_task_set_progress(update_task, UpdateTaskStageCompleted, 100);
|
||||
success = true;
|
||||
} while(false);
|
||||
|
||||
Reference in New Issue
Block a user