mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[hal] Fix joystick buttons not working on SC (#7980)
This commit is contained in:
@@ -22,7 +22,7 @@ static const uint8_t file_descriptor[] {
|
||||
0x28,0x0d,0x52,0x0b,0x42,0x75,0x74,0x74,0x6f,0x6e,
|
||||
0x43,0x6f,0x75,0x6e,0x74,0x12,0x18,0x0a,0x07,0x42,
|
||||
0x75,0x74,0x74,0x6f,0x6e,0x73,0x18,0x02,0x20,0x01,
|
||||
0x28,0x07,0x52,0x07,0x42,0x75,0x74,0x74,0x6f,0x6e,
|
||||
0x28,0x04,0x52,0x07,0x42,0x75,0x74,0x74,0x6f,0x6e,
|
||||
0x73,0x12,0x12,0x0a,0x04,0x41,0x78,0x65,0x73,0x18,
|
||||
0x03,0x20,0x03,0x28,0x11,0x52,0x04,0x41,0x78,0x65,
|
||||
0x73,0x12,0x1a,0x0a,0x08,0x50,0x4f,0x56,0x43,0x6f,
|
||||
@@ -140,12 +140,12 @@ static const uint8_t file_descriptor[] {
|
||||
0x0a,0x05,0x04,0x00,0x02,0x00,0x01,0x12,0x03,0x07,
|
||||
0x0b,0x16,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x00,
|
||||
0x03,0x12,0x03,0x07,0x19,0x1a,0x0a,0x0b,0x0a,0x04,
|
||||
0x04,0x00,0x02,0x01,0x12,0x03,0x08,0x04,0x18,0x0a,
|
||||
0x04,0x00,0x02,0x01,0x12,0x03,0x08,0x04,0x17,0x0a,
|
||||
0x0c,0x0a,0x05,0x04,0x00,0x02,0x01,0x05,0x12,0x03,
|
||||
0x08,0x04,0x0b,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,
|
||||
0x01,0x01,0x12,0x03,0x08,0x0c,0x13,0x0a,0x0c,0x0a,
|
||||
0x05,0x04,0x00,0x02,0x01,0x03,0x12,0x03,0x08,0x16,
|
||||
0x17,0x0a,0x0b,0x0a,0x04,0x04,0x00,0x02,0x02,0x12,
|
||||
0x08,0x04,0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,
|
||||
0x01,0x01,0x12,0x03,0x08,0x0b,0x12,0x0a,0x0c,0x0a,
|
||||
0x05,0x04,0x00,0x02,0x01,0x03,0x12,0x03,0x08,0x15,
|
||||
0x16,0x0a,0x0b,0x0a,0x04,0x04,0x00,0x02,0x02,0x12,
|
||||
0x03,0x09,0x04,0x1d,0x0a,0x0c,0x0a,0x05,0x04,0x00,
|
||||
0x02,0x02,0x04,0x12,0x03,0x09,0x04,0x0c,0x0a,0x0c,
|
||||
0x0a,0x05,0x04,0x00,0x02,0x02,0x05,0x12,0x03,0x09,
|
||||
|
||||
@@ -21,7 +21,7 @@ typedef struct _mrc_proto_ProtobufJoystickData {
|
||||
static pb_filedesc_t file_descriptor(void) noexcept;
|
||||
|
||||
uint32_t ButtonCount;
|
||||
uint32_t Buttons;
|
||||
uint64_t Buttons;
|
||||
pb_callback_t Axes;
|
||||
/* Each POV takes up 4 bits
|
||||
We can fit 8 in here. */
|
||||
@@ -155,7 +155,7 @@ typedef struct _mrc_proto_ProtobufAvailableOpModes {
|
||||
/* Struct field encoding specification for nanopb */
|
||||
#define mrc_proto_ProtobufJoystickData_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UINT32, ButtonCount, 1) \
|
||||
X(a, STATIC, SINGULAR, FIXED32, Buttons, 2) \
|
||||
X(a, STATIC, SINGULAR, UINT64, Buttons, 2) \
|
||||
X(a, CALLBACK, REPEATED, SINT32, Axes, 3) \
|
||||
X(a, STATIC, SINGULAR, UINT32, POVCount, 4) \
|
||||
X(a, STATIC, SINGULAR, UINT32, POVs, 5)
|
||||
|
||||
Reference in New Issue
Block a user