mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-26 22:33:24 +00:00
fix wifi/bt connection status
This commit is contained in:
parent
008b3c494d
commit
179027ed80
@ -750,7 +750,7 @@ void AdminModule::handleGetDeviceConnectionStatus(const meshtastic_MeshPacket &r
|
||||
#ifdef ARCH_PORTDUINO
|
||||
conn.wifi.status.is_connected = true;
|
||||
#else
|
||||
conn.wifi.status.is_connected = WiFi.status() != WL_CONNECTED;
|
||||
conn.wifi.status.is_connected = WiFi.status() == WL_CONNECTED;
|
||||
#endif
|
||||
strncpy(conn.wifi.ssid, config.network.wifi_ssid, 33);
|
||||
if (conn.wifi.status.is_connected) {
|
||||
@ -782,10 +782,14 @@ void AdminModule::handleGetDeviceConnectionStatus(const meshtastic_MeshPacket &r
|
||||
conn.has_bluetooth = true;
|
||||
conn.bluetooth.pin = config.bluetooth.fixed_pin;
|
||||
#ifdef ARCH_ESP32
|
||||
conn.bluetooth.is_connected = nimbleBluetooth->isConnected();
|
||||
conn.bluetooth.rssi = nimbleBluetooth->getRssi();
|
||||
if (config.bluetooth.enabled && nimbleBluetooth) {
|
||||
conn.bluetooth.is_connected = nimbleBluetooth->isConnected();
|
||||
conn.bluetooth.rssi = nimbleBluetooth->getRssi();
|
||||
}
|
||||
#elif defined(ARCH_NRF52)
|
||||
conn.bluetooth.is_connected = nrf52Bluetooth->isConnected();
|
||||
if (config.bluetooth.enabled && nrf52Bluetooth) {
|
||||
conn.bluetooth.is_connected = nrf52Bluetooth->isConnected();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
conn.has_serial = true; // No serial-less devices
|
||||
|
Loading…
Reference in New Issue
Block a user