From ef127aa947a5c6a0ecc69bdd2d9026dcbeb88f58 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Thu, 7 Mar 2024 02:24:41 -0800 Subject: [PATCH] change to personality --- selfdrive/car/toyota/carcontroller.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/selfdrive/car/toyota/carcontroller.py b/selfdrive/car/toyota/carcontroller.py index b78af6e73f..d8356c674b 100644 --- a/selfdrive/car/toyota/carcontroller.py +++ b/selfdrive/car/toyota/carcontroller.py @@ -142,7 +142,9 @@ class CarController(CarControllerBase): # Press distance button until we are at the correct bar length. The distance cannot be changed without cruise available if self.frame % 6 == 0: - if CS.pcm_follow_distance_values.get(CS.pcm_follow_distance, "UNKNOWN") != "FAR" and CS.out.cruiseState.available: + + desired_distance = 4 - CC.hudControl.distanceLines # this is flipped + if CS.pcm_follow_distance_values != desired_distance and CS.out.cruiseState.available: self.distance_button = not self.distance_button else: self.distance_button = 0