reduce comfort band with lead car

pull/23257/head
Comma Device 4 years ago
parent f75da6e308
commit 7ac938a474
  1. 6
      selfdrive/car/volkswagen/carcontroller.py
  2. 6
      selfdrive/car/volkswagen/volkswagencan.py

@ -56,6 +56,9 @@ class CarController():
else:
self.acc_stopping, self.acc_starting = False, False
cb_pos = 0.0 if lead_visible else 0.1
cb_neg = 0.1
if acc_hold_request:
weird_value = 0x88
elif self.acc_stopping:
@ -66,7 +69,8 @@ class CarController():
if frame % P.ACC_CONTROL_STEP == 0:
idx = (frame / P.ACC_CONTROL_STEP) % 16
can_sends.append(volkswagencan.create_mqb_acc_06_control(self.packer_pt, CANBUS.pt, enabled, acc_status,
accel, self.acc_stopping, self.acc_starting, idx))
accel, self.acc_stopping, self.acc_starting,
cb_pos, cb_neg, idx))
can_sends.append(volkswagencan.create_mqb_acc_07_control(self.packer_pt, CANBUS.pt, enabled,
accel, self.acc_stopping, self.acc_starting,
acc_hold_request, acc_hold_release, weird_value, idx))

@ -49,14 +49,14 @@ def create_mqb_acc_buttons_control(packer, bus, buttonStatesToSend, CS, idx):
return packer.make_can_msg("GRA_ACC_01", bus, values, idx)
def create_mqb_acc_06_control(packer, bus, enabled, acc_status, accel, acc_stopping, acc_starting,
idx):
cb_pos, cb_neg, idx):
values = {
"ACC_Typ": 2, # FIXME: locked to stop and go, need to tweak for cars that only support follow-to-stop
"ACC_Status_ACC": acc_status,
"ACC_StartStopp_Info": enabled,
"ACC_Sollbeschleunigung_02": accel if enabled else 3.01,
"ACC_zul_Regelabw_unten": 0.1 if enabled else 0, # FIXME: need comfort regulation logic here
"ACC_zul_Regelabw_oben": 0.1 if enabled else 0, # FIXME: need comfort regulation logic here
"ACC_zul_Regelabw_unten": cb_neg,
"ACC_zul_Regelabw_oben": cb_pos,
"ACC_neg_Sollbeschl_Grad_02": 5.0 if enabled else 0,
"ACC_pos_Sollbeschl_Grad_02": 5.0 if enabled else 0,
"ACC_Anfahren": acc_starting,

Loading…
Cancel
Save