Revert "pedal"

This reverts commit 164a4ac9ff39c244b23d118f38bedb097867fa2e.

f
This commit is contained in:
firestar5683
2025-10-09 12:15:11 -05:00
parent 5125403753
commit 40019815c1
2 changed files with 3 additions and 4 deletions
+1 -2
View File
@@ -440,11 +440,10 @@ class CarController(CarControllerBase):
# TODO: integrate this with the code block below?
if (
(self.CP.flags & GMFlags.PEDAL_LONG.value) # Always cancel stock CC when using pedal interceptor
or (self.CP.flags & GMFlags.CC_LONG.value) # Match ACC behavior for non-ACC cars
or (self.CP.flags & GMFlags.CC_LONG.value and not CC.enabled) # Cancel stock CC if OP is not active
) and CS.out.cruiseState.enabled:
if (self.frame - self.last_button_frame) * DT_CTRL > 0.04:
self.last_button_frame = self.frame
# Always send cancel on POWERTRAIN bus for pedal/CC-long paths
can_sends.append(gmcan.create_buttons(self.packer_pt, CanBus.POWERTRAIN, (CS.buttons_counter + 1) % 4, CruiseButtons.CANCEL))
else:
+2 -2
View File
@@ -165,9 +165,9 @@ class CarState(CarStateBase):
ret.cruiseState.speed = pt_cp.vl["ECMCruiseControl"]["CruiseSetSpeed"] * CV.KPH_TO_MS
# Try ASCM first for cars that might have it (like misfingerprinted Bolts), fall back to ECM
try:
ret.cruiseState.enabled = cam_cp.vl["ASCMActiveCruiseControlStatus"]["ACCCmdActive"] != 0
except:
ret.cruiseState.enabled = pt_cp.vl["ECMCruiseControl"]["CruiseActive"] != 0
except:
ret.cruiseState.enabled = cam_cp.vl["ASCMActiveCruiseControlStatus"]["ACCCmdActive"] != 0
if self.CP.enableBsm:
if self.CP.carFingerprint not in SDGM_CAR: