blob: f21b211a3bac1d6b2f592a706ced4695c24904f9 [file] [log] [blame]
Alex Perrycb7da4b2019-08-28 19:35:56 -07001namespace aos;
2
3table Joystick {
4 // A bitmask of the butotn state.
5 buttons:ushort;
6
7 // The 6 joystick axes.
8 // TODO: Should have size of 6
9 axis:[double];
10
11 // The POV axis.
12 pov:int;
13}
14
15// This message is checked by all control loops to make sure that the
16// joystick code hasn't died. It is published on "/aos"
17table JoystickState {
18 //TODO: should have fixed size.
19 joysticks:[Joystick];
20
21 test_mode:bool;
22 fms_attached:bool;
23 enabled:bool;
24 autonomous:bool;
25 team_id:ushort;
26
27 // 2018 scale and switch positions.
28 // TODO(austin): Push these out to a new message?
29 switch_left:bool;
30 scale_left:bool;
31
32 // If this is true, then this message isn't actually from the control
33 // system and so should not be trusted as evidence that the button inputs
34 // etc are actually real and should be acted on.
35 // However, most things should ignore this so that sending fake messages is
36 // useful for testing. The only difference in behavior should be motors not
37 // actually turning on.
38 fake:bool;
39}
40
41root_type JoystickState;