|
|
@ -53,12 +53,11 @@ class Car: |
|
|
|
if not disengage_on_accelerator: |
|
|
|
if not disengage_on_accelerator: |
|
|
|
self.CP.alternativeExperience |= ALTERNATIVE_EXPERIENCE.DISABLE_DISENGAGE_ON_GAS |
|
|
|
self.CP.alternativeExperience |= ALTERNATIVE_EXPERIENCE.DISABLE_DISENGAGE_ON_GAS |
|
|
|
|
|
|
|
|
|
|
|
car_recognized = self.CP.carName != 'mock' |
|
|
|
|
|
|
|
openpilot_enabled_toggle = self.params.get_bool("OpenpilotEnabledToggle") |
|
|
|
openpilot_enabled_toggle = self.params.get_bool("OpenpilotEnabledToggle") |
|
|
|
|
|
|
|
|
|
|
|
controller_available = self.CI.CC is not None and openpilot_enabled_toggle and not self.CP.dashcamOnly |
|
|
|
controller_available = self.CI.CC is not None and openpilot_enabled_toggle and not self.CP.dashcamOnly |
|
|
|
|
|
|
|
|
|
|
|
self.CP.passive = not car_recognized or not controller_available or self.CP.dashcamOnly |
|
|
|
self.CP.passive = not controller_available or self.CP.dashcamOnly |
|
|
|
if self.CP.passive: |
|
|
|
if self.CP.passive: |
|
|
|
safety_config = car.CarParams.SafetyConfig.new_message() |
|
|
|
safety_config = car.CarParams.SafetyConfig.new_message() |
|
|
|
safety_config.safetyModel = car.CarParams.SafetyModel.noOutput |
|
|
|
safety_config.safetyModel = car.CarParams.SafetyModel.noOutput |
|
|
|