GM: move set speed scaling to DBC (#25422)

* Move scaling into DBC for GM cruise setpoint

* bump opendbc

* no int

* Update refs

* Update ref_commit
old-commit-hash: f341df006a
taco
Shane Smiskol 3 years ago committed by GitHub
parent be4392faaa
commit 40189c8d3f
  1. 2
      opendbc
  2. 2
      selfdrive/car/gm/carstate.py
  3. 3
      selfdrive/car/gm/gmcan.py
  4. 2
      selfdrive/test/process_replay/ref_commit

@ -1 +1 @@
Subproject commit 488568517162194fbb2aa45d3dba4c6af663a883
Subproject commit c6665ed11b8d8c998e46f8dbee30e70a7d451e5e

@ -80,7 +80,7 @@ class CarState(CarStateBase):
ret.cruiseState.enabled = pt_cp.vl["AcceleratorPedal2"]["CruiseState"] != AccState.OFF
ret.cruiseState.standstill = pt_cp.vl["AcceleratorPedal2"]["CruiseState"] == AccState.STANDSTILL
if self.CP.networkLocation == NetworkLocation.fwdCamera:
ret.cruiseState.speed = (cam_cp.vl["ASCMActiveCruiseControlStatus"]["ACCSpeedSetpoint"] / 16) * CV.KPH_TO_MS
ret.cruiseState.speed = cam_cp.vl["ASCMActiveCruiseControlStatus"]["ACCSpeedSetpoint"] * CV.KPH_TO_MS
return ret

@ -63,8 +63,7 @@ def create_friction_brake_command(packer, bus, apply_brake, idx, near_stop, at_f
return packer.make_can_msg("EBCMFrictionBrakeCmd", bus, values)
def create_acc_dashboard_command(packer, bus, acc_engaged, target_speed_kph, lead_car_in_sight, fcw):
# Not a bit shift, dash can round up based on low 4 bits.
target_speed = int(target_speed_kph * 16) & 0xfff
target_speed = min(target_speed_kph, 255)
values = {
"ACCAlwaysOne" : 1,

@ -1 +1 @@
60aa8580527e513fe25100a348ee4c5971717960
118d78e2040103c00b4bfcc875fcdcd6a15e2211

Loading…
Cancel
Save