add class HostedBluetooth

This commit is contained in:
Manuel
2026-04-16 22:38:42 +02:00
parent 20fb1b2fc2
commit 5ae50b607d
3 changed files with 594 additions and 98 deletions
+10
View File
@@ -43,6 +43,16 @@ void setBluetoothEnable(bool enable)
if (config.bluetooth.enabled == true)
#endif
{
#if defined(CONFIG_IDF_TARGET_ESP32P4)
if (!enable) {
if (bluetoothApi && bluetoothApi->isActive()) {
bluetoothApi->shutdown();
powerMon->clearState(meshtastic_PowerMon_State_BT_On);
}
return;
}
#endif
if (!bluetoothApi) {
#if defined(CONFIG_IDF_TARGET_ESP32P4)
bluetoothApi = new HostedBluetooth();