diff --git a/src/airtime.cpp b/src/airtime.cpp index bc827f27..df32ca1b 100644 --- a/src/airtime.cpp +++ b/src/airtime.cpp @@ -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") {} diff --git a/src/airtime.h b/src/airtime.h index a0738140..ecaa1203 100644 --- a/src/airtime.h +++ b/src/airtime.h @@ -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 };