mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
Add a counter to track rx time for repeater stats
This commit is contained in:
parent
f87e856347
commit
ea2ce93c02
3 changed files with 7 additions and 3 deletions
|
|
@ -98,6 +98,7 @@ struct RepeaterStats {
|
|||
uint16_t err_events; // was 'n_full_events'
|
||||
int16_t last_snr; // x 4
|
||||
uint16_t n_direct_dups, n_flood_dups;
|
||||
uint32_t total_rx_air_time_secs;
|
||||
};
|
||||
|
||||
struct ClientInfo {
|
||||
|
|
@ -208,6 +209,7 @@ class MyMesh : public mesh::Mesh, public CommonCLICallbacks {
|
|||
stats.last_snr = (int16_t)(radio_driver.getLastSNR() * 4);
|
||||
stats.n_direct_dups = ((SimpleMeshTables *)getTables())->getNumDirectDups();
|
||||
stats.n_flood_dups = ((SimpleMeshTables *)getTables())->getNumFloodDups();
|
||||
stats.total_rx_air_time_secs = getReceiveAirTime() / 1000;
|
||||
|
||||
memcpy(&reply_data[4], &stats, sizeof(stats));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue