VW PQ: Volkswagen Passat NMS (#24768)
* VW PQ: Volkswagen Passat NMS
* regen CARS.md
* vEgo from Bremse_1 vehicle speed
* sync opendbc to master
* handle checksums and counters in opendbc
* LDW HUD message handling
* GRA_Neu_Zaehler -> COUNTER
* bump opendbc
* stub in till we find platform ACC standstill
* bump opendbc
* bump opendbc
* placeholder lateral accel data
* regen CARS.md
* counters now directly supported in opendbc
* additional door-open signals
* add trunk lid state
* add doors and trunk lid to signals list
* LDW_Status updates and passthrough
* bump opendbc for typo fix
* update AWV comment
* another comment update
* regen CARS.md with PQ in dashcam only
* don't show NMS footnotes while still in dashcam
* polish
* add stubbed-out dashcamOnly prep
* VW MQB: Cleanup stock ACC button handling
* bump opendbc and panda
* use controls resume output as trigger
* these can wait until taco bell
* bump opendbc
* pass through of previously fixed value
* retry CI
* checks already done in carcontroller
* don't need these anymore
* reduce diff for now
* slightly better abstraction
* more engine and trans FW
* turn signal is instantaneous stalk position
* weak sauce :(
* better clarity
* try torque tune
* add test route references
* bump opendbc and panda for OP long
* don't show steering faults for 3 seconds after start
* longitudinal control senders
* a little more torque
* test hax to torque control
* test a little more delay
* allow use of manufacturer ramp-up rate
* soften wheel-touch threshold
* Revert "test hax to torque control"
This reverts commit d1af459c29
.
* punch it Chewie
* better ACC state and mainswitch handling
* a little more
* tweak max accel gradient
* oops
* also oops
* stuff
* srsly
* that's not how this works
* regen CARS.md
* footnotes now properly excluded for dashcam cars
* this wasn't a problem
* update network location detection
* bump submodules for ACC main switch
* clean up DBC references and long flag
* bump one more time
* one more time
* follow CANPacker counter refactor
* bump opendbc
* sync opendbc to master
* bump panda to fix Subaru tests
* DBC handling cleanup
* fix
* model-year stretch
* cleanup and rate bugfixes
* better abstractions
* simplify create_lka_hud_control
* volkswagencan -> mqbcan
* bump panda
* fix doc data bug, regen CARS.md
* style updates; diff reduction
* use common button enable logic
* not needed anymore
* refactor TSK and HUD enum values
* make common button events function
* consistency
* bump panda
* bump panda
* dashcam only
* don't need process_replay yet
* regen CARS.md with Passat NMS in dashcam
* can't handle dashcam-orphaned footnotes yet
* remove outdated standstill handling
* editor tried to be too helpful at some point
* don't need to import this anymore
* Apply suggestions from code review
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* follow parkingBrake refactor
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
pull/25458/head
parent
0ed8a7f42d
commit
c27d7913f2
10 changed files with 456 additions and 9 deletions
@ -1 +1 @@ |
||||
Subproject commit 5e0dde7b480a930d3c3a164331c930541e905d71 |
||||
Subproject commit 199bc10db3a937fab0c50d9b708f6c76234f5c3a |
@ -0,0 +1,84 @@ |
||||
def create_steering_control(packer, bus, apply_steer, lkas_enabled): |
||||
values = { |
||||
"LM_Offset": abs(apply_steer), |
||||
"LM_OffSign": 1 if apply_steer < 0 else 0, |
||||
"HCA_Status": 5 if (lkas_enabled and apply_steer != 0) else 3, |
||||
"Vib_Freq": 16, |
||||
} |
||||
|
||||
return packer.make_can_msg("HCA_1", bus, values) |
||||
|
||||
|
||||
def create_lka_hud_control(packer, bus, ldw_stock_values, enabled, steering_pressed, hud_alert, hud_control): |
||||
values = ldw_stock_values.copy() |
||||
|
||||
values.update({ |
||||
"LDW_Lampe_gelb": 1 if enabled and steering_pressed else 0, |
||||
"LDW_Lampe_gruen": 1 if enabled and not steering_pressed else 0, |
||||
"LDW_Lernmodus_links": 3 if hud_control.leftLaneDepart else 1 + hud_control.leftLaneVisible, |
||||
"LDW_Lernmodus_rechts": 3 if hud_control.rightLaneDepart else 1 + hud_control.rightLaneVisible, |
||||
"LDW_Textbits": hud_alert, |
||||
}) |
||||
|
||||
return packer.make_can_msg("LDW_Status", bus, values) |
||||
|
||||
|
||||
def create_acc_buttons_control(packer, bus, gra_stock_values, idx, cancel=False, resume=False): |
||||
values = gra_stock_values.copy() |
||||
|
||||
values.update({ |
||||
"COUNTER": idx, |
||||
"GRA_Abbrechen": cancel, |
||||
"GRA_Recall": resume, |
||||
}) |
||||
|
||||
return packer.make_can_msg("GRA_Neu", bus, values) |
||||
|
||||
|
||||
def tsk_status_value(main_switch_on, acc_faulted, long_active): |
||||
if long_active: |
||||
tsk_status = 1 |
||||
elif main_switch_on: |
||||
tsk_status = 2 |
||||
else: |
||||
tsk_status = 0 |
||||
|
||||
return tsk_status |
||||
|
||||
|
||||
def acc_hud_status_value(main_switch_on, acc_faulted, long_active): |
||||
if acc_faulted: |
||||
hud_status = 6 |
||||
elif long_active: |
||||
hud_status = 3 |
||||
elif main_switch_on: |
||||
hud_status = 2 |
||||
else: |
||||
hud_status = 0 |
||||
|
||||
return hud_status |
||||
|
||||
|
||||
def create_acc_accel_control(packer, bus, adr_status, accel): |
||||
values = { |
||||
"ACS_Sta_ADR": adr_status, |
||||
"ACS_StSt_Info": adr_status != 1, |
||||
"ACS_Typ_ACC": 0, # TODO: this is ACC "basic", find a way to detect FtS support (1) |
||||
"ACS_Sollbeschl": accel if adr_status == 1 else 3.01, |
||||
"ACS_zul_Regelabw": 0.2 if adr_status == 1 else 1.27, |
||||
"ACS_max_AendGrad": 3.0 if adr_status == 1 else 5.08, |
||||
} |
||||
|
||||
return packer.make_can_msg("ACC_System", bus, values) |
||||
|
||||
|
||||
def create_acc_hud_control(packer, bus, acc_status, set_speed, lead_visible): |
||||
values = { |
||||
"ACA_StaACC": acc_status, |
||||
"ACA_Zeitluecke": 2, |
||||
"ACA_V_Wunsch": set_speed, |
||||
"ACA_gemZeitl": 8 if lead_visible else 0, |
||||
} |
||||
# TODO: ACA_ID_StaACC, ACA_AnzDisplay, ACA_kmh_mph, ACA_PrioDisp, ACA_Aend_Zeitluecke |
||||
|
||||
return packer.make_can_msg("ACC_GRA_Anziege", bus, values) |
Loading…
Reference in new issue