Small fixes for speed and gear
This commit is contained in:
parent
492484ac7c
commit
db1caa2b8d
|
|
@ -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
|
// bytes 2 and 3 are a 16 bit velocity
|
||||||
if ( velocity > 0 )
|
if ( velocity > 0 )
|
||||||
{
|
{
|
||||||
bytes[3] = (velocity >> 8) & 0xFF;
|
bytes[2] = (velocity >> 8) & 0xFF;
|
||||||
bytes[2] = velocity & 0xFF;
|
bytes[3] = velocity & 0xFF;
|
||||||
|
slogd("velocity bytes are %x and %x", bytes[2], bytes[3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// byte 4 is gear
|
// byte 4 is gear
|
||||||
bytes[4] = gear;
|
bytes[4] = gear+1;
|
||||||
|
|
||||||
|
|
||||||
if (wheeldevice->handle)
|
if (wheeldevice->handle)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue