[FL-2975] Bug fixes and improvements: Furi, Input, Cli (#2004)

* Furi: configurable heap allocation tracking
* Furi: relax restriction in thread heap setter asserts, apply heap tracking setting on app start instead of thread allocation
* Furi: hide dangerous heap tracking levels in release build
* Input: fix non-working debounce
This commit is contained in:
あく
2022-11-12 17:46:04 +09:00
committed by GitHub
parent 721ab717d7
commit 90cefe7c71
10 changed files with 186 additions and 25 deletions

View File

@@ -45,6 +45,13 @@ static void desktop_switch_to_app(Desktop* desktop, const FlipperApplication* fl
return;
}
FuriHalRtcHeapTrackMode mode = furi_hal_rtc_get_heap_track_mode();
if(mode > FuriHalRtcHeapTrackModeNone) {
furi_thread_enable_heap_trace(desktop->scene_thread);
} else {
furi_thread_disable_heap_trace(desktop->scene_thread);
}
furi_thread_set_name(desktop->scene_thread, flipper_app->name);
furi_thread_set_stack_size(desktop->scene_thread, flipper_app->stack_size);
furi_thread_set_callback(desktop->scene_thread, flipper_app->app);