From a437afec018dd28dee358aeaee1c02d91709f6d9 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Mon, 8 Aug 2022 20:33:04 -0700 Subject: [PATCH] clean up clean up --- selfdrive/car/gm/carcontroller.py | 2 +- selfdrive/car/gm/interface.py | 12 ++++-------- selfdrive/car/gm/values.py | 5 ----- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/selfdrive/car/gm/carcontroller.py b/selfdrive/car/gm/carcontroller.py index e14ce7f661..393293e45e 100644 --- a/selfdrive/car/gm/carcontroller.py +++ b/selfdrive/car/gm/carcontroller.py @@ -116,7 +116,7 @@ class CarController: lka_critical = lka_active and abs(actuators.steer) > 0.9 lka_icon_status = (lka_active, lka_critical) - # SW_GMLAN not yet on cam harness + # SW_GMLAN not yet on cam harness, no HUD alerts if self.CP.networkLocation != NetworkLocation.fwdCamera and (self.frame % self.params.CAMERA_KEEPALIVE_STEP == 0 or lka_icon_status != self.lka_icon_status_last): steer_alert = hud_alert in (VisualAlert.steerRequired, VisualAlert.ldw) can_sends.append(gmcan.create_lka_icon_command(CanBus.SW_GMLAN, lka_active, lka_critical, steer_alert)) diff --git a/selfdrive/car/gm/interface.py b/selfdrive/car/gm/interface.py index fc5ec24532..2434bb0919 100755 --- a/selfdrive/car/gm/interface.py +++ b/selfdrive/car/gm/interface.py @@ -55,16 +55,16 @@ class CarInterface(CarInterfaceBase): else: ret.transmissionType = TransmissionType.automatic - if candidate in CAMERA_ACC_CAR: # non-ASCM, camera integration - ret.openpilotLongitudinalControl = False # stock ACC + if candidate in CAMERA_ACC_CAR: + ret.openpilotLongitudinalControl = False ret.networkLocation = NetworkLocation.fwdCamera ret.radarOffCan = True # no radar ret.pcmCruise = True else: # ASCM, OBD-II harness + ret.openpilotLongitudinalControl = True ret.networkLocation = NetworkLocation.gateway ret.radarOffCan = False - ret.openpilotLongitudinalControl = True - ret.pcmCruise = False # For ASCM, stock non-adaptive cruise control is kept off + ret.pcmCruise = False # stock non-adaptive cruise control is kept off # These cars have been put into dashcam only due to both a lack of users and test coverage. # These cars likely still work fine. Once a user confirms each car works and a test route is @@ -89,8 +89,6 @@ class CarInterface(CarInterfaceBase): # supports stop and go, but initial engage must (conservatively) be above 18mph ret.minEnableSpeed = 18 * CV.MPH_TO_MS - # TODO: Should this be changed to -1? - # Newer cars (that are still ASCM-based) use -1 for minEnableSpeed with the comment "engage speed is decided by pcm" if candidate == CAR.VOLT: ret.mass = 1607. + STD_CARGO_KG @@ -163,9 +161,7 @@ class CarInterface(CarInterfaceBase): tire_stiffness_factor = 1.0 ret.steerActuatorDelay = 0.2 - # Set Panda to camera forwarding mode if ret.networkLocation == NetworkLocation.fwdCamera: - # TODO: Depends on Panda PR #962 (Cam Harness forwarding, stock ACC) ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_HW_CAM # TODO: get actual value, for now starting with reasonable value for diff --git a/selfdrive/car/gm/values.py b/selfdrive/car/gm/values.py index 7c1ad01896..57e8a5ac4c 100644 --- a/selfdrive/car/gm/values.py +++ b/selfdrive/car/gm/values.py @@ -10,11 +10,6 @@ Ecu = car.CarParams.Ecu class CarControllerParams: - # TODO: Different cars have different min steer speed, usually around 3-5 mph - # TODO: Delta up and down limits may require adjustment based on excessive rate limiting - # TODO: Min steer speed seems to be about 3 MPH; may differ per car - # TODO: Unsure of driver values - # TODO: MAX_GAS, ZERO_GAS and MAX_BRAKE, MAX_ACC_REGEN are based on a specific volt year... STEER_MAX = 300 # GM limit is 3Nm. Used by carcontroller to generate LKA output STEER_STEP = 2 # Control frames per command (50hz) STEER_DELTA_UP = 7 # Delta rates require review due to observed EPS weakness