add param to override carParams.dashcamOnly (#24857)

* add param to override carParams.dashcamOnly

* little cleaner
old-commit-hash: 7c826b4fa1
taco
Adeeb Shihadeh 3 years ago committed by GitHub
parent 7c2ef148e6
commit 8cd45d02c0
  1. 1
      common/params.cc
  2. 5
      selfdrive/car/hyundai/interface.py
  3. 3
      selfdrive/controls/controlsd.py

@ -94,6 +94,7 @@ std::unordered_map<std::string, uint32_t> keys = {
{"CompletedTrainingVersion", PERSISTENT},
{"ControlsReady", CLEAR_ON_MANAGER_START | CLEAR_ON_IGNITION_ON},
{"CurrentRoute", CLEAR_ON_MANAGER_START | CLEAR_ON_IGNITION_ON},
{"DashcamOverride", PERSISTENT},
{"DisableLogging", CLEAR_ON_MANAGER_START | CLEAR_ON_IGNITION_ON},
{"DisablePowerDown", PERSISTENT},
{"DisableRadar_Allow", PERSISTENT},

@ -1,5 +1,4 @@
#!/usr/bin/env python3
import os
from cereal import car
from panda import Panda
from common.conversions import Conversions as CV
@ -38,9 +37,7 @@ class CarInterface(CarInterfaceBase):
# These cars have been put into dashcam only due to both a lack of users and test coverage.
# These cars likely still work fine. Once a user confirms each car works and a test route is
# added to selfdrive/car/tests/routes.py, we can remove it from this list.
ret.dashcamOnly = candidate in {CAR.KIA_OPTIMA_H, CAR.ELANTRA_GT_I30}
if candidate in HDA2_CAR:
ret.dashcamOnly = not os.path.exists('/data/enable-ev6')
ret.dashcamOnly = candidate in {CAR.KIA_OPTIMA_H, CAR.ELANTRA_GT_I30} or candidate in HDA2_CAR
ret.steerActuatorDelay = 0.1 # Default delay
ret.steerLimitTimer = 0.4

@ -104,6 +104,9 @@ class Controls:
if not self.disengage_on_accelerator:
self.CP.alternativeExperience |= ALTERNATIVE_EXPERIENCE.DISABLE_DISENGAGE_ON_GAS
if self.CP.dashcamOnly and params.get_bool("DashcamOverride"):
self.CP.dashcamOnly = False
# read params
self.is_metric = params.get_bool("IsMetric")
self.is_ldw_enabled = params.get_bool("IsLdwEnabled")

Loading…
Cancel
Save