7#include <unordered_map>
82 bool tick(uint32_t currentTime);
85 void preparePacket(uint32_t timestamp);
88 void setPacketToZero();
93 Stream &rfdSerialConnection;
94 int nextEmptyPacketIndex;
Buffers sensor samples and forwards them to an IDataSaver at a controlled rate.
Telemetry(SendableSensorData *ssdArray[], int ssdArrayLength, Stream &rfdSerialConnection)
Initialize this object.
bool tick(uint32_t currentTime)
No argument tick function that handles sending data at specified send frequencies.
Bundles one or more SensorDataHandler pointers for telemetry packing.
bool shouldBeSent(uint32_t time)
True if the packet should be sent.
void markWasSent(uint32_t time)
Run when the packet is sent.
SendableSensorData(SensorDataHandler *_singleSDH, SensorDataHandler **_multiSDH, int _multiSDHLength, int _multiSDHDataLabel, uint8_t _sendFrequencyHz)
uint32_t lastSentTimestamp
SensorDataHandler ** multiSDH
SensorDataHandler * singleSDH