mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-16 18:12:07 +00:00
Contain it
This commit is contained in:
parent
971ecd117c
commit
a8dd497575
@ -537,23 +537,31 @@ void AdminModule::handleGetDeviceConnectionStatus(const meshtastic_MeshPacket &r
|
|||||||
|
|
||||||
meshtastic_DeviceConnectionStatus conn;
|
meshtastic_DeviceConnectionStatus conn;
|
||||||
|
|
||||||
conn.has_wifi = HAS_WIFI;
|
|
||||||
#if HAS_WIFI
|
#if HAS_WIFI
|
||||||
|
conn.has_wifi = true;
|
||||||
conn.wifi.status.status.is_connected = WiFi.status() != WL_CONNECTED;
|
conn.wifi.status.status.is_connected = WiFi.status() != WL_CONNECTED;
|
||||||
strncpy(conn.wifi.ssid, config.network.wifi_ssid, 33);
|
strncpy(conn.wifi.ssid, config.network.wifi_ssid, 33);
|
||||||
if (conn.wifi.status.status.is_connected)
|
if (conn.wifi.status.status.is_connected)
|
||||||
{
|
{
|
||||||
|
conn.wifi.rssi = WiFi.RSSI();
|
||||||
conn.wifi.status.status.ip_address = WiFi.localIP();
|
conn.wifi.status.status.ip_address = WiFi.localIP();
|
||||||
conn.wifi.status.status.is_mqtt_connected = mqtt && mqtt->connected();
|
conn.wifi.status.status.is_mqtt_connected = mqtt && mqtt->connected();
|
||||||
conn.wifi.status.status.is_syslog_connected = false; // FIXME wire this up
|
conn.wifi.status.status.is_syslog_connected = false; // FIXME wire this up
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
conn.has_bluetooth = HAS_BLUETOOTH;
|
#if HAS_ETHERNET
|
||||||
#if HAS_BLUETOOTH
|
conn.has_ethernet = true;
|
||||||
|
// conn.ethernet.
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if HAS_BLUETOOTH
|
||||||
|
conn.has_bluetooth = HAS_BLUETOOTH;
|
||||||
|
// nimbleBluetooth->
|
||||||
|
// #if ARCH_ESP32
|
||||||
|
|
||||||
|
// #elif
|
||||||
#endif
|
#endif
|
||||||
conn.has_ethernet = HAS_ETHERNET;
|
|
||||||
|
|
||||||
conn.has_serial = true; // No serial-less devices
|
conn.has_serial = true; // No serial-less devices
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user