Fix BPF unmarshalling
This commit is contained in:
parent
990e176b71
commit
61729b302c
|
@ -100,7 +100,7 @@ void ftcan_msg_received_cb(uint16_t id, size_t datalen, const uint8_t *data) {
|
|||
vehicle_state.last_ams_error.arg = data[1];
|
||||
break;
|
||||
case CAN_ID_ABX_DRIVER:
|
||||
vehicle_state.brake_press_f = (data[1] | ((data[2] & 0x0F) << 4)) * 0.1;
|
||||
vehicle_state.brake_press_f = (data[1] | ((data[2] & 0x0F) << 8)) * 0.1;
|
||||
vehicle_state.brake_press_r = ((data[2] >> 4) | (data[3] << 4)) * 0.1;
|
||||
vehicle_state.speed = data[5] * CAN_ABX_DRIVER_SPEED_FACTOR;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue