blob: bd66e1d7b9bf5936f94a73eba3c838d618a2a4e2 [file] [log] [blame]
brians343bc112013-02-10 01:53:46 +00001package aos;
2
Austin Schuh374fd172014-10-25 17:57:54 -07003struct Joystick {
4 // A bitmask of the button state.
5 uint16_t buttons;
6
7 // The 4 joystick axes.
8 double[4] axis;
9};
10
brians343bc112013-02-10 01:53:46 +000011message RobotState {
Austin Schuh374fd172014-10-25 17:57:54 -070012 Joystick[4] joysticks;
13
14 bool test_mode;
15 bool fms_attached;
16 bool enabled;
17 bool autonomous;
18 uint16_t team_id;
19 // If this is true, then this message isn't actually from the control
20 // system and so should not be trusted as evidence that the button inputs
21 // etc are actually real and should be acted on.
22 // However, most things should ignore this so that sending fake messages is
23 // useful for testing.
24 bool fake;
brians343bc112013-02-10 01:53:46 +000025};
26
27// The robot_state Queue is checked by all control loops to make sure that the
28// joystick code hasn't died.
29// It also provides information about whether or not the robot is in autonomous
30// mode and what the team_id is.
31
32queue RobotState robot_state;