mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-28 01:52:06 +08:00
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: f341df006a002a47034787673893f930caa81b53
This commit is contained in:
+1
-1
Submodule opendbc updated: 4885685171...c6665ed11b
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user