Commit df1c227 1 parent 06008fc commit df1c227 Copy full SHA for df1c227
File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -404,9 +404,12 @@ void System::send_heartbeat() {
404
404
return ;
405
405
}
406
406
407
- int8_t rssi = wifi_quality ();
408
- if (rssi == -1 ) {
409
- return ;
407
+ int8_t rssi;
408
+ if (!ethernet_connected_) {
409
+ rssi = wifi_quality ();
410
+ if (rssi == -1 ) {
411
+ return ;
412
+ }
410
413
}
411
414
412
415
StaticJsonDocument<EMSESP_JSON_SIZE_SMALL> doc;
@@ -420,7 +423,9 @@ void System::send_heartbeat() {
420
423
doc[" status" ] = FJSON (" disconnected" );
421
424
}
422
425
423
- doc[" rssi" ] = rssi;
426
+ if (!ethernet_connected_) {
427
+ doc[" rssi" ] = rssi;
428
+ }
424
429
doc[" uptime" ] = uuid::log::format_timestamp_ms (uuid::get_uptime_ms (), 3 );
425
430
doc[" uptime_sec" ] = uuid::get_uptime_sec ();
426
431
doc[" mqttfails" ] = Mqtt::publish_fails ();
You can’t perform that action at this time.
0 commit comments