Added Telemetry data report to the App

This commit is contained in:
2025-10-31 21:10:38 +02:00
parent f286abb023
commit a7f1bd1667
13 changed files with 194 additions and 20 deletions

View File

@@ -57,6 +57,7 @@
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "../Logging/Logging.hpp"
#include "../FileManager/FileManager.hpp"
class Telemetry {
private:
@@ -71,6 +72,7 @@ private:
// External references (to be set via setters)
bool* playerIsPlayingPtr = nullptr;
FileManager* fileManager = nullptr;
// Spinlock for critical sections
portMUX_TYPE telemetrySpinlock = portMUX_INITIALIZER_UNLOCKED;
@@ -81,6 +83,7 @@ public:
// Set external references
void setPlayerReference(bool* isPlayingPtr);
void setFileManager(FileManager* fm);
// Bell strike handling (call this on every hammer strike)
void recordBellStrike(uint8_t bellIndex);
@@ -89,6 +92,10 @@ public:
uint32_t getStrikeCount(uint8_t bellIndex);
void resetStrikeCounters(); // User-requested reset
// Persistence methods
void saveStrikeCounters();
void loadStrikeCounters();
// Bell load management
uint16_t getBellLoad(uint8_t bellIndex);
void setBellMaxLoad(uint8_t bellIndex, uint16_t maxLoad);