-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcubesat.h
More file actions
113 lines (81 loc) · 2.18 KB
/
cubesat.h
File metadata and controls
113 lines (81 loc) · 2.18 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
103
104
105
106
107
108
109
110
111
112
113
#pragma once
#include "defs.h"
#include <csfilenames.h>
#include <msgpump.h>
#include <stateobj.h>
#include <state_detumble.h>
#include <state_deployantenna.h>
#include <state_payload.h>
#include <state_adcs.h>
#include <state_lowpower.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 <kb.h>
#include <system_mgr.h>
#include <scheduler.h>
#include <system_irarray.h>
#include <phone.h>
#if defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7_M7)
#include <ceps.h>
#else
#include <system_gps.h>
#endif
class CSatellite:public CStateObj {
public:
int _restartcount=0;
long lcount=0;
CADCSState _state_adcs;
CStateObj _state_core;
CDeployAntennaState _state_deployantenna;
CDetumbleState _state_detumble;
CLowPowerState _state_lowpower;
CStateObj _state_normal;
CPayloadState _state_payload;
CKeyboard _keyboard;
// CEPS _power;
CIMU _IMUSPI;
CIMU _IMUI2C;
CIRArray _ir_X1,_ir_X2,_ir_Y1,_ir_Y2,_ir_Z1,_ir_Z2;
CMagTorquer _magneTorquers;
CMsgPump _msgPump;
CMDrive _magX;
CMDrive _magY;
CMDrive _magZ;
CSystemMgr _manager;
/*
CMotorController _motorX;
CMotorController _motorY;
CMotorController _motorZ;
*/
CPhone _phone;
CRadio _radio;
#if defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7_M7)
CRadio _radio2;
#else
#define _radio2 _radio
CGPS _gps;
#endif
//CRW _reactionWheels;
CScheduler _scheduler;
CTemperatureObject _tempX1,_tempX2,_tempY1,_tempY2,_tempZ1,_tempZ2, _tempOBC;
CSatellite();
//void deleteState(CMsg &msg);
//void addState(CMsg &msg);
void createState(CMsg &msg);
void changeState(CMsg &msg);
void newMsg(CMsg &msg);
void setup();
void loop();
void readCounts();
void sendCounts();
void writeCounts();
void readSysMap();
void updateRadios(CMsg &msg);
void callCustomFunctions(CMsg &msg);
};
CSatellite* getSatellite();