From db1caa2b8d208a33afa7c41ec77ba43932abb958 Mon Sep 17 00:00:00 2001 From: Paul Dino Jones Date: Mon, 5 Aug 2024 16:10:15 -0400 Subject: [PATCH] Small fixes for speed and gear --- src/monocoque/devices/usb/wheels/cammusc5.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/monocoque/devices/usb/wheels/cammusc5.c b/src/monocoque/devices/usb/wheels/cammusc5.c index 1f96ab2..6b72c15 100644 --- a/src/monocoque/devices/usb/wheels/cammusc5.c +++ b/src/monocoque/devices/usb/wheels/cammusc5.c @@ -39,12 +39,13 @@ int cammusc5_update(WheelDevice* wheeldevice, int maxrpm, int rpm, int gear, int // bytes 2 and 3 are a 16 bit velocity if ( velocity > 0 ) { - bytes[3] = (velocity >> 8) & 0xFF; - bytes[2] = velocity & 0xFF; + bytes[2] = (velocity >> 8) & 0xFF; + bytes[3] = velocity & 0xFF; + slogd("velocity bytes are %x and %x", bytes[2], bytes[3]); } // byte 4 is gear - bytes[4] = gear; + bytes[4] = gear+1; if (wheeldevice->handle)