mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-11 10:43:46 +08:00
Restore Sanity
AHHHHHHH
This commit is contained in:
@@ -209,7 +209,8 @@ def get_car(logcan, sendcan, experimental_long_allowed, params, num_pandas=1, fr
|
|||||||
CP.fingerprintSource = source
|
CP.fingerprintSource = source
|
||||||
CP.fuzzyFingerprint = not exact_match
|
CP.fuzzyFingerprint = not exact_match
|
||||||
|
|
||||||
return get_car_interface(CP, FPCP), CP, FPCP
|
interface_instance = get_car_interface(CP, None)
|
||||||
|
return interface_instance, CP, FPCP
|
||||||
|
|
||||||
def write_car_param(platform=MOCK.MOCK):
|
def write_car_param(platform=MOCK.MOCK):
|
||||||
params = Params()
|
params = Params()
|
||||||
|
|||||||
@@ -98,6 +98,8 @@ class CarInterface(CarInterfaceBase):
|
|||||||
if PEDAL_MSG in fingerprint[0]:
|
if PEDAL_MSG in fingerprint[0]:
|
||||||
ret.enableGasInterceptor = True
|
ret.enableGasInterceptor = True
|
||||||
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_GAS_INTERCEPTOR
|
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_GAS_INTERCEPTOR
|
||||||
|
# When a pedal interceptor is present, always use normal longitudinal (block stock cruise)
|
||||||
|
experimental_long = False
|
||||||
|
|
||||||
if candidate in EV_CAR:
|
if candidate in EV_CAR:
|
||||||
ret.transmissionType = TransmissionType.direct
|
ret.transmissionType = TransmissionType.direct
|
||||||
|
|||||||
@@ -218,9 +218,10 @@ class CarInterfaceBase(ABC):
|
|||||||
self.silent_steer_warning = True
|
self.silent_steer_warning = True
|
||||||
self.v_ego_cluster_seen = False
|
self.v_ego_cluster_seen = False
|
||||||
|
|
||||||
self.CS = CarState(CP, FPCP)
|
self.CS = CarState(CP, None)
|
||||||
self.cp = self.CS.get_can_parser(CP, FPCP)
|
fp = FPCP if FPCP is not None else getattr(self, "FPCP", None)
|
||||||
self.cp_cam = self.CS.get_cam_can_parser(CP, FPCP)
|
self.cp = self.CS.get_can_parser(CP, fp)
|
||||||
|
self.cp_cam = self.CS.get_cam_can_parser(CP, fp)
|
||||||
self.cp_adas = self.CS.get_adas_can_parser(CP)
|
self.cp_adas = self.CS.get_adas_can_parser(CP)
|
||||||
self.cp_body = self.CS.get_body_can_parser(CP)
|
self.cp_body = self.CS.get_body_can_parser(CP)
|
||||||
self.cp_loopback = self.CS.get_loopback_can_parser(CP)
|
self.cp_loopback = self.CS.get_loopback_can_parser(CP)
|
||||||
|
|||||||
Reference in New Issue
Block a user