mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-15 10:47:04 +08:00
Merge branch 'devel' of https://github.com/commaai/openpilot into devel
This commit is contained in:
20
README.md
20
README.md
@@ -92,9 +92,11 @@ Supported Cars
|
||||
| Kia | Sorento 2018 | All | Yes | Stock | 0mph | 0mph | Custom<sup>6</sup>|
|
||||
| Kia | Stinger 2018 | SCC + LKAS | Yes | Stock | 0mph | 0mph | Custom<sup>6</sup>|
|
||||
| Lexus | RX Hybrid 2016-19 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
|
||||
| Subaru | Crosstrek 2018 | EyeSight | Yes | Stock | 0mph | 0mph | Custom<sup>4</sup>|
|
||||
| Subaru | Impreza 2019 | EyeSight | Yes | Stock | 0mph | 0mph | Custom<sup>4</sup>|
|
||||
| Toyota | Avalon 2016 | TSS-P | Yes | Yes<sup>2</sup>| 20mph<sup>1</sup>| 0mph | Toyota |
|
||||
| Toyota | Camry 2018<sup>4</sup> | All | Yes | Stock | 0mph<sup>5</sup> | 0mph | Toyota |
|
||||
| Toyota | C-HR 2017-18<sup>4</sup> | All | Yes | Stock | 0mph | 0mph | Toyota |
|
||||
| Toyota | Camry 2018 | All | Yes | Stock | 0mph<sup>5</sup> | 0mph | Toyota |
|
||||
| Toyota | C-HR 2017-18 | All | Yes | Stock | 0mph | 0mph | Toyota |
|
||||
| Toyota | Corolla 2017-18 | All | Yes | Yes<sup>2</sup>| 20mph<sup>1</sup>| 0mph | Toyota |
|
||||
| Toyota | Corolla Hatchback 2019 | All | Yes | Yes | 0mph | 0mph | Toyota |
|
||||
| Toyota | Highlander 2017-18 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
|
||||
@@ -107,13 +109,13 @@ Supported Cars
|
||||
| Toyota | Rav4 2019 | All | Yes | Yes | 0mph | 0mph | Toyota |
|
||||
| Toyota | Rav4 Hybrid 2017-18 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
|
||||
|
||||
<sup>1</sup>[Comma Pedal](https://community.comma.ai/wiki/index.php/Comma_Pedal) is used to provide stop-and-go capability to some of the openpilot-supported cars that don't currently support stop-and-go. Here is how to [build a Comma Pedal](https://medium.com/@jfrux/comma-pedal-building-with-macrofab-6328bea791e8). ***NOTE: The Comma Pedal is not officially supported by [comma.ai](https://comma.ai)***
|
||||
<sup>2</sup>When disconnecting the Driver Support Unit (DSU), otherwise longitudinal control is stock ACC. For DSU locations, see [Toyota Wiki page](https://community.comma.ai/wiki/index.php/Toyota)
|
||||
<sup>3</sup>[GM installation guide](https://zoneos.com/volt/).
|
||||
<sup>4</sup>It needs an extra 120Ohm resistor ([pic1](https://i.imgur.com/CmdKtTP.jpg), [pic2](https://i.imgur.com/s2etUo6.jpg)) on bus 3 and giraffe switches set to 01X1 (11X1 for stock LKAS), where X depends on if you have the [comma power](https://comma.ai/shop/products/power/).
|
||||
<sup>5</sup>28mph for Camry 4CYL L, 4CYL LE and 4CYL SE which don't have Full-Speed Range Dynamic Radar Cruise Control.
|
||||
<sup>6</sup>Open sourced [Hyundai Giraffe](https://github.com/commaai/neo/tree/master/giraffe/hyundai) is designed for the 2019 Sante Fe; pinout may differ for other Hyundais.
|
||||
<sup>7</sup>Community built Giraffe, find more information [here](https://zoneos.com/shop/).
|
||||
<sup>1</sup>[Comma Pedal](https://community.comma.ai/wiki/index.php/Comma_Pedal) is used to provide stop-and-go capability to some of the openpilot-supported cars that don't currently support stop-and-go. Here is how to [build a Comma Pedal](https://medium.com/@jfrux/comma-pedal-building-with-macrofab-6328bea791e8). ***NOTE: The Comma Pedal is not officially supported by [comma.ai](https://comma.ai).*** <br />
|
||||
<sup>2</sup>When disconnecting the Driver Support Unit (DSU), otherwise longitudinal control is stock ACC. For DSU locations, see [Toyota Wiki page](https://community.comma.ai/wiki/index.php/Toyota). <br />
|
||||
<sup>3</sup>[GM installation guide](https://zoneos.com/volt/). <br />
|
||||
<sup>4</sup>Subaru Giraffe is DIY. <br />
|
||||
<sup>5</sup>28mph for Camry 4CYL L, 4CYL LE and 4CYL SE which don't have Full-Speed Range Dynamic Radar Cruise Control. <br />
|
||||
<sup>6</sup>Open sourced [Hyundai Giraffe](https://github.com/commaai/neo/tree/master/giraffe/hyundai) is designed for the 2019 Sante Fe; pinout may differ for other Hyundais. <br />
|
||||
<sup>7</sup>Community built Giraffe, find more information [here](https://zoneos.com/shop/). <br />
|
||||
|
||||
Community Maintained Cars
|
||||
------
|
||||
|
||||
@@ -1 +1 @@
|
||||
v1.3.1
|
||||
v1.3.2
|
||||
@@ -53,16 +53,12 @@ static void toyota_rx_hook(CAN_FIFOMailBox_TypeDef *to_push) {
|
||||
if ((to_push->RIR>>21) == 0x1D2) {
|
||||
// 5th bit is CRUISE_ACTIVE
|
||||
int cruise_engaged = to_push->RDLR & 0x20;
|
||||
// 4th bit is GAS_RELEASED
|
||||
int gas = !(to_push->RDLR & 0x10);
|
||||
if (!cruise_engaged ||
|
||||
(gas && !toyota_gas_prev && !gas_interceptor_detected && long_controls_allowed)) {
|
||||
if (!cruise_engaged) {
|
||||
controls_allowed = 0;
|
||||
} else if (cruise_engaged && !toyota_cruise_engaged_last) {
|
||||
controls_allowed = 1;
|
||||
}
|
||||
toyota_cruise_engaged_last = cruise_engaged;
|
||||
toyota_gas_prev = gas;
|
||||
}
|
||||
|
||||
// exit controls on rising edge of gas press if interceptor (0x201)
|
||||
@@ -77,6 +73,15 @@ static void toyota_rx_hook(CAN_FIFOMailBox_TypeDef *to_push) {
|
||||
gas_interceptor_prev = gas_interceptor;
|
||||
}
|
||||
|
||||
// exit controls on rising edge of gas press
|
||||
if ((to_push->RIR>>21) == 0x2C1) {
|
||||
int gas = (to_push->RDHR >> 16) & 0xFF;
|
||||
if ((gas > 0) && (toyota_gas_prev == 0) && !gas_interceptor_detected && long_controls_allowed) {
|
||||
controls_allowed = 0;
|
||||
}
|
||||
toyota_gas_prev = gas;
|
||||
}
|
||||
|
||||
int bus = (to_push->RDTR >> 4) & 0xF;
|
||||
// msgs are only on bus 2 if panda is connected to frc
|
||||
if (bus == 2) {
|
||||
|
||||
@@ -80,7 +80,7 @@ boardd_api_impl.so: libcan_list_to_can_capnp.a boardd_api_impl.pyx boardd_setup.
|
||||
rm -f boardd_api_impl.cpp
|
||||
|
||||
libcan_list_to_can_capnp.a: can_list_to_can_capnp.o $(CEREAL_OBJS)
|
||||
ar rcs '$@' $^
|
||||
ar rcsD '$@' $^
|
||||
|
||||
%.o: %.c
|
||||
@echo "[ CC ] $@"
|
||||
|
||||
@@ -21,12 +21,12 @@ void can_list_to_can_capnp_cpp(const std::vector<can_frame> &can_list, std::stri
|
||||
event.setLogMonoTime(nanos_since_boot());
|
||||
|
||||
auto canData = sendCan ? event.initSendcan(can_list.size()) : event.initCan(can_list.size());
|
||||
int i = 0;
|
||||
for (auto it = can_list.begin(); it != can_list.end(); it++, i++) {
|
||||
canData[i].setAddress(it->address);
|
||||
canData[i].setBusTime(it->busTime);
|
||||
canData[i].setDat(kj::arrayPtr((uint8_t*)it->dat.data(), it->dat.size()));
|
||||
canData[i].setSrc(it->src);
|
||||
int j = 0;
|
||||
for (auto it = can_list.begin(); it != can_list.end(); it++, j++) {
|
||||
canData[j].setAddress(it->address);
|
||||
canData[j].setBusTime(it->busTime);
|
||||
canData[j].setDat(kj::arrayPtr((uint8_t*)it->dat.data(), it->dat.size()));
|
||||
canData[j].setSrc(it->src);
|
||||
}
|
||||
auto words = capnp::messageToFlatArray(msg);
|
||||
auto bytes = words.asBytes();
|
||||
|
||||
@@ -309,9 +309,9 @@ class CarInterface(object):
|
||||
|
||||
elif candidate in (CAR.PILOT, CAR.PILOT_2019):
|
||||
stop_and_go = False
|
||||
ret.mass = 4303 * CV.LB_TO_KG + std_cargo
|
||||
ret.wheelbase = 2.81
|
||||
ret.centerToFront = ret.wheelbase * 0.41
|
||||
ret.mass = 4204 * CV.LB_TO_KG + std_cargo # average weight
|
||||
ret.wheelbase = 2.82
|
||||
ret.centerToFront = ret.wheelbase * 0.428 # average weight distribution
|
||||
ret.steerRatio = 16.0 # as spec
|
||||
tire_stiffness_factor = 0.444 # not optimized yet
|
||||
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.38], [0.11]]
|
||||
|
||||
@@ -86,7 +86,9 @@ def is_on_hotspot():
|
||||
|
||||
is_android = result.startswith('192.168.43.')
|
||||
is_ios = result.startswith('172.20.10.')
|
||||
return (is_android or is_ios)
|
||||
is_entune = result.startswith('10.0.2.')
|
||||
|
||||
return (is_android or is_ios or is_entune)
|
||||
except:
|
||||
return False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user