mirror of https://github.com/commaai/panda.git
fix
This commit is contained in:
parent
e10939c007
commit
d2cd7210c3
|
@ -260,12 +260,12 @@ static bool toyota_tx_hook(const CANPacket_t *to_send) {
|
|||
|
||||
// check if we should wind down torque
|
||||
// Use lowest of current sample and 3 msgs ago (60ms for STEER_TORQUE_SENSOR at 50Hz)
|
||||
int driver_torque = MIN(ABS(driver_torque[0]), ABS(driver_torque[3]));
|
||||
int driver_torque = MIN(ABS(torque_driver.values[0]), ABS(torque_driver.values[3]));
|
||||
if ((driver_torque > TOYOTA_LTA_MAX_DRIVER_TORQUE) && (torque_wind_down != 0)) {
|
||||
tx = false;
|
||||
}
|
||||
|
||||
int eps_torque = MIN(ABS(torque_meas.min), ABS(torque_meas.max));
|
||||
int eps_torque = MIN(ABS(torque_meas.values[0]), ABS(torque_meas.values[3]));
|
||||
if ((eps_torque > TOYOTA_LTA_MAX_MEAS_TORQUE) && (torque_wind_down != 0)) {
|
||||
tx = false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue