need to understand lkas_blocked, can we just use that?
need to understand lkas_blocked, can we just use that?pull/23998/head
parent
fef4b0c428
commit
8793fb562d
|
@ -15,7 +15,7 @@ class CarState(CarStateBase):
|
||||||
self.crz_btns_counter = 0
|
self.crz_btns_counter = 0
|
||||||
self.acc_active_last = False
|
self.acc_active_last = False
|
||||||
self.low_speed_alert = False
|
self.low_speed_alert = False
|
||||||
self.lkas_allowed_speed = False
|
self.lkas_allowed_speed = True
|
||||||
self.lkas_disabled = False
|
self.lkas_disabled = False
|
||||||
|
|
||||||
def update(self, cp, cp_cam):
|
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
|
# 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:
|
if speed_kph > LKAS_LIMITS.ENABLE_SPEED and not lkas_blocked:
|
||||||
self.lkas_allowed_speed = True
|
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
|
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
|
# 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
|
# it should be used for carState.cruiseState.nonAdaptive instead
|
||||||
|
|
Loading…
Reference in New Issue