From 19565e7acae0e0a341a89d08c701a7dae9645ac1 Mon Sep 17 00:00:00 2001 From: firestar5683 <168790843+firestar5683@users.noreply.github.com> Date: Sat, 10 Jan 2026 00:13:29 -0600 Subject: [PATCH] Malibu Pedal Tuning --- selfdrive/car/gm/carcontroller.py | 3 +++ selfdrive/car/gm/interface.py | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/selfdrive/car/gm/carcontroller.py b/selfdrive/car/gm/carcontroller.py index 34ddbf48c..f095c20ae 100644 --- a/selfdrive/car/gm/carcontroller.py +++ b/selfdrive/car/gm/carcontroller.py @@ -49,6 +49,8 @@ class CarController(CarControllerBase): self.params = CarControllerParams(self.CP) self.is_volt = self.CP.carFingerprint in (CAR.CHEVROLET_VOLT, CAR.CHEVROLET_VOLT_2019, CAR.CHEVROLET_VOLT_ASCM, CAR.CHEVROLET_VOLT_CAMERA, CAR.CHEVROLET_VOLT_CC) + # Malibu Hybrid CC pedal voltages are slightly higher than Bolt; scale down + self.pedal_scale = 0.96 if self.CP.carFingerprint == CAR.CHEVROLET_MALIBU_HYBRID_CC else 1.0 self.mass = CP.mass self.tireRadius = 0.075 * CP.wheelbase + 0.1453 self.frontalArea = 1.05 * CP.wheelbase + 0.0679 @@ -212,6 +214,7 @@ class CarController(CarControllerBase): if self.CP.carFingerprint in CC_ONLY_CAR: # gas interceptor only used for full long control on cars without ACC interceptor_gas_cmd = self.calc_pedal_command(actuators.accel, CC.longActive) + interceptor_gas_cmd = clip(interceptor_gas_cmd * self.pedal_scale, 0., 1.) if self.CP.enableGasInterceptor and self.apply_gas > self.params.INACTIVE_REGEN and CS.out.cruiseState.standstill: # "Tap" the accelerator pedal to re-engage ACC diff --git a/selfdrive/car/gm/interface.py b/selfdrive/car/gm/interface.py index 91250ae78..04d0ccc5f 100644 --- a/selfdrive/car/gm/interface.py +++ b/selfdrive/car/gm/interface.py @@ -326,6 +326,17 @@ class CarInterface(CarInterfaceBase): ret.vEgoStopping = 0.25 ret.vEgoStarting = 0.25 + if ret.enableGasInterceptor and candidate == CAR.CHEVROLET_MALIBU_HYBRID_CC: + ret.flags |= GMFlags.PEDAL_LONG.value + ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_PEDAL_LONG + ret.longitudinalTuning.kiBP = [0.0, 5., 35.] + ret.longitudinalTuning.kiV = [0.0, 0.35, 0.5] + ret.longitudinalTuning.kfDEPRECATED = 0.15 + ret.stoppingDecelRate = 0.8 + ret.minEnableSpeed = -1 + ret.pcmCruise = False + ret.openpilotLongitudinalControl = not frogpilot_toggles.disable_openpilot_long + elif candidate in CC_ONLY_CAR: ret.flags |= GMFlags.CC_LONG.value