mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
Fix Halsim DS Button Format (#1583)
This commit is contained in:
committed by
Peter Johnson
parent
1eb4c99d15
commit
404666b298
@@ -96,7 +96,7 @@ void DSCommPacket::ReadJoystickTag(wpi::ArrayRef<uint8_t> dataInput,
|
||||
int numBytes = (buttonCount + 7) / 8;
|
||||
stick.buttons.buttons = 0;
|
||||
for (int i = 0; i < numBytes; i++) {
|
||||
stick.buttons.buttons |= dataInput[1 + i] << (8 * (i));
|
||||
stick.buttons.buttons |= dataInput[numBytes - i] << (8 * (i));
|
||||
}
|
||||
stick.buttons.count = buttonCount;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user