[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:
@@ -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 &&
|
||||
|
Reference in New Issue
Block a user