From d5b57840d9f1019230c5b8dc31fcd1f42f6c2abd Mon Sep 17 00:00:00 2001 From: Jm Date: Thu, 24 Dec 2020 22:12:59 -0800 Subject: [PATCH] checking in a little of the airtime so i can switch to the laptop. --- src/airtime.cpp | 31 +++++++++++++++++++++++++++++++ src/airtime.h | 6 ++++++ 2 files changed, 37 insertions(+) create mode 100644 src/airtime.cpp create mode 100644 src/airtime.h diff --git a/src/airtime.cpp b/src/airtime.cpp new file mode 100644 index 00000000..1fec1e0c --- /dev/null +++ b/src/airtime.cpp @@ -0,0 +1,31 @@ +/* +We will keep hourly stats for 48 hours and daily stats for 7 days + +3600 seconds in an hour, uint16_t per hour +86400 seconds in a day, uint32_t per day + +Memory to store 48 hours = 96 bytes +Memory to store 7 days = 28 bytes + + +*/ + +void logTXairtime(uint32_t airtime_ms) +{ + /* + + How many hours since power up? + + Millis / 1000 / 3600 + + + + */ +} + +void logRXairtime() +{ + /* + + */ +} diff --git a/src/airtime.h b/src/airtime.h new file mode 100644 index 00000000..65edbd20 --- /dev/null +++ b/src/airtime.h @@ -0,0 +1,6 @@ +#pragma once + +#include "configuration.h" +#include +#include +