mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-03 04:15:53 +00:00
Merge pull request #1098 from mc-hamster/master
Airtime - calculate ms in a hour in preprocessor
This commit is contained in:
commit
2d8e55a34e
@ -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") {}
|
||||
|
@ -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 };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user