remove useless check as previous one is enough
This commit is contained in:
parent
45bad91ba7
commit
52c2deb4ca
18
src/main.c
18
src/main.c
@ -122,18 +122,16 @@ void read_can(Tel *t, int soc) {
|
|||||||
|
|
||||||
if (nbytes != sizeof(struct can_frame)) return;
|
if (nbytes != sizeof(struct can_frame)) return;
|
||||||
|
|
||||||
if (nbytes > 0) {
|
|
||||||
|
|
||||||
switch (frame.can_id) {
|
switch (frame.can_id) {
|
||||||
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user