Switch personalities via steering wheel / onroad UI
Added toggle to switch between the personalities via the steering wheel for GM/Toyota/Volkswagen vehicles and an onroad button for other makes. Co-Authored-By: henryccy <104284652+henryccy@users.noreply.github.com> Co-Authored-By: Jason Jackrel <23621790+thinkpad4by3@users.noreply.github.com> Co-Authored-By: Eric Brown <13560103+nworb-cire@users.noreply.github.com> Co-Authored-By: Kevin Robert Keegan <3046315+krkeegan@users.noreply.github.com> Co-Authored-By: Jacob Pfeifer <jacob@pfeifer.dev> Co-Authored-By: mike8643 <98910897+mike8643@users.noreply.github.com>
This commit is contained in:
@@ -495,8 +495,16 @@ class CarStateBase(ABC):
|
||||
self.param = Params()
|
||||
self.param_memory = Params("/dev/shm/params")
|
||||
|
||||
self.display_menu = False
|
||||
self.distance_previously_pressed = False
|
||||
self.lkas_previously_pressed = False
|
||||
self.main_enabled = False
|
||||
self.profile_restored = False
|
||||
|
||||
self.display_timer = 0
|
||||
self.distance_button = 0
|
||||
self.personality_profile = self.param.get_int("LongitudinalPersonality")
|
||||
self.previous_personality_profile = self.param.get_int("LongitudinalPersonality")
|
||||
|
||||
def update_speed_kf(self, v_ego_raw):
|
||||
if abs(v_ego_raw - self.v_ego_kf.x[0][0]) > 2.0: # Prevent large accelerations when car starts at non zero speed
|
||||
@@ -589,6 +597,7 @@ class CarStateBase(ABC):
|
||||
def update_frogpilot_params(self, params):
|
||||
self.conditional_experimental_mode = params.get_bool("ConditionalExperimental")
|
||||
self.experimental_mode_via_press = params.get_bool("ExperimentalModeViaPress")
|
||||
self.personalities_via_wheel = params.get_int("AdjustablePersonalities") in {1, 3}
|
||||
|
||||
INTERFACE_ATTR_FILE = {
|
||||
"FINGERPRINTS": "fingerprints",
|
||||
|
||||
Reference in New Issue
Block a user