Files
firmware/src/airtime.h

36 lines
981 B
C
Raw Normal View History

#pragma once
#include "configuration.h"
#include <Arduino.h>
#include <functional>
2020-12-27 09:29:48 -08:00
/*
TX_LOG - Time on air this device has transmitted
RX_LOG - Time on air used by valid and routable mesh packets, does not include
TX air time
RX_ALL_LOG - Time of all received lora packets. This includes packets that are not
for meshtastic devices. Does not include TX air time.
Example analytics:
TX_LOG + RX_LOG = Total air time for a perticular meshtastic channel.
TX_LOG + RX_LOG = Total air time for a perticular meshtastic channel, including
other lora radios.
RX_ALL_LOG - RX_LOG = Other lora radios on our frequency channel.
*/
enum reportTypes { TX_LOG, RX_LOG, RX_ALL_LOG };
void logAirtime(reportTypes reportType, uint32_t airtime_ms);
2020-12-26 22:39:43 -08:00
void airtimeCalculator();
uint8_t currentHourIndex();
2020-12-26 22:39:43 -08:00
uint8_t getHoursToLog();
2020-12-26 22:39:43 -08:00
uint32_t getSecondsSinceBoot();
uint16_t *airtimeReport(reportTypes reportType);