mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-13 06:14:47 +08:00
Merge branch 'devel-en' into devel-zhs
# Conflicts: # apk/ai.comma.plus.offroad.apk
This commit is contained in:
@@ -79,6 +79,7 @@ Supported Cars
|
||||
| Honda | CR-V 2015-16 | Touring | Yes | Yes | 25mph<sup>1</sup>| 12mph | Nidec |
|
||||
| Honda | CR-V 2017-19 | Honda Sensing | Yes | Stock | 0mph | 12mph | Bosch |
|
||||
| Honda | CR-V Hybrid 2017-2019 | Honda Sensing | Yes | Stock | 0mph | 12mph | Bosch |
|
||||
| Honda | Fit 2018 | Honda Sensing | Yes | Yes | 25mph<sup>1</sup>| 12mph | Inverted Nidec |
|
||||
| Honda | Odyssey 2018-19 | Honda Sensing | Yes | Yes | 25mph<sup>1</sup>| 0mph | Inverted Nidec |
|
||||
| Honda | Passport 2019 | All | Yes | Yes | 25mph<sup>1</sup>| 12mph | Inverted Nidec |
|
||||
| Honda | Pilot 2016-18 | Honda Sensing | Yes | Yes | 25mph<sup>1</sup>| 12mph | Nidec |
|
||||
@@ -142,7 +143,6 @@ Community Maintained Cars are not confirmed by comma.ai to meet our [safety mode
|
||||
In Progress Cars
|
||||
------
|
||||
- All TSS-P Toyota with Steering Assist and LSS-P Lexus with Steering Assist or Lane Keep Assist.
|
||||
- Only remaining Toyota cars with no port yet are the Avalon and the Sienna.
|
||||
- All Hyundai with SmartSense.
|
||||
- All Kia with SCC and LKAS.
|
||||
- All Chrysler, Jeep, Fiat with Adaptive Cruise Control and LaneSense.
|
||||
|
||||
Binary file not shown.
@@ -117,6 +117,7 @@ keys = {
|
||||
"DragonRunMixplorer": [TxType.PERSISTENT],
|
||||
"DragonSteeringMonitorTimer": [TxType.PERSISTENT],
|
||||
"DragonCameraOffset": [TxType.PERSISTENT],
|
||||
"DragonUIVolumeBoost": [TxType.PERSISTENT],
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -133,6 +133,10 @@ def get_can_signals(CP):
|
||||
("MAIN_ON", "SCM_BUTTONS", 0)]
|
||||
elif CP.carFingerprint in (CAR.CRV, CAR.ACURA_RDX, CAR.PILOT_2019, CAR.RIDGELINE):
|
||||
signals += [("MAIN_ON", "SCM_BUTTONS", 0)]
|
||||
elif CP.carFingerprint == CAR.FIT:
|
||||
signals += [("CAR_GAS", "GAS_PEDAL_2", 0),
|
||||
("MAIN_ON", "SCM_BUTTONS", 0),
|
||||
("BRAKE_HOLD_ACTIVE", "VSA_STATUS", 0)]
|
||||
elif CP.carFingerprint == CAR.ODYSSEY:
|
||||
signals += [("MAIN_ON", "SCM_FEEDBACK", 0),
|
||||
("EPB_STATE", "EPB_STATUS", 0)]
|
||||
|
||||
@@ -257,6 +257,19 @@ class CarInterface(object):
|
||||
ret.longitudinalTuning.kiBP = [0., 35.]
|
||||
ret.longitudinalTuning.kiV = [0.18, 0.12]
|
||||
|
||||
elif candidate == CAR.FIT:
|
||||
stop_and_go = False
|
||||
ret.mass = 2644. * CV.LB_TO_KG + STD_CARGO_KG
|
||||
ret.wheelbase = 2.53
|
||||
ret.centerToFront = ret.wheelbase * 0.39
|
||||
ret.steerRatio = 13.06
|
||||
tire_stiffness_factor = 0.75 # not optimized yet
|
||||
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.25], [0.06]]
|
||||
ret.longitudinalTuning.kpBP = [0., 5., 35.]
|
||||
ret.longitudinalTuning.kpV = [1.2, 0.8, 0.5]
|
||||
ret.longitudinalTuning.kiBP = [0., 35.]
|
||||
ret.longitudinalTuning.kiV = [0.18, 0.12]
|
||||
|
||||
elif candidate == CAR.ACURA_RDX:
|
||||
stop_and_go = False
|
||||
ret.mass = 3935. * CV.LB_TO_KG + STD_CARGO_KG
|
||||
|
||||
@@ -40,6 +40,7 @@ class CAR:
|
||||
CRV = "HONDA CR-V 2016 TOURING"
|
||||
CRV_5G = "HONDA CR-V 2017 EX"
|
||||
CRV_HYBRID = "HONDA CR-V 2019 HYBRID"
|
||||
FIT = "HONDA FIT 2018 EX"
|
||||
ODYSSEY = "HONDA ODYSSEY 2018 EX-L"
|
||||
ODYSSEY_CHN = "HONDA ODYSSEY 2019 EXCLUSIVE CHN"
|
||||
ACURA_RDX = "ACURA RDX 2018 ACURAWATCH PLUS"
|
||||
@@ -83,6 +84,9 @@ FINGERPRINTS = {
|
||||
CAR.CRV_HYBRID: [{
|
||||
57: 3, 148: 8, 228: 5, 304: 8, 330: 8, 344: 8, 380: 8, 387: 8, 388: 8, 399: 7, 408: 6, 415: 6, 419: 8, 420: 8, 427: 3, 428: 8, 432: 7, 441: 5, 450: 8, 464: 8, 477: 8, 479: 8, 490: 8, 495: 8, 525: 8, 531: 8, 545: 6, 662: 4, 773: 7, 777: 8, 780: 8, 804: 8, 806: 8, 808: 8, 814: 4, 829: 5, 833: 6, 862: 8, 884: 8, 891: 8, 927: 8, 929: 8, 930: 8, 931: 8, 1302: 8, 1361: 5, 1365: 5, 1600: 5, 1601: 8, 1626: 5, 1627: 5
|
||||
}],
|
||||
CAR.FIT: [{
|
||||
57: 3, 145: 8, 228: 5, 304: 8, 342: 6, 344: 8, 380: 8, 399: 7, 401: 8, 420: 8, 422: 8, 427: 3, 428: 8, 432: 7, 464: 8, 487: 4, 490: 8, 506: 8, 597: 8, 660: 8, 661: 4, 773: 7, 777: 8, 780: 8, 800: 8, 804: 8, 808: 8, 829: 5, 862: 8, 884: 7, 892: 8, 929: 8, 985: 3, 1024: 5, 1027: 5, 1029: 8, 1036: 8, 1039: 8, 1108: 8, 1322: 5, 1361: 5, 1365: 5, 1424: 5, 1600: 5, 1601: 8
|
||||
}],
|
||||
# 2018 Odyssey w/ Added Comma Pedal Support (512L & 513L)
|
||||
CAR.ODYSSEY: [{
|
||||
57: 3, 148: 8, 228: 5, 229: 4, 316: 8, 342: 6, 344: 8, 380: 8, 399: 7, 411: 5, 419: 8, 420: 8, 427: 3, 432: 7, 450: 8, 463: 8, 464: 8, 476: 4, 490: 8, 506: 8, 512: 6, 513: 6, 542: 7, 545: 6, 597: 8, 662: 4, 773: 7, 777: 8, 780: 8, 795: 8, 800: 8, 804: 8, 806: 8, 808: 8, 817: 4, 819: 7, 821: 5, 825: 4, 829: 5, 837: 5, 856: 7, 862: 8, 871: 8, 881: 8, 882: 4, 884: 8, 891: 8, 892: 8, 905: 8, 923: 2, 927: 8, 929: 8, 963: 8, 965: 8, 966: 8, 967: 8, 983: 8, 985: 3, 1029: 8, 1036: 8, 1052: 8, 1064: 7, 1088: 8, 1089: 8, 1092: 1, 1108: 8, 1110: 8, 1125: 8, 1296: 8, 1302: 8, 1600: 5, 1601: 8, 1612: 5, 1613: 5, 1614: 5, 1615: 8, 1616: 5, 1619: 5, 1623: 5, 1668: 5
|
||||
@@ -137,6 +141,7 @@ DBC = {
|
||||
CAR.CRV: dbc_dict('honda_crv_touring_2016_can_generated', 'acura_ilx_2016_nidec'),
|
||||
CAR.CRV_5G: dbc_dict('honda_crv_ex_2017_can_generated', None),
|
||||
CAR.CRV_HYBRID: dbc_dict('honda_crv_hybrid_2019_can_generated', None),
|
||||
CAR.FIT: dbc_dict('honda_fit_ex_2018_can_generated', 'acura_ilx_2016_nidec'),
|
||||
CAR.ODYSSEY: dbc_dict('honda_odyssey_exl_2018_generated', 'acura_ilx_2016_nidec'),
|
||||
CAR.ODYSSEY_CHN: dbc_dict('honda_odyssey_extreme_edition_2018_china_can', 'acura_ilx_2016_nidec'),
|
||||
CAR.PILOT: dbc_dict('honda_pilot_touring_2017_can_generated', 'acura_ilx_2016_nidec'),
|
||||
@@ -155,6 +160,7 @@ STEER_THRESHOLD = {
|
||||
CAR.CRV: 1200,
|
||||
CAR.CRV_5G: 1200,
|
||||
CAR.CRV_HYBRID: 1200,
|
||||
CAR.FIT: 1200,
|
||||
CAR.ODYSSEY: 1200,
|
||||
CAR.ODYSSEY_CHN: 1200,
|
||||
CAR.PILOT: 1200,
|
||||
@@ -173,6 +179,7 @@ SPEED_FACTOR = {
|
||||
CAR.CRV: 1.025,
|
||||
CAR.CRV_5G: 1.025,
|
||||
CAR.CRV_HYBRID: 1.025,
|
||||
CAR.FIT: 1.,
|
||||
CAR.ODYSSEY: 1.,
|
||||
CAR.ODYSSEY_CHN: 1.,
|
||||
CAR.PILOT: 1.,
|
||||
|
||||
@@ -37,6 +37,7 @@ default_conf = {
|
||||
'DragonRunMixplorer': '0',
|
||||
'DragonSteeringMonitorTimer': '3',
|
||||
'DragonCameraOffset': '6',
|
||||
'DragonUIVolumeBoost': '0',
|
||||
}
|
||||
|
||||
deprecated_conf = {
|
||||
|
||||
@@ -300,6 +300,7 @@ typedef struct UIState {
|
||||
int dragon_ui_dev_timeout;
|
||||
int dragon_ui_dev_mini_timeout;
|
||||
int dragon_enable_dashcam_timeout;
|
||||
int dragon_ui_volume_boost_timeout;
|
||||
|
||||
bool dragon_ui_event;
|
||||
bool dragon_ui_maxspeed;
|
||||
@@ -307,6 +308,7 @@ typedef struct UIState {
|
||||
bool dragon_ui_dev;
|
||||
bool dragon_ui_dev_mini;
|
||||
bool dragon_enable_dashcam;
|
||||
float dragon_ui_volume_boost;
|
||||
|
||||
} UIState;
|
||||
|
||||
@@ -346,6 +348,10 @@ static void set_awake(UIState *s, bool awake) {
|
||||
|
||||
static void set_volume(UIState *s, int volume) {
|
||||
char volume_change_cmd[64];
|
||||
if (s->dragon_ui_volume_boost > 0 || s->dragon_ui_volume_boost < 0) {
|
||||
volume = volume * (1 + s->dragon_ui_volume_boost /100);
|
||||
volume = volume > MAX_VOLUME? MAX_VOLUME : volume;
|
||||
}
|
||||
sprintf(volume_change_cmd, "service call audio 3 i32 3 i32 %d i32 1", volume);
|
||||
|
||||
// 5 second timeout at 60fps
|
||||
@@ -680,6 +686,7 @@ static void ui_init_vision(UIState *s, const VisionStreamBufs back_bufs,
|
||||
read_param_bool(&s->dragon_ui_dev, "DragonUIDev");
|
||||
read_param_bool(&s->dragon_ui_dev_mini, "DragonUIDevMini");
|
||||
read_param_bool(&s->dragon_enable_dashcam, "DragonEnableDashcam");
|
||||
read_param_float(&s->dragon_ui_volume_boost, "DragonUIVolumeBoost");
|
||||
|
||||
|
||||
// Set offsets so params don't get read at the same time
|
||||
@@ -687,13 +694,14 @@ static void ui_init_vision(UIState *s, const VisionStreamBufs back_bufs,
|
||||
s->is_metric_timeout = UI_FREQ / 2;
|
||||
s->limit_set_speed_timeout = UI_FREQ;
|
||||
|
||||
// dragonpilot, 1 sec
|
||||
// dragonpilot, 1hz
|
||||
s->dragon_ui_event_timeout = 100;
|
||||
s->dragon_ui_maxspeed_timeout = 100;
|
||||
s->dragon_ui_face_timeout = 100;
|
||||
s->dragon_ui_dev_timeout = 100;
|
||||
s->dragon_ui_dev_mini_timeout = 100;
|
||||
s->dragon_enable_dashcam_timeout = 100;
|
||||
s->dragon_ui_volume_boost_timeout = 100;
|
||||
}
|
||||
|
||||
static void ui_draw_transformed_box(UIState *s, uint32_t color) {
|
||||
@@ -2643,6 +2651,10 @@ int main(int argc, char* argv[]) {
|
||||
s->volume_timeout--;
|
||||
} else {
|
||||
int volume = min(MAX_VOLUME, MIN_VOLUME + s->scene.v_ego / 5); // up one notch every 5 m/s
|
||||
if (s->dragon_ui_volume_boost > 0 || s->dragon_ui_volume_boost < 0) {
|
||||
volume = volume * (1 + s->dragon_ui_volume_boost /100);
|
||||
volume = volume > MAX_VOLUME? MAX_VOLUME : volume;
|
||||
}
|
||||
set_volume(s, volume);
|
||||
}
|
||||
|
||||
@@ -2671,6 +2683,7 @@ int main(int argc, char* argv[]) {
|
||||
read_param_bool_timeout(&s->dragon_ui_dev, "DragonUIDev", &s->dragon_ui_dev_timeout);
|
||||
read_param_bool_timeout(&s->dragon_ui_dev_mini, "DragonUIDevMini", &s->dragon_ui_dev_mini_timeout);
|
||||
read_param_bool_timeout(&s->dragon_enable_dashcam, "DragonEnableDashcam", &s->dragon_enable_dashcam_timeout);
|
||||
read_param_float_timeout(&s->dragon_ui_volume_boost, "DragonUIVolumeBoost", &s->dragon_ui_volume_boost_timeout);
|
||||
|
||||
pthread_mutex_unlock(&s->lock);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user