[hal] Fix joystick buttons not working on SC (#7980)

This commit is contained in:
Thad House
2025-05-18 07:03:52 -07:00
committed by GitHub
parent 231ec348fe
commit 0cb4df7e05
6 changed files with 13 additions and 13 deletions

View File

@@ -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;
}