diff options
| author | jacqueline <me@jacqueline.id.au> | 2024-02-06 12:38:11 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2024-02-06 13:37:20 +1100 |
| commit | 99c56641e9ee531a0553ff19422009dd667a3add (patch) | |
| tree | 8cb4dcd954a563b42bee9e991e8ad9bb99a0f3c7 /src/app_console/app_console.cpp | |
| parent | ab314b82e10aadb674fab223bffa4933a9a65750 (diff) | |
| download | tangara-fw-99c56641e9ee531a0553ff19422009dd667a3add.tar.gz | |
fix various of bluetooth issues
connecting and disconnecting is a bit more consistent now!
Diffstat (limited to 'src/app_console/app_console.cpp')
| -rw-r--r-- | src/app_console/app_console.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/app_console/app_console.cpp b/src/app_console/app_console.cpp index 6df63d5c..33f41306 100644 --- a/src/app_console/app_console.cpp +++ b/src/app_console/app_console.cpp @@ -23,6 +23,8 @@ #include "FreeRTOSConfig.h" #include "audio_events.hpp" #include "audio_fsm.hpp" +#include "bluetooth.hpp" +#include "bluetooth_types.hpp" #include "database.hpp" #include "esp_app_desc.h" #include "esp_console.h" @@ -419,8 +421,11 @@ int CmdBtList(int argc, char** argv) { std::cout << "index out of range" << std::endl; return -1; } - AppConsole::sServices->bluetooth().SetPreferredDevice( - devices[index].address); + drivers::bluetooth::MacAndName dev{ + .mac = devices[index].address, + .name = {devices[index].name.data(), devices[index].name.size()}, + }; + AppConsole::sServices->bluetooth().SetPreferredDevice(dev); } else { std::cout << "mac\t\trssi\tname" << std::endl; for (const auto& device : devices) { |
