forked from kalnajslab/MCB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathActionsMCB.h
72 lines (62 loc) · 1.43 KB
/
ActionsMCB.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
67
68
69
70
71
72
/*
* ActionsMCB.h
* File defining actions the MCB can take
* Author: Alex St. Clair
* August 2019
*/
#ifndef ACTIONSMCB_H
#define ACTIONSMCB_H
#include <stdint.h>
// Enum describing state machine actions
enum State_Actions_t : uint8_t {
// mode switches
ACT_SWITCH_READY = 0,
ACT_SWITCH_NOMINAL,
// reel commands
ACT_DEPLOY_X,
ACT_RETRACT_X,
ACT_DOCK,
ACT_IN_NO_LW,
ACT_HOME_LW,
ACT_BRAKE_ON,
ACT_BRAKE_OFF,
ACT_CONTROLLERS_ON,
ACT_CONTROLLERS_OFF,
ACT_FULL_RETRACT,
// parameters to set
ACT_SET_DEPLOY_V,
ACT_SET_RETRACT_V,
ACT_SET_DOCK_V,
ACT_SET_DEPLOY_A,
ACT_SET_RETRACT_A,
ACT_SET_DOCK_A,
ACT_SET_SERIAL,
ACT_ZERO_REEL,
ACT_TEMP_LIMITS,
ACT_TORQUE_LIMITS,
ACT_CURR_LIMITS,
// values to send
ACT_SEND_POSITION,
ACT_SEND_BRAKE_STATUS,
ACT_SEND_STATE,
ACT_SEND_CURRENT,
ACT_SEND_EEPROM,
// other
ACT_LIMIT_EXCEEDED,
ACT_IGNORE_LIMITS,
ACT_USE_LIMITS,
ACT_NUM_ACTIONS, // not an action, used for counting
ACT_UNUSED, // not an action, used as default
};
// Enum describing monitor actions
enum Monitor_Command_t : uint8_t {
MONITOR_BOTH_MOTORS_ON,
MONITOR_REEL_ON,
MONITOR_MOTORS_OFF,
MONITOR_LOW_POWER,
MONITOR_SEND_TEMPS,
MONITOR_SEND_VOLTS,
MONITOR_SEND_CURRS,
UNUSED_COMMAND
};
#endif