Added channel load and airtime stats to display

This commit is contained in:
Mark Qvist 2023-09-12 21:51:51 +02:00
parent fb113b1782
commit f4cdd5ea4a
5 changed files with 112 additions and 35 deletions

View file

@ -1181,6 +1181,16 @@ void unlock_rom() {
eeprom_erase();
}
void init_channel_stats() {
for (uint16_t ai = 0; ai < DCD_SAMPLES; ai++) { util_samples[ai] = false; }
for (uint16_t ai = 0; ai < AIRTIME_BINS; ai++) { airtime_bins[ai] = 0; }
for (uint16_t ai = 0; ai < AIRTIME_BINS; ai++) { longterm_bins[ai] = 0.0; }
local_channel_util = 0.0;
total_channel_util = 0.0;
airtime = 0.0;
longterm_airtime = 0.0;
}
typedef struct FIFOBuffer
{
unsigned char *begin;