[FL-300] Launch applications from CLI (#380)

* app_loader: release console after cli start app cmd
* furi: add thread state getter
* app_loader: check thread started before launch with cli
* app_loader: remove view port from app loader
* blink: rework blink plugin to manage view and free resources
* vibro: rework vibro plugin to manage view and free resources
* music_player: rework app to manage exit and free resources
* input_dump: rework app to manage exit and free resources
* coreglitch_demo: add app exit and free resources
* floopper-bloopper: update submodule
* app-loader: remove applications context
* rules.mk: add submodule sync
* gui-test: add exit from application
* applications: exit on back short instead of press event
This commit is contained in:
gornekich
2021-03-18 10:58:16 +03:00
committed by GitHub
parent ca9862ef6c
commit 5eba573f43
13 changed files with 311 additions and 135 deletions

View File

@@ -408,8 +408,16 @@ int32_t music_player(void* p) {
if(event_status == osOK) {
if(event.type == EventTypeKey) {
// press events
if(event.value.input.type == InputTypePress &&
if(event.value.input.type == InputTypeShort &&
event.value.input.key == InputKeyBack) {
osThreadTerminate(player);
hal_pwm_stop(&SPEAKER_TIM, SPEAKER_CH);
view_port_enabled_set(view_port, false);
gui_remove_view_port(gui, view_port);
view_port_free(view_port);
osMessageQueueDelete(event_queue);
return 0;
}
if(event.value.input.type == InputTypePress &&