-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSensorData.h
54 lines (45 loc) · 949 Bytes
/
SensorData.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef __SENSORDATA__h
#define __SENSORDATA__h
#include "Arduino.h"
struct FFT_BIN {
uint16_t mag;
uint16_t magMax;
float magSum;
float magAVG;
float magAVGkorr;
};
struct FFT_BIN_GROUP {
uint8_t firstBin;
uint8_t lastBin;
uint16_t magMax;
float magAVG;
uint16_t magThresh;
float magAboveThreshCnt;
float magAboveThreshCntDom;
float magAVGkorr;
float magAVGkorrGated;
float magAVGkorrDom;
float magAVGkorrDom2;
float preciAmountFactor;
};
class SensorData {
public:
FFT_BIN_GROUP *binGroup = NULL;
FFT_BIN *bin = NULL;
int16_t ADCoffset;
float magAVG;
float magAVGkorr;
uint16_t magMax;
uint32_t RbOvCtr;
uint16_t ADCpeakSample;
uint32_t snapshotCtr;
uint32_t snapshotValidCtr;
uint16_t clippingCtr;
uint8_t DomGroupMagAVGkorr;
uint8_t DomGroupMagAboveThreshCnt;
float preciAmount;
float preciAmountAcc;
SensorData(uint nrOfBins, byte nrOfBinGroups);
private:
};
#endif