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:
@@ -151,7 +151,7 @@ bool wpi::Protobuf<mrc::Joystick>::Pack(OutputStream& Stream,
|
||||
wpi::PackCallback AxesCb{Value.Axes.Axes()};
|
||||
|
||||
uint32_t PovsStore = 0;
|
||||
for (size_t i = 0; i < Value.Povs.GetCount(); i++) {
|
||||
for (int i = static_cast<int>(Value.Povs.GetCount()) - 1; i >= 0; i--) {
|
||||
PovsStore <<= 4;
|
||||
PovsStore |= Value.Povs.Povs()[i] & 0xF;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user