mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-08 14:12:05 +00:00
Use BLE_LED where present for CONNECTED/DISCONNECTED
This commit is contained in:
parent
070deb290f
commit
da44d23699
@ -88,10 +88,16 @@ class BluetoothStatus : public Status
|
||||
break;
|
||||
case ConnectionState::CONNECTED:
|
||||
LOG_DEBUG("BluetoothStatus CONNECTED");
|
||||
#ifdef BLE_LED
|
||||
digitalWrite(BLE_LED, HIGH);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case ConnectionState::DISCONNECTED:
|
||||
LOG_DEBUG("BluetoothStatus DISCONNECTED");
|
||||
#ifdef BLE_LED
|
||||
digitalWrite(BLE_LED, LOW);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -345,6 +345,11 @@ void setup()
|
||||
digitalWrite(USER_LED, LOW);
|
||||
#endif
|
||||
|
||||
#ifdef BLE_LED
|
||||
pinMode(BLE_LED, OUTPUT);
|
||||
digitalWrite(BLE_LED, LOW);
|
||||
#endif
|
||||
|
||||
#if defined(T_DECK)
|
||||
// GPIO10 manages all peripheral power supplies
|
||||
// Turn on peripheral power immediately after MUC starts.
|
||||
|
@ -171,6 +171,11 @@ void NimbleBluetooth::deinit()
|
||||
{
|
||||
#ifdef ARCH_ESP32
|
||||
LOG_INFO("Disable bluetooth until reboot");
|
||||
|
||||
#ifdef BLE_LED
|
||||
digitalWrite(BLE_LED, LOW);
|
||||
#endif
|
||||
|
||||
NimBLEDevice::deinit();
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user