wip
This commit is contained in:
@@ -1133,13 +1133,13 @@ class Controls:
|
||||
self.drive_added = True
|
||||
|
||||
# Clearpilot - todo: override conditional on cruise button tap
|
||||
# if any(be.pressed and be.type == FrogPilotButtonType.lkas for be in CS.buttonEvents) and self.experimental_mode_via_lkas:
|
||||
# if self.frogpilot_variables.conditional_experimental_mode:
|
||||
# conditional_status = self.params_memory.get_int("CEStatus")
|
||||
# override_value = 0 if conditional_status in {1, 2, 3, 4, 5, 6} else 3 if conditional_status >= 7 else 4
|
||||
# self.params_memory.put_int("CEStatus", override_value)
|
||||
# else:
|
||||
# self.params.put_bool_nonblocking("ExperimentalMode", not self.experimental_mode)
|
||||
if any(be.pressed and be.type == FrogPilotButtonType.lkas for be in CS.buttonEvents) and self.experimental_mode_via_lkas:
|
||||
if self.frogpilot_variables.conditional_experimental_mode:
|
||||
conditional_status = self.params_memory.get_int("CEStatus")
|
||||
override_value = 0 if conditional_status in {1, 2, 3, 4, 5, 6} else 3 if conditional_status >= 7 else 4
|
||||
self.params_memory.put_int("CEStatus", override_value)
|
||||
else:
|
||||
self.params.put_bool_nonblocking("ExperimentalMode", not self.experimental_mode)
|
||||
|
||||
self.previously_enabled |= (self.enabled or self.FPCC.alwaysOnLateral) and CS.vEgo > CRUISING_SPEED
|
||||
self.previously_enabled &= self.driving_gear
|
||||
|
||||
Reference in New Issue
Block a user