forked from kalnajslab/MCB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInternalSerialDriverMCB.h
66 lines (50 loc) · 1.31 KB
/
InternalSerialDriverMCB.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
64
65
66
/*
* InternalSerialDriverMCB.cpp
* File defining the serial driver for communicating with the
* main payload computer (DIB) from the MCB
* Author: Alex St. Clair
* February 2018
*/
#ifndef INTERNALSERIALDRIVERMCB_H_
#define INTERNALSERIALDRIVERMCB_H_
#include "StorageManagerMCB.h"
#include "ActionsMCB.h"
#include "HardwareMCB.h"
#include "MCBComm.h"
#include "SafeBuffer.h"
#include <StdInt.h>
struct MCBParameters_t {
// deploy
float deploy_length;
float deploy_velocity;
float deploy_acceleration;
// retract
float retract_length;
float retract_velocity;
float retract_acceleration;
// dock
float dock_length;
float dock_velocity;
float dock_acceleration;
float temp_limits[6];
float torque_limits[2];
float curr_limits[2];
};
class InternalSerialDriverMCB {
public:
InternalSerialDriverMCB(SafeBuffer * state_q, SafeBuffer * monitor_q);
~InternalSerialDriverMCB(void) { };
void RunDriver(void);
void RunDebugDriver(void);
void PrintDebugMenu(void);
MCBComm dibComm;
MCBParameters_t mcbParameters = {0};
private:
void HandleASCII(void);
void PrintDebugCommand(uint8_t cmd, const char * description);
// Interface objects
SafeBuffer * state_queue;
SafeBuffer * monitor_queue;
StorageManagerMCB storageManager;
};
#endif