This commit is contained in:
rav4kumar
2024-09-02 20:03:09 -07:00
parent c574fd0b5b
commit acb894a678
+5 -2
View File
@@ -172,7 +172,7 @@ class CarController(CarControllerBase):
self.pcm_accel_comp = 0.0
# You can uncomment these lines as needed
# pcm_accel_cmd = actuators.accel + self.pcm_accel_comp # + offset
pcm_accel_cmd = actuators.accel + self.pcm_accel_comp # + offset
# pcm_accel_cmd = actuators.accel - pitch_offset
# In case CC.longActive is False
@@ -198,7 +198,10 @@ class CarController(CarControllerBase):
interceptor_gas_cmd = clip(pedal_command, 0., MAX_INTERCEPTOR_GAS)
else:
interceptor_gas_cmd = 0.
pcm_accel_cmd = clip(actuators.accel + self.pcm_accel_comp, self.params.ACCEL_MIN, self.params.ACCEL_MAX)
if not sp_tss2_long_tune:
pcm_accel_cmd = clip(pcm_accel_cmd, self.params.ACCEL_MIN, self.params.ACCEL_MAX)
else:
pcm_accel_cmd = clip(actuators.accel, self.params.ACCEL_MIN, self.params.ACCEL_MAX)
# TODO: probably can delete this. CS.pcm_acc_status uses a different signal
# than CS.cruiseState.enabled. confirm they're not meaningfully different