We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9a268f3 commit 0dcd84dCopy full SHA for 0dcd84d
board/safety/safety_toyota.h
@@ -36,7 +36,7 @@ static void toyota_rx_hook(CAN_FIFOMailBox_TypeDef *to_push) {
36
torque_meas_new = to_signed(torque_meas_new, 16);
37
38
// scale by dbc_factor
39
- torque_meas_new *= dbc_eps_torque_factor / 100;
+ torque_meas_new = (torque_meas_new * dbc_eps_torque_factor) / 100;
40
41
// increase torque_meas by 1 to be conservative on rounding
42
torque_meas_new += (torque_meas_new > 0 ? 1 : -1);
0 commit comments