forked from cubesatplatform/seaking2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcubesat.h
More file actions
102 lines (78 loc) · 2.02 KB
/
cubesat.h
File metadata and controls
102 lines (78 loc) · 2.02 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
101
102
#pragma once
#include "defs.h"
#include "sdfs.h"
#include "csfilenames.h"
#include <messages.h>
#if defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7_M7)
#else
#include <system_gps.h>
#endif
#include <state_detumble.h>
#include <state_deployantenna.h>
#include <state_payload.h>
#include <state_adcs.h>
#include <ceps.h>
#include <system_reactionwheel.h>
#include <system_magtorquer.h>
#include <system_temperature.h>
#include <mdrive.h>
#include <fhmotor.h>
#include <system_imu.h>
#include <radio.h>
#include <messages.h>
#include <system_mgr.h>
#include <scheduler.h>
#include <system_irarray.h>
#include <phone.h>
class CSatellite:public CSystemObject {
public:
std::list<CSystemObject*> coresystems;
int _restartcount=0;
unsigned long lcount=0;
CStateObj state_core;
CStateObj state_normal;
CStateObj state_lowpower;
CADCSState state_adcs;
CDeployAntennaState state_deployantenna;
CDetumbleState state_detumble;
CPayloadState state_payload;
CEPS Power;
CIMU IMUSPI;
#if defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7_M7)
CRadio Radio2;
#else
#define Radio2 Radio
CGPS gps;
#endif
CRW RW;
CMagTorquer MT;
CPhone Phone;
CMDrive MagX;
CMDrive MagY;
CMDrive MagZ;
CMotorController MotorX;
CMotorController MotorY;
CMotorController MotorZ;
CTemperatureObject TempX1,TempX2,TempY1,TempY2,TempZ1,TempZ2, TempOBC;
CIRArray IRX1,IRX2,IRY1,IRY2,IRZ1,IRZ2;
CSystemMgr Mgr;
CRadio Radio;
CIMU IMUI2C;
CScheduler Sch;
CMessages MSG;
CStateObj* pstate;
CSatellite();
void newState(CMsg &msg);
void addState(CMsg &msg);
void newMsg(CMsg &msg);
void setup();
void readCounts();
void sendCounts();
void writeCounts();
void readSysMap();
void loop();
void stats();
void updateRadios(CMsg &msg);
void callCustomFunctions(CMsg &msg);
};
CSatellite* getSatellite();