mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-05-01 14:06:41 +00:00
Initial changes for v2.3
This commit is contained in:
31
lib/RealtimePlot/include/RealtimePlot.h
Normal file
31
lib/RealtimePlot/include/RealtimePlot.h
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* @copyright Utilitech AS 2023
|
||||
* License: Fair Source
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _REALTIMEPLOT_H
|
||||
#define _REALTIMEPLOT_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "AmsData.h"
|
||||
|
||||
#define REALTIME_SAMPLE 10000
|
||||
#define REALTIME_SIZE 360
|
||||
|
||||
class RealtimePlot {
|
||||
public:
|
||||
RealtimePlot();
|
||||
void update(AmsData& data);
|
||||
int32_t getValue(uint16_t req);
|
||||
int16_t getSize();
|
||||
|
||||
private:
|
||||
int8_t* values;
|
||||
uint8_t* scaling;
|
||||
|
||||
unsigned long lastMillis = 0;
|
||||
double lastReading = 0;
|
||||
uint16_t lastPos = 0;
|
||||
};
|
||||
#endif
|
||||
Reference in New Issue
Block a user