Files
allwpilib/hal/src/mrc/proto/MrcComm.proto
Thad House ce6fd225a6 [hal,wpilib] Add support for joystick outputs (#8385)
Support joystick outputs, including Rumble and LEDs.

Also requires an update to Joystick descriptors, as that has also
changed in mrccomm to support showing what outputs are supported.
2025-11-17 15:36:14 -07:00

82 lines
1.7 KiB
Protocol Buffer

syntax = "proto3";
package mrc.proto;
option java_package = "com.mrc.proto";
message ProtobufJoystickData {
uint64 AvailableButtons = 1;
uint64 Buttons = 2;
uint32 AvailableAxes = 3;
repeated sint32 Axes = 4;
// Each POV takes up 4 bits
// We can fit 8 in here.
uint32 POVCount = 5;
uint32 POVs = 6;
}
message ProtobufControlData {
uint32 ControlWord = 1;
int32 MatchTime = 2;
repeated ProtobufJoystickData Joysticks = 3;
fixed64 CurrentOpMode = 4;
}
message ProtobufJoystickDescriptor {
string JoystickName = 1;
bool IsGamepad = 2;
uint32 GamepadType = 3;
uint32 SupportedOutputs = 4;
}
message ProtobufJoystickDescriptors {
repeated ProtobufJoystickDescriptor Descriptors = 1;
}
message ProtobufJoystickOutput {
uint32 LEDs = 1;
uint32 Rumble = 2; // 16 bits, left msb, right lsb
uint32 TriggerRumble = 3; // 16 bits, left msb, right lsb
}
message ProtobufJoystickOutputs {
repeated ProtobufJoystickOutput Outputs = 1;
}
message ProtobufMatchInfo {
string EventName = 1;
int32 MatchNumber = 2;
int32 ReplayNumber = 3;
int32 MatchType = 4;
}
message ProtobufErrorInfo {
bool IsError = 1;
sint32 ErrorCode = 2;
string Details = 3;
string Location = 4;
string CallStack = 5;
}
message ProtobufOpMode {
fixed64 Hash = 1;
string Name = 2;
}
message ProtobufAvailableOpModes {
repeated ProtobufOpMode Modes = 1;
}
message ProtobufErrorInfoTimestamp {
ProtobufErrorInfo ErrorInfo = 1;
uint64 Timestamp = 2;
int32 SequenceNumber = 3;
int32 NumOccurances = 4;
}
message ProtobufConsoleLineTimestamp {
string ConsoleLine = 1;
uint64 Timestamp = 2;
int32 SequenceNumber = 3;
}