Airtime - calculate ms in a hour in preprocessor

This commit is contained in:
Jm Casler 2022-01-15 12:24:16 -08:00
parent 38efb8b3ad
commit c2435470c1
2 changed files with 4 additions and 1 deletions

View File

@ -114,7 +114,7 @@ float AirTime::utilizationTXPercent()
sum += this->utilizationTX[i];
}
return (float(sum) / float(MINUTES_IN_HOUR * 10 * 1000)) * 100;
return (float(sum) / float(MS_IN_HOUR)) * 100;
}
AirTime::AirTime() : concurrency::OSThread("AirTime") {}

View File

@ -28,6 +28,9 @@
#define SECONDS_PER_PERIOD 3600
#define PERIODS_TO_LOG 24
#define MINUTES_IN_HOUR 60
#define SECONDS_IN_MINUTE 60
#define MS_IN_HOUR (MINUTES_IN_HOUR * SECONDS_IN_MINUTE * 1000)
enum reportTypes { TX_LOG, RX_LOG, RX_ALL_LOG };