mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-29 10:53:49 +08:00
blazer
This commit is contained in:
@@ -560,7 +560,7 @@ class CarController(CarControllerBase):
|
||||
CanBus.POWERTRAIN, self.malibu_cancel_phase, CS.steering_button_prefix))
|
||||
self.malibu_cancel_phase = (self.malibu_cancel_phase + 1) % 4
|
||||
self.malibu_cancel_frame += 1
|
||||
elif self.CP.carFingerprint in SDGM_CAR and self.CP.carFingerprint not in volt_like:
|
||||
elif self.CP.carFingerprint in SDGM_CAR and self.CP.carFingerprint not in (volt_like | {CAR.CHEVROLET_BLAZER, CAR.CHEVROLET_MALIBU_SDGM}):
|
||||
can_sends.append(gmcan.create_buttons(self.packer_pt, CanBus.POWERTRAIN, CS.buttons_counter, CruiseButtons.CANCEL))
|
||||
else:
|
||||
cancel_bus = CanBus.POWERTRAIN if (self.CP.enableGasInterceptor and self.CP.carFingerprint == CAR.CHEVROLET_BOLT_CC_2022_2023) else CanBus.CAMERA
|
||||
|
||||
@@ -39,7 +39,7 @@ class CarState(CarStateBase):
|
||||
ret = car.CarState.new_message()
|
||||
fp_ret = custom.FrogPilotCarState.new_message()
|
||||
volt_like = {CAR.CHEVROLET_VOLT, CAR.CHEVROLET_VOLT_2019, CAR.CHEVROLET_VOLT_ASCM, CAR.CHEVROLET_VOLT_CAMERA, CAR.CHEVROLET_VOLT_CC}
|
||||
kaofui_state_cars = volt_like | {
|
||||
kaofui_state_cars = volt_like | SDGM_CAR | ASCM_INT | {
|
||||
CAR.CHEVROLET_BLAZER,
|
||||
CAR.CHEVROLET_MALIBU_SDGM,
|
||||
CAR.CHEVROLET_MALIBU_CC,
|
||||
@@ -223,7 +223,7 @@ class CarState(CarStateBase):
|
||||
messages = []
|
||||
if CP.networkLocation == NetworkLocation.fwdCamera and not CP.flags & GMFlags.NO_CAMERA.value:
|
||||
volt_like = {CAR.CHEVROLET_VOLT, CAR.CHEVROLET_VOLT_2019, CAR.CHEVROLET_VOLT_ASCM, CAR.CHEVROLET_VOLT_CAMERA, CAR.CHEVROLET_VOLT_CC}
|
||||
kaofui_state_cars = volt_like | {
|
||||
kaofui_state_cars = volt_like | SDGM_CAR | ASCM_INT | {
|
||||
CAR.CHEVROLET_BLAZER,
|
||||
CAR.CHEVROLET_MALIBU_SDGM,
|
||||
CAR.CHEVROLET_MALIBU_CC,
|
||||
@@ -268,7 +268,7 @@ class CarState(CarStateBase):
|
||||
]
|
||||
|
||||
volt_like = {CAR.CHEVROLET_VOLT, CAR.CHEVROLET_VOLT_2019, CAR.CHEVROLET_VOLT_ASCM, CAR.CHEVROLET_VOLT_CAMERA, CAR.CHEVROLET_VOLT_CC}
|
||||
kaofui_state_cars = volt_like | {
|
||||
kaofui_state_cars = volt_like | SDGM_CAR | ASCM_INT | {
|
||||
CAR.CHEVROLET_BLAZER,
|
||||
CAR.CHEVROLET_MALIBU_SDGM,
|
||||
CAR.CHEVROLET_MALIBU_CC,
|
||||
|
||||
@@ -79,7 +79,7 @@ def create_buttons_malibu_cancel(bus, phase, prefix=0x41):
|
||||
data[3] = prefix & 0xFF
|
||||
data[4] = 0x00
|
||||
cancel_bytes = (0x60, 0xAF, 0x65, 0x9E, 0x6A, 0x8D, 0x6F, 0x7C)
|
||||
idx = (phase % 4) * 2
|
||||
idx = ((phase + 2) % 4) * 2
|
||||
data[5] = cancel_bytes[idx]
|
||||
data[6] = cancel_bytes[idx + 1]
|
||||
return make_can_msg(0x1e1, bytes(data), bus)
|
||||
|
||||
@@ -561,7 +561,7 @@ class CarInterface(CarInterfaceBase):
|
||||
below_min_enable_speed = ret.vEgo < self.CP.minEnableSpeed or self.CS.moving_backward
|
||||
if below_min_enable_speed and not (ret.standstill and ret.brake >= 20 and
|
||||
(self.CP.networkLocation == NetworkLocation.fwdCamera and
|
||||
(self.CP.carFingerprint in VOLT_LIKE_CARS or self.CP.carFingerprint not in SDGM_CAR))):
|
||||
(self.CP.carFingerprint in VOLT_LIKE_CARS or self.CP.carFingerprint in {CAR.CHEVROLET_BLAZER, CAR.CHEVROLET_MALIBU_SDGM} or self.CP.carFingerprint not in SDGM_CAR))):
|
||||
events.add(EventName.belowEngageSpeed)
|
||||
if ret.cruiseState.standstill and not self.CP.autoResumeSng:
|
||||
events.add(EventName.resumeRequired)
|
||||
|
||||
Reference in New Issue
Block a user