acc_hold_request=notCS.esp_hold_confirmation# Send hold request for ABS/ESP brake-hold until acked
ifCS.esp_hold_confirmation:
acc_hold_type=1# hold
stopping_distance=3.5
else:
acc_hold_type=3# hold_standby
stopping_distance=0.5
elifenabled:
ifself.acc_stopping:
self.acc_starting=True
self.acc_stopping=False
self.acc_starting&=CS.out.vEgo<CS.CP.vEgoStarting
acc_hold_release=CS.esp_hold_confirmation# Send release request for ABS/ESP brake-hold until acked
self.acc_starting&=CS.out.vEgo<1.5
acc_hold_release=self.acc_starting
stopping_distance=20.46
ifCS.esp_hold_confirmation:
acc_hold_type=4# startup
else:
acc_hold_type=0# no_request
else:
self.acc_stopping,self.acc_starting=False,False
# Hopefully, have PI yank the lag out and let the drivetrain coordinator make it smooth again
cb_pos=0.0iflead_visibleorCS.out.vEgo<2.0else0.2# react faster to lead cars, also don't get hung up at DSG clutch release/kiss points when creeping to stop
cb_neg=0.0ifaccel<0else0.2# IDK why, but stock likes to zero this out when accel is negative
cb_pos=0.0iflead_visibleorCS.out.vEgo<2.0else0.1# react faster to lead cars, also don't get hung up at DSG clutch release/kiss points when creeping to stop
cb_neg=0.0ifaccel<0else0.2# IDK why, but stock likes to zero this out when accel is negative