3
3
from panda import Panda
4
4
from common .conversions import Conversions as CV
5
5
from common .numpy_fast import interp
6
- from common .params import Params
7
6
from selfdrive .car .honda .values import CarControllerParams , CruiseButtons , HondaFlags , CAR , HONDA_BOSCH , HONDA_NIDEC_ALT_SCM_MESSAGES , HONDA_BOSCH_ALT_BRAKE_SIGNAL
8
7
from selfdrive .car import STD_CARGO_KG , CivicParams , scale_rot_inertia , scale_tire_stiffness , gen_empty_fingerprint , get_safety_config
9
8
from selfdrive .car .interfaces import CarInterfaceBase
@@ -28,7 +27,7 @@ def get_pid_accel_limits(CP, current_speed, cruise_speed):
28
27
return CarControllerParams .NIDEC_ACCEL_MIN , interp (current_speed , ACCEL_MAX_BP , ACCEL_MAX_VALS )
29
28
30
29
@staticmethod
31
- def get_params (candidate , fingerprint = gen_empty_fingerprint (), car_fw = []): # pylint: disable=dangerous-default-value
30
+ def get_params (candidate , fingerprint = gen_empty_fingerprint (), car_fw = [], disable_radar = False ): # pylint: disable=dangerous-default-value
32
31
ret = CarInterfaceBase .get_std_params (candidate , fingerprint )
33
32
ret .carName = "honda"
34
33
@@ -38,7 +37,7 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[]): # py
38
37
39
38
# Disable the radar and let openpilot control longitudinal
40
39
# WARNING: THIS DISABLES AEB!
41
- ret .openpilotLongitudinalControl = Params (). get_bool ( "DisableRadar" )
40
+ ret .openpilotLongitudinalControl = disable_radar
42
41
43
42
ret .pcmCruise = not ret .openpilotLongitudinalControl
44
43
else :
0 commit comments