/
ButtonMatrixMode.h
executable file
·63 lines (41 loc) · 1.06 KB
/
ButtonMatrixMode.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
55
56
57
58
59
60
61
62
63
#pragma once
#include "Mode.h"
#include "VideoGrabber.h"
class ButtonMatrixMode : public Mode{
public:
ButtonMatrixMode(Robot * robot, myData * data);
void init();
void activate();
bool deactivate();
void step();
void securityCheck();
float pressedTimer;
bool foundMasterSafePos;
bool foundToSafePos;
int curButton;
QCheckBox *checkboxes[96];
QPushButton * storePosition[3];
QSlider * parSliders[3*3];
QPushButton * allOn;
QPushButton * allOff;
QPushButton * resetFlags;
float lightTurnedOn[96];
float* positionInformation[3*3*2];
ofxVec3f cornerPos(int n);
ofxVec3f cornerDir(int n);
ofxVec3f buttonPosition(int n);
void pictureReady(bool points[]);
ofxCvGrayscaleImage isLightOnImg;
QSlider * sliderLightOnThreshold1;
QSlider * sliderLightOnThreshold2;
bool isLightOn();
QGridLayout * gridLayout;
bool isPointInBoundingbox(ofxVec3f p, float depth);
ofxVec3f xdir();
ofxVec3f ydir();
ofxIndustrialRobotDefines::HandVariant v;
int lastButton;
bool confirmedPress;
int buttonRepeat;
VideoGrabber * vidGrabber;
};