correct can speed calcs
This commit is contained in:
parent
7dad14fa4e
commit
5c4c342455
@ -114,8 +114,8 @@ void read_can(Tel *t, int soc) {
|
|||||||
|
|
||||||
case 0x382:
|
case 0x382:
|
||||||
if (frame.can_dlc >= 2) {
|
if (frame.can_dlc >= 2) {
|
||||||
t->rpm.data = frame.data[0] | (frame.data[1] << 8);
|
t->rpm.data = frame.data[0] | (frame.data[1] << 8);
|
||||||
t->speed.data = t->rpm.data * 0.017;
|
t->speed.data = (int)(t->rpm.data * 0.017f);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user