disable LDW when calibration is incomplete (#984)

pull/987/head
Adeeb 5 years ago committed by Willem Melching
parent 6f703eaf4e
commit f13c5d74aa
  1. 3
      selfdrive/controls/controlsd.py

@ -346,7 +346,8 @@ def data_send(sm, pm, CS, CI, CP, VM, state, events, actuators, v_cruise_kph, rk
CC.hudControl.leftLaneVisible = bool(left_lane_visible) CC.hudControl.leftLaneVisible = bool(left_lane_visible)
recent_blinker = (sm.frame - last_blinker_frame) * DT_CTRL < 5.0 # 5s blinker cooldown recent_blinker = (sm.frame - last_blinker_frame) * DT_CTRL < 5.0 # 5s blinker cooldown
ldw_allowed = CS.vEgo > 31 * CV.MPH_TO_MS and not recent_blinker and is_ldw_enabled and not isActive(state) calibrated = sm['liveCalibration'].calStatus == Calibration.CALIBRATED
ldw_allowed = CS.vEgo > 31 * CV.MPH_TO_MS and not recent_blinker and is_ldw_enabled and not isActive(state) and calibrated
md = sm['model'] md = sm['model']
if len(md.meta.desirePrediction): if len(md.meta.desirePrediction):

Loading…
Cancel
Save