blob: 49d269020173b508ee4370d0aecad00b47e0a74e [file] [log] [blame]
namespace aos;
enum MatchType : byte { kNone, kPractice, kQualification, kElimination }
table Joystick {
// A bitmask of the butotn state.
buttons:ushort (id: 0);
// The 6 joystick axes.
// TODO: Should have size of 6
axis:[double] (id: 1);
// The POV axis.
pov:int (id: 2);
}
enum Alliance : byte { kRed, kBlue, kInvalid }
// This message is checked by all control loops to make sure that the
// joystick code hasn't died. It is published on "/aos"
table JoystickState {
//TODO: should have fixed size.
joysticks:[Joystick] (id: 0);
test_mode:bool (id: 1);
fms_attached:bool (id: 2);
enabled:bool (id: 3);
autonomous:bool (id: 4);
team_id:ushort (id: 5);
// 2018 scale and switch positions.
// TODO(austin): Push these out to a new message?
switch_left:bool (id: 6);
scale_left:bool (id: 7);
// If this is true, then this message isn't actually from the control
// system and so should not be trusted as evidence that the button inputs
// etc are actually real and should be acted on.
// However, most things should ignore this so that sending fake messages is
// useful for testing. The only difference in behavior should be motors not
// actually turning on.
fake:bool (id: 8);
// Color of our current alliance.
alliance:Alliance (id: 9);
// String corresponding to the game data string
game_data:string (id: 10);
// Driver station location.
location:ubyte (id: 11);
match_number:int (id: 12);
replay_number:int (id: 13);
match_type:MatchType (id: 14);
event_name:string (id: 15);
}
root_type JoystickState;