diff options
author | gornekich <n.gorbadey@gmail.com> | 2021-12-17 16:24:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-17 16:24:37 +0300 |
commit | 93871f942552597846b582ab277ba0e28856a52d (patch) | |
tree | 5486290bfacd4aaf73e19f1e47cf7d1773901675 /applications/bt | |
parent | e109e2e3e86236e377651fcf03d7ba4b625b863f (diff) |
BT hid navigation fix (#911)
* bt: fix bt hid navigation
* Cli: change datetime format to more ISO-ish, add datetime validation.
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
Diffstat (limited to 'applications/bt')
-rwxr-xr-x | applications/bt/bt_hid_app/bt_hid.c | 9 | ||||
-rw-r--r-- | applications/bt/bt_hid_app/bt_hid.h | 2 | ||||
-rwxr-xr-x | applications/bt/bt_service/bt.c | 1 |
3 files changed, 2 insertions, 10 deletions
diff --git a/applications/bt/bt_hid_app/bt_hid.c b/applications/bt/bt_hid_app/bt_hid.c index 6a93ce85..020a26b8 100755 --- a/applications/bt/bt_hid_app/bt_hid.c +++ b/applications/bt/bt_hid_app/bt_hid.c @@ -28,7 +28,7 @@ void bt_hid_dialog_callback(DialogExResult result, void* context) { // TODO switch to Submenu after Media is done view_dispatcher_stop(app->view_dispatcher); } else if(result == DialogExResultRight) { - view_dispatcher_switch_to_view(app->view_dispatcher, app->view_id); + view_dispatcher_switch_to_view(app->view_dispatcher, BtHidViewKeynote); } } @@ -56,9 +56,6 @@ void bt_hid_connection_status_changed_callback(BtStatus status, void* context) { BtHid* bt_hid_app_alloc() { BtHid* app = furi_alloc(sizeof(BtHid)); - // Load Bluetooth settings - bt_settings_load(&app->bt_settings); - // Gui app->gui = furi_record_open("gui"); @@ -156,10 +153,6 @@ int32_t bt_hid_app(void* p) { view_dispatcher_run(app->view_dispatcher); bt_set_status_changed_callback(app->bt, NULL, NULL); - // Stop advertising if bt was off - if(app->bt_settings.enabled) { - furi_hal_bt_stop_advertising(); - } // Change back profile to Serial bt_set_profile(app->bt, BtProfileSerial); diff --git a/applications/bt/bt_hid_app/bt_hid.h b/applications/bt/bt_hid_app/bt_hid.h index 4156b44b..875cac58 100644 --- a/applications/bt/bt_hid_app/bt_hid.h +++ b/applications/bt/bt_hid_app/bt_hid.h @@ -6,7 +6,6 @@ #include <gui/view.h> #include <gui/view_dispatcher.h> #include <applications/notification/notification.h> -#include <applications/bt/bt_settings.h> #include <gui/modules/submenu.h> #include <gui/modules/dialog_ex.h> @@ -14,7 +13,6 @@ #include "views/bt_hid_media.h" typedef struct { - BtSettings bt_settings; Bt* bt; Gui* gui; NotificationApp* notifications; diff --git a/applications/bt/bt_service/bt.c b/applications/bt/bt_service/bt.c index 4dfcdfb7..fdd43ec4 100755 --- a/applications/bt/bt_service/bt.c +++ b/applications/bt/bt_service/bt.c @@ -235,6 +235,7 @@ static void bt_statusbar_update(Bt* bt) { } static void bt_change_profile(Bt* bt, BtMessage* message) { + bt_settings_load(&bt->bt_settings); if(bt->profile == BtProfileSerial && bt->rpc_session) { FURI_LOG_I(TAG, "Close RPC connection"); osEventFlagsSet(bt->rpc_event, BT_RPC_EVENT_DISCONNECTED); |