From aff28342d94f9140e36a793353575d243cc789b8 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Tue, 6 Feb 2024 17:56:17 +1100 Subject: let the bluetooth stack handle its own discovery state --- src/ui/ui_fsm.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/ui/ui_fsm.cpp') 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(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{}}; -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"); -- cgit v1.2.3