|
|
@ -144,7 +144,7 @@ int MyMesh::handleRequest(ClientInfo *sender, uint32_t sender_timestamp, uint8_t |
|
|
stats.n_packets_recv = radio_driver.getPacketsRecv(); |
|
|
stats.n_packets_recv = radio_driver.getPacketsRecv(); |
|
|
stats.n_packets_sent = radio_driver.getPacketsSent(); |
|
|
stats.n_packets_sent = radio_driver.getPacketsSent(); |
|
|
stats.total_air_time_secs = getTotalAirTime() / 1000; |
|
|
stats.total_air_time_secs = getTotalAirTime() / 1000; |
|
|
stats.total_up_time_secs = _ms->getMillis() / 1000; |
|
|
stats.total_up_time_secs = uptime_millis / 1000; |
|
|
stats.n_sent_flood = getNumSentFlood(); |
|
|
stats.n_sent_flood = getNumSentFlood(); |
|
|
stats.n_sent_direct = getNumSentDirect(); |
|
|
stats.n_sent_direct = getNumSentDirect(); |
|
|
stats.n_recv_flood = getNumRecvFlood(); |
|
|
stats.n_recv_flood = getNumRecvFlood(); |
|
|
@ -581,6 +581,8 @@ MyMesh::MyMesh(mesh::MainBoard &board, mesh::Radio &radio, mesh::MillisecondCloc |
|
|
mesh::RTCClock &rtc, mesh::MeshTables &tables) |
|
|
mesh::RTCClock &rtc, mesh::MeshTables &tables) |
|
|
: mesh::Mesh(radio, ms, rng, rtc, *new StaticPoolPacketManager(32), tables), |
|
|
: mesh::Mesh(radio, ms, rng, rtc, *new StaticPoolPacketManager(32), tables), |
|
|
_cli(board, rtc, sensors, &_prefs, this), telemetry(MAX_PACKET_PAYLOAD - 4) { |
|
|
_cli(board, rtc, sensors, &_prefs, this), telemetry(MAX_PACKET_PAYLOAD - 4) { |
|
|
|
|
|
last_millis = 0; |
|
|
|
|
|
uptime_millis = 0; |
|
|
next_local_advert = next_flood_advert = 0; |
|
|
next_local_advert = next_flood_advert = 0; |
|
|
dirty_contacts_expiry = 0; |
|
|
dirty_contacts_expiry = 0; |
|
|
_logging = false; |
|
|
_logging = false; |
|
|
@ -858,4 +860,9 @@ void MyMesh::loop() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// TODO: periodically check for OLD/inactive entries in known_clients[], and evict
|
|
|
// TODO: periodically check for OLD/inactive entries in known_clients[], and evict
|
|
|
|
|
|
|
|
|
|
|
|
// update uptime
|
|
|
|
|
|
uint32_t now = millis(); |
|
|
|
|
|
uptime_millis += now - last_millis; |
|
|
|
|
|
last_millis = now; |
|
|
} |
|
|
} |
|
|
|