-
Notifications
You must be signed in to change notification settings - Fork 0
/
Controller.hpp
87 lines (60 loc) · 2.14 KB
/
Controller.hpp
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#ifndef CONTROLLER_HPP
#define CONTROLLER_HPP
#include <QObject>
#include <qqml.h>
struct Controller : public QObject
{
Q_OBJECT
Q_PROPERTY(quint16 nodeControllerID READ nodeControllerID CONSTANT)
Q_PROPERTY(quint16 autosequenceID READ autosequenceID CONSTANT)
Q_PROPERTY(float autosequenceTime READ autosequenceTime NOTIFY autosequenceTimeChanged)
Q_PROPERTY(quint16 hiPressID READ hiPressID CONSTANT)
Q_PROPERTY(quint16 LOXID READ LOXID CONSTANT)
Q_PROPERTY(quint16 fuelID READ fuelID CONSTANT)
Q_PROPERTY(quint16 engineControllerID READ engineControllerID CONSTANT)
Q_PROPERTY(float fuelMVTime READ fuelMVTime NOTIFY fuelMVTimeChanged)
Q_PROPERTY(float LOXMVTime READ LOXMVTime NOTIFY LOXMVTimeChanged)
Q_PROPERTY(float IGN1Time READ IGN1Time NOTIFY IGN1TimeChanged)
Q_PROPERTY(float IGN2Time READ IGN2Time NOTIFY IGN2TimeChanged)
QML_ELEMENT
QML_UNCREATABLE("C++ instantiation only")
public:
quint16 _nodeControllerID {0};
quint16 _autosequenceID {1};
float _autosequenceTime {0.0f};
quint16 _hiPressID {2};
quint16 _LOXID {3};
quint16 _fuelID {4};
quint16 _engineControllerID {5};
float _fuelMVTime {0.0f};
float _LOXMVTime {0.0f};
float _IGN1Time {0.0f};
float _IGN2Time {0.0f};
// tank controller hiPress, Lox, Fuel commented out in the python gui
explicit Controller(QObject *parent = nullptr);
quint16 nodeControllerID();
quint16 autosequenceID();
float autosequenceTime() const;
void setAutosequenceTime(float newAutosequenceTime);
quint16 hiPressID();
quint16 LOXID();
quint16 fuelID();
quint16 engineControllerID();
float fuelMVTime();
void setFuelMVTime(float newFuelMVTime);
float LOXMVTime();
void setLOXMVTime(float newLOXMVTime);
float IGN1Time();
void setIGN1Time(float newIGN1Time);
float IGN2Time();
void setIGN2Time(float newIGN2Time);
signals:
void fuelMVTimeChanged();
void LOXMVTimeChanged();
void IGN1TimeChanged();
void IGN2TimeChanged();
void autosequenceTimeChanged();
public slots:
};
Q_DECLARE_METATYPE(Controller)
#endif // CONTROLLER_HPP