-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcubesat.h
More file actions
100 lines (78 loc) · 1.93 KB
/
cubesat.h
File metadata and controls
100 lines (78 loc) · 1.93 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#pragma once
#include <defs.h>
#include "state_lowpower.h"
#include "state_detumble.h"
#include "state_adcs.h"
#include "state_normal.h"
#include "state_deployantenna.h"
#include "state_core.h"
#include "state_phone.h"
#include "system_imu.h"
#include "system_irarray.h"
#include "system_imu.h"
#include "system_reactionwheel.h"
#include "system_magtorquer.h"
#include "radio.h"
#include "messages.h"
#include <mdrive.h>
#include "system_mgr.h"
#include "phone.h"
#include "system_light.h"
#include "ceps.h"
#include <portentafs.h>
#ifdef TTGO
#include "system_gps.h"
#endif
#include "messages.h"
class CSatellite {
public:
std::list<CSystemObject*> coresystems;
unsigned long lcount=0;
CDetumbleState detumble;
CLowPowerState lowpower; //0
CNormalState normal; //1
CDeployAntennaState deployantenna; //2
CADCSState adcs; //3
CCoreState Core;
CPhoneState phone;
int _burncount=0;
int _detumblecount=0;
CEPS Power;
CRadio Radio;
CIMU IMUI2C;
CSystemMgr Mgr;
CRW RW;
CMagTorquer MT;
//CRadio Radio2;
// CIMU IMUSPI;
// CPhone Phone;
// CIRArray IRX1;
// CIRArray IRX2;
// CIRArray IRY1;
// CIRArray IRY2;
// CIRArray IRZ1;
// CIRArray IRZ2;
//CThermometer TempX1;
//CThermometer TempX2;
//CThermometer TempY1;
//CThermometer TempY2;
//CThermometer TempZ1;
//CThermometer TempZ2;
//CThermometer TempOBC;
#ifdef TTGO
// CGPS gps;
#endif
std::map<std::string,CSystemObject *> SysMap;
CStateObj* pstate;
//std::bitset<10> satflag; //initialized to 0 enum some flags HEALTHCHECK,TEMP, etc satflag[HEALTHCHECK]
CMessages MSG;
CSatellite();
void newState(CMsg &msg);
void newMsg(CMsg &msg);
void addSystem(const char *str,CSystemObject* psys, CStateObj &state);
void setup();
bool loop();
void stats();
void MsgPump();
};
CSatellite* getSatellite();