|
|
|
@ -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 |
|
|
|
|