version: dragonpilot v0.8.16 beta for EON/C2 date: 2022-08-19T01:11:48 dp-dev(priv2) master commit: 4aee191bc9d1c5099913455ff9e5fa1c3a7a7903pull/166/head
parent
b437663252
commit
66006fe0e9
82 changed files with 2559 additions and 288 deletions
@ -0,0 +1,21 @@ |
||||
gen |
||||
node_modules |
||||
package-lock.json |
||||
*.tmp |
||||
*.pyc |
||||
__pycache__ |
||||
.*.swp |
||||
.*.swo |
||||
*.os |
||||
*.o |
||||
*.a |
||||
|
||||
test_runner |
||||
|
||||
libmessaging.* |
||||
libmessaging_shared.* |
||||
services.h |
||||
.sconsign.dblite |
||||
libcereal_shared.* |
||||
.mypy_cache/ |
||||
catch2/ |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1 @@ |
||||
#define COMMA_VERSION "2022.08.17" |
||||
#define COMMA_VERSION "2022.08.19" |
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,38 @@ |
||||
def create_steering_control(packer, bus, apply_steer, lkas_enabled): |
||||
values = { |
||||
"SET_ME_0X3": 0x3, |
||||
"Assist_Torque": abs(apply_steer), |
||||
"Assist_Requested": lkas_enabled, |
||||
"Assist_VZ": 1 if apply_steer < 0 else 0, |
||||
"HCA_Available": 1, |
||||
"HCA_Standby": not lkas_enabled, |
||||
"HCA_Active": lkas_enabled, |
||||
"SET_ME_0XFE": 0xFE, |
||||
"SET_ME_0X07": 0x07, |
||||
} |
||||
return packer.make_can_msg("HCA_01", 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_Status_LED_gelb": 1 if enabled and steering_pressed else 0, |
||||
"LDW_Status_LED_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_Texte": hud_alert, |
||||
}) |
||||
return packer.make_can_msg("LDW_02", 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_Tip_Wiederaufnahme": resume, |
||||
}) |
||||
|
||||
return packer.make_can_msg("GRA_ACC_01", bus, values) |
@ -1,42 +0,0 @@ |
||||
# CAN controls for MQB platform Volkswagen, Audi, Skoda, and SEAT. |
||||
# PQ35/PQ46/NMS, and any future MLB, to come later. |
||||
|
||||
def create_mqb_steering_control(packer, bus, apply_steer, lkas_enabled): |
||||
values = { |
||||
"SET_ME_0X3": 0x3, |
||||
"Assist_Torque": abs(apply_steer), |
||||
"Assist_Requested": lkas_enabled, |
||||
"Assist_VZ": 1 if apply_steer < 0 else 0, |
||||
"HCA_Available": 1, |
||||
"HCA_Standby": not lkas_enabled, |
||||
"HCA_Active": lkas_enabled, |
||||
"SET_ME_0XFE": 0xFE, |
||||
"SET_ME_0X07": 0x07, |
||||
} |
||||
return packer.make_can_msg("HCA_01", bus, values) |
||||
|
||||
def create_mqb_hud_control(packer, bus, enabled, steering_pressed, hud_alert, left_lane_visible, right_lane_visible, |
||||
ldw_stock_values, left_lane_depart, right_lane_depart): |
||||
# Lane color reference: |
||||
# 0 (LKAS disabled) - off |
||||
# 1 (LKAS enabled, no lane detected) - dark gray |
||||
# 2 (LKAS enabled, lane detected) - light gray on VW, green or white on Audi depending on year or virtual cockpit. On a color MFD on a 2015 A3 TDI it is white, virtual cockpit on a 2018 A3 e-Tron its green. |
||||
# 3 (LKAS enabled, lane departure detected) - white on VW, red on Audi |
||||
values = ldw_stock_values.copy() |
||||
values.update({ |
||||
"LDW_Status_LED_gelb": 1 if enabled and steering_pressed else 0, |
||||
"LDW_Status_LED_gruen": 1 if enabled and not steering_pressed else 0, |
||||
"LDW_Lernmodus_links": 3 if left_lane_depart else 1 + left_lane_visible, |
||||
"LDW_Lernmodus_rechts": 3 if right_lane_depart else 1 + right_lane_visible, |
||||
"LDW_Texte": hud_alert, |
||||
}) |
||||
return packer.make_can_msg("LDW_02", bus, values) |
||||
|
||||
def create_mqb_acc_buttons_control(packer, bus, gra_stock_values, idx, cancel=False, resume=False): |
||||
values = gra_stock_values.copy() |
||||
|
||||
values["COUNTER"] = idx |
||||
values["GRA_Abbrechen"] = cancel |
||||
values["GRA_Tip_Wiederaufnahme"] = resume |
||||
|
||||
return packer.make_can_msg("GRA_ACC_01", bus, values) |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue