-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsystem_irarray.h
More file actions
69 lines (52 loc) · 1.46 KB
/
system_irarray.h
File metadata and controls
69 lines (52 loc) · 1.46 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#pragma once
#include <defs.h>
#include <systemobject.h>
#include <Adafruit_MLX90640.h>
#include "defs.h"
class CIRArray:public CSystemObject{
private:
int imin,imax;
TwoWire *pWire=&Wire;
Adafruit_MLX90640 mlx;
float frame[32*24]; // buffer for full frame of temperatures
//paramsMLX90640 mlx90640;
//float mlx90640To[768];
char pixelTable[770]; //need it null terminated
char _address=IRARRAY_ADDRESS_X1;
float fmin,fmax;
long _interval=5000;
char calcStart = 0x33; //Pin that goes high/low when calculations are complete
//This makes the timing visible on the logic analyzer
char cState='a';
public:
CIRArray(CMsg &msg) {
CIRArray();
_cmsg=msg;
//CID(msg.CID());
_address = msg.getParameter("ADDRESS", _address);
Name(msg.getParameter("NAME", Name()));
char wireNum=msg.getParameter("WIRENUM", '0');
if(wireNum='1') pWire=&Wire1;
// if(wireNum='2') pWire=&Wire2;
}
CIRArray() {
Name("IRARRAY");
_forever =true;
_INTERVAL = 5000;
_transmitINTERVAL = 6000;
}
void config(const char *name, char addr, char wireNum) {
Name(name);
if(wireNum=='1') pWire=&Wire1;
// if(wireNum=='2') pWire=&Wire2;
_address=addr;
_forever =true;
}
bool isConnected();
void setup();
void loop();
bool runOnce();
std::string strData(int z);
void Output();
void callCustomFunctions(CMsg &msg);
};