summaryrefslogtreecommitdiff
path: root/src/ui/ui_fsm.cpp
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2024-02-06 17:56:17 +1100
committerjacqueline <me@jacqueline.id.au>2024-02-06 17:56:17 +1100
commitaff28342d94f9140e36a793353575d243cc789b8 (patch)
treebb1a0ac55b17070676ef445bac6f5b9aa6f0fd20 /src/ui/ui_fsm.cpp
parenta75adfc124e4afa461aea438a1e42649de7115cd (diff)
downloadtangara-fw-aff28342d94f9140e36a793353575d243cc789b8.tar.gz
let the bluetooth stack handle its own discovery state
Diffstat (limited to 'src/ui/ui_fsm.cpp')
-rw-r--r--src/ui/ui_fsm.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/ui/ui_fsm.cpp b/src/ui/ui_fsm.cpp
index 55c8c84b..12584ec7 100644
--- a/src/ui/ui_fsm.cpp
+++ b/src/ui/ui_fsm.cpp
@@ -85,7 +85,6 @@ lua::Property UiState::sBluetoothEnabled{
if (std::get<bool>(val)) {
sServices->nvs().OutputMode(drivers::NvsStorage::Output::kBluetooth);
sServices->bluetooth().Enable();
- sServices->bluetooth().SetDeviceDiscovery(true);
} else {
sServices->nvs().OutputMode(drivers::NvsStorage::Output::kHeadphones);
sServices->bluetooth().Disable();
@@ -109,7 +108,6 @@ lua::Property UiState::sBluetoothPairedDevice{
}};
lua::Property UiState::sBluetoothDevices{
std::vector<drivers::bluetooth::Device>{}};
-lua::Property UiState::sBluetoothScanning{false};
lua::Property UiState::sPlaybackPlaying{
false, [](const lua::LuaValue& val) {
@@ -340,9 +338,6 @@ void UiState::react(const system_fsm::BluetoothEvent& ev) {
sBluetoothPairedDevice.Update(std::monostate{});
}
break;
- case drivers::bluetooth::Event::kDiscoveryChanged:
- sBluetoothScanning.Update(bt.IsDiscovering());
- break;
case drivers::bluetooth::Event::kPreferredDeviceChanged:
break;
}
@@ -466,7 +461,6 @@ void Lua::entry() {
sBluetoothPairedDevice.Update(bt.ConnectedDevice().value());
}
sBluetoothDevices.Update(bt.KnownDevices());
- sBluetoothScanning.Update(bt.IsDiscovering());
sCurrentScreen.reset();
sLua->RunScript("/lua/main.lua");