need to understand lkas_blocked, can we just use that?

need to understand lkas_blocked, can we just use that?
pull/23998/head
Shane Smiskol 2022-03-18 17:51:38 -07:00
parent fef4b0c428
commit 8793fb562d
1 changed files with 2 additions and 4 deletions

View File

@ -15,7 +15,7 @@ class CarState(CarStateBase):
self.crz_btns_counter = 0
self.acc_active_last = False
self.low_speed_alert = False
self.lkas_allowed_speed = False
self.lkas_allowed_speed = True
self.lkas_disabled = False
def update(self, cp, cp_cam):
@ -70,10 +70,8 @@ class CarState(CarStateBase):
# wait for LKAS_BLOCK signal to clear when going up since it lags behind the speed sometimes
if speed_kph > LKAS_LIMITS.ENABLE_SPEED and not lkas_blocked:
self.lkas_allowed_speed = True
elif speed_kph < LKAS_LIMITS.DISABLE_SPEED:
elif speed_kph < LKAS_LIMITS.DISABLE_SPEED or lkas_blocked:
self.lkas_allowed_speed = False
else:
self.lkas_allowed_speed = True
# TODO: the signal used for available seems to be the adaptive cruise signal, instead of the main on
# it should be used for carState.cruiseState.nonAdaptive instead