[FL-1796] Disable bluetooth (#703)

* bt: add authentication for all characteristics
* bt: app_ble cleanup
* bt: add start and stop advertising API
* bt: rework application with start and stop advertising API
* bt: support f7 target
* bt: f7 target remove unused files
* bt: stop advertising in bt debug application
* bt: fix bt status bar update
* bt: change bluetooth On Off order
This commit is contained in:
gornekich
2021-09-15 19:58:32 +03:00
committed by GitHub
parent 8fd411097e
commit 4768177cf5
33 changed files with 768 additions and 785 deletions

View File

@@ -31,12 +31,11 @@ BtSettingsApp* bt_settings_app_alloc() {
view_dispatcher_attach_to_gui(app->view_dispatcher, app->gui, ViewDispatcherTypeFullscreen);
app->submenu = submenu_alloc();
app->var_item_list = variable_item_list_alloc();
view_dispatcher_add_view(
app->view_dispatcher, BtSettingsAppViewSubmenu, submenu_get_view(app->submenu));
app->dialog_ex = dialog_ex_alloc();
view_dispatcher_add_view(
app->view_dispatcher, BtSettingsAppViewDialogEx, dialog_ex_get_view(app->dialog_ex));
app->view_dispatcher,
BtSettingsAppViewVarItemList,
variable_item_list_get_view(app->var_item_list));
scene_manager_next_scene(app->scene_manager, BtSettingsAppSceneStart);
return app;
@@ -44,12 +43,9 @@ BtSettingsApp* bt_settings_app_alloc() {
void bt_settings_app_free(BtSettingsApp* app) {
furi_assert(app);
// Submenu
view_dispatcher_remove_view(app->view_dispatcher, BtSettingsAppViewSubmenu);
submenu_free(app->submenu);
// Dialog
view_dispatcher_remove_view(app->view_dispatcher, BtSettingsAppViewDialogEx);
dialog_ex_free(app->dialog_ex);
// Variable item list
view_dispatcher_remove_view(app->view_dispatcher, BtSettingsAppViewVarItemList);
variable_item_list_free(app->var_item_list);
// View dispatcher
view_dispatcher_free(app->view_dispatcher);
scene_manager_free(app->scene_manager);