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;
|
break;
|
||||||
case ConnectionState::CONNECTED:
|
case ConnectionState::CONNECTED:
|
||||||
LOG_DEBUG("BluetoothStatus CONNECTED");
|
LOG_DEBUG("BluetoothStatus CONNECTED");
|
||||||
|
#ifdef BLE_LED
|
||||||
|
digitalWrite(BLE_LED, HIGH);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ConnectionState::DISCONNECTED:
|
case ConnectionState::DISCONNECTED:
|
||||||
LOG_DEBUG("BluetoothStatus DISCONNECTED");
|
LOG_DEBUG("BluetoothStatus DISCONNECTED");
|
||||||
|
#ifdef BLE_LED
|
||||||
|
digitalWrite(BLE_LED, LOW);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -102,4 +108,4 @@ class BluetoothStatus : public Status
|
|||||||
|
|
||||||
} // namespace meshtastic
|
} // namespace meshtastic
|
||||||
|
|
||||||
extern meshtastic::BluetoothStatus *bluetoothStatus;
|
extern meshtastic::BluetoothStatus *bluetoothStatus;
|
||||||
|
@ -345,6 +345,11 @@ void setup()
|
|||||||
digitalWrite(USER_LED, LOW);
|
digitalWrite(USER_LED, LOW);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef BLE_LED
|
||||||
|
pinMode(BLE_LED, OUTPUT);
|
||||||
|
digitalWrite(BLE_LED, LOW);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(T_DECK)
|
#if defined(T_DECK)
|
||||||
// GPIO10 manages all peripheral power supplies
|
// GPIO10 manages all peripheral power supplies
|
||||||
// Turn on peripheral power immediately after MUC starts.
|
// Turn on peripheral power immediately after MUC starts.
|
||||||
|
@ -171,6 +171,11 @@ void NimbleBluetooth::deinit()
|
|||||||
{
|
{
|
||||||
#ifdef ARCH_ESP32
|
#ifdef ARCH_ESP32
|
||||||
LOG_INFO("Disable bluetooth until reboot");
|
LOG_INFO("Disable bluetooth until reboot");
|
||||||
|
|
||||||
|
#ifdef BLE_LED
|
||||||
|
digitalWrite(BLE_LED, LOW);
|
||||||
|
#endif
|
||||||
|
|
||||||
NimBLEDevice::deinit();
|
NimBLEDevice::deinit();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user