diff --git a/selfdrive/car/honda/carstate.py b/selfdrive/car/honda/carstate.py index 6ea3e1b6e7..03aedb31d2 100644 --- a/selfdrive/car/honda/carstate.py +++ b/selfdrive/car/honda/carstate.py @@ -224,15 +224,12 @@ class CarState(CarStateBase): # switch is on for at least 2 consecutive CAN samples # brake switch rises earlier than brake pressed but is never 1 when in park brake_switch_vals = cp.vl_all["POWERTRAIN_DATA"]["BRAKE_SWITCH"] - brake_switch = cp.vl["POWERTRAIN_DATA"]["BRAKE_SWITCH"] != 0 - print('brake_switch_vals', brake_switch_vals, int(brake_switch)) if len(brake_switch_vals): + brake_switch = cp.vl["POWERTRAIN_DATA"]["BRAKE_SWITCH"] != 0 if len(brake_switch_vals) > 1: - # assert False self.brake_switch_prev = brake_switch_vals[-2] != 0 self.brake_switch_active = brake_switch and self.brake_switch_prev self.brake_switch_prev = brake_switch - print(cp.vl["POWERTRAIN_DATA"]["BRAKE_PRESSED"], self.brake_switch_active) ret.brakePressed = (cp.vl["POWERTRAIN_DATA"]["BRAKE_PRESSED"] != 0) or self.brake_switch_active ret.brake = cp.vl["VSA_STATUS"]["USER_BRAKE"] diff --git a/selfdrive/car/tests/routes.py b/selfdrive/car/tests/routes.py index 4136515702..664fcdbbb0 100755 --- a/selfdrive/car/tests/routes.py +++ b/selfdrive/car/tests/routes.py @@ -178,11 +178,6 @@ routes = [ CarTestRoute("54034823d30962f5|2021-05-24--06-37-34", TOYOTA.CAMRY), # hybrid CarTestRoute("3456ad0cd7281b24|2020-12-13--17-45-56", TOYOTA.CAMRY_TSS2), CarTestRoute("ffccc77938ddbc44|2021-01-04--16-55-41", TOYOTA.CAMRY_TSS2), # hybrid - CarTestRoute("4e45c89c38e8ec4d|2021-05-02--02-49-28", TOYOTA.COROLLA), - CarTestRoute("5f5afb36036506e4|2019-05-14--02-09-54", TOYOTA.COROLLA), - CarTestRoute("5f5afb36036506e4|2019-05-14--02-09-54", TOYOTA.COROLLA), - CarTestRoute("5f5afb36036506e4|2019-05-14--02-09-54", TOYOTA.COROLLA), - CarTestRoute("5f5afb36036506e4|2019-05-14--02-09-54", TOYOTA.COROLLA), CarTestRoute("5f5afb36036506e4|2019-05-14--02-09-54", TOYOTA.COROLLA), CarTestRoute("5f5afb36036506e4|2019-05-14--02-09-54", TOYOTA.COROLLA_TSS2), CarTestRoute("5ceff72287a5c86c|2019-10-19--10-59-02", TOYOTA.COROLLA_TSS2), # hybrid diff --git a/selfdrive/car/toyota/carstate.py b/selfdrive/car/toyota/carstate.py index 99c9d13a10..3a89d655da 100644 --- a/selfdrive/car/toyota/carstate.py +++ b/selfdrive/car/toyota/carstate.py @@ -56,12 +56,10 @@ class CarState(CarStateBase): ret.brakeHoldActive = cp.vl["ESP_CONTROL"]["BRAKE_HOLD_ACTIVE"] == 1 if self.CP.enableGasInterceptor: ret.gas = (cp.vl["GAS_SENSOR"]["INTERCEPTOR_GAS"] + cp.vl["GAS_SENSOR"]["INTERCEPTOR_GAS2"]) // 2 - # print('ret.gas', ret.gas) ret.gasPressed = ret.gas > 805 else: # TODO: find a common gas pedal percentage signal ret.gasPressed = cp.vl["PCM_CRUISE"]["GAS_RELEASED"] == 0 - # print(cp.vl["PCM_CRUISE"]["GAS_RELEASED"]) ret.wheelSpeeds = self.get_wheel_speeds( cp.vl["WHEEL_SPEEDS"]["WHEEL_SPEED_FL"], diff --git a/selfdrive/car/toyota/interface.py b/selfdrive/car/toyota/interface.py index 5380891574..9cf86d69ab 100644 --- a/selfdrive/car/toyota/interface.py +++ b/selfdrive/car/toyota/interface.py @@ -222,7 +222,6 @@ class CarInterface(CarInterfaceBase): ret.enableDsu = len(found_ecus) > 0 and Ecu.dsu not in found_ecus and candidate not in (NO_DSU_CAR | UNSUPPORTED_DSU_CAR) \ and not (ret.flags & ToyotaFlags.SMART_DSU) ret.enableGasInterceptor = 0x201 in fingerprint[0] - print('enableGasInterceptor', ret.enableGasInterceptor) # if the smartDSU is detected, openpilot can send ACC_CONTROL and the smartDSU will block it from the DSU or radar. # since we don't yet parse radar on TSS2/TSS-P radar-based ACC cars, gate longitudinal behind experimental toggle