|
|
|
@ -189,14 +189,14 @@ class CarController: |
|
|
|
|
clip(CS.out.vEgo + 0.0, 0.0, 100.0), |
|
|
|
|
clip(CS.out.vEgo + 5.0, 0.0, 100.0)] |
|
|
|
|
pcm_speed = interp(gas - brake, pcm_speed_BP, pcm_speed_V) |
|
|
|
|
pcm_accel = int(1.0 * 0xc6) |
|
|
|
|
pcm_accel = int(1.0 * self.params.NIDEC_GAS_MAX) |
|
|
|
|
else: |
|
|
|
|
pcm_speed_V = [0.0, |
|
|
|
|
clip(CS.out.vEgo - 2.0, 0.0, 100.0), |
|
|
|
|
clip(CS.out.vEgo + 2.0, 0.0, 100.0), |
|
|
|
|
clip(CS.out.vEgo + 5.0, 0.0, 100.0)] |
|
|
|
|
pcm_speed = interp(gas - brake, pcm_speed_BP, pcm_speed_V) |
|
|
|
|
pcm_accel = int(clip((accel / 1.44) / max_accel, 0.0, 1.0) * 0xc6) |
|
|
|
|
pcm_accel = int(clip((accel / 1.44) / max_accel, 0.0, 1.0) * self.params.NIDEC_GAS_MAX) |
|
|
|
|
|
|
|
|
|
if not self.CP.openpilotLongitudinalControl: |
|
|
|
|
if self.frame % 2 == 0 and self.CP.carFingerprint not in HONDA_BOSCH_RADARLESS: # radarless cars don't have supplemental message |
|
|
|
@ -254,7 +254,7 @@ class CarController: |
|
|
|
|
self.speed = pcm_speed |
|
|
|
|
|
|
|
|
|
if not self.CP.enableGasInterceptor: |
|
|
|
|
self.gas = pcm_accel / 0xc6 |
|
|
|
|
self.gas = pcm_accel / self.params.NIDEC_GAS_MAX |
|
|
|
|
|
|
|
|
|
new_actuators = actuators.copy() |
|
|
|
|
new_actuators.speed = self.speed |
|
|
|
|