This commit is contained in:
Wessel 2026-04-20 13:32:49 +00:00 committed by GitHub
commit 123b27891e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 39 additions and 46 deletions

View file

@ -1,4 +1,5 @@
#include "TimeSeriesData.h"
#include <helpers/ArduinoHelpers.h>
void TimeSeriesData::recordData(mesh::RTCClock* clock, float value) {
uint32_t now = clock->getCurrentTime();
@ -12,7 +13,7 @@ void TimeSeriesData::recordData(mesh::RTCClock* clock, float value) {
void TimeSeriesData::calcMinMaxAvg(mesh::RTCClock* clock, uint32_t start_secs_ago, uint32_t end_secs_ago, MinMaxAvg* dest, uint8_t channel, uint8_t lpp_type) const {
int i = next, n = num_slots;
uint32_t ago = clock->getCurrentTime() - last_timestamp;
uint32_t ago = safeElapsedSecs(clock->getCurrentTime(), last_timestamp);
int num_values = 0;
float total = 0.0f;