Merge remote-tracking branch 'upstream/master' into new-nav-settings-button

pull/29068/head
Shane Smiskol 2 years ago
commit 3f5071a8ba
  1. 2
      panda
  2. 1739
      poetry.lock
  3. 259
      pyproject.toml
  4. 11
      selfdrive/boardd/boardd.cc
  5. 11
      selfdrive/boardd/spi.cc
  6. 2
      selfdrive/car/volkswagen/values.py
  7. 2
      selfdrive/ui/qt/maps/map.cc

@ -1 +1 @@
Subproject commit dd78b2bf6c9d63ef59e81d0c400e85c8b477a8be Subproject commit ed8ff7e48ad41b5b7c0ce9df5bb2bb5024b6429d

1739
poetry.lock generated

File diff suppressed because it is too large Load Diff

@ -11,167 +11,168 @@ documentation = "https://docs.comma.ai"
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = "~3.11" python = "~3.11"
atomicwrites = "^1.4.0" atomicwrites = "*"
casadi = "==3.6.3" casadi = "==3.6.3"
cffi = "^1.15.1" cffi = "*"
crcmod = "^1.7" crcmod = "*"
cryptography = "^37.0.4" cryptography = "*"
Cython = "^3.0.0" Cython = "*"
flake8 = "^4.0.1" flake8 = "*"
Flask = "^2.1.2" Flask = "*"
future-fstrings = "^1.2.0" # for acados future-fstrings = "*" # for acados
gunicorn = "^20.1.0" gunicorn = "*"
hatanaka = "==2.4" hatanaka = "==2.4"
hexdump = "^3.3" hexdump = "*"
Jinja2 = "^3.1.2" Jinja2 = "*"
json-rpc = "^1.13.0" json-rpc = "*"
libusb1 = "^3.0.0" libusb1 = "*"
numpy = "==1.23.0" # locked pending deprecation fixes in xx numpy = "==1.23.0" # locked pending deprecation fixes in xx
onnx = "^1.14.0" onnx = ">=1.14.0"
onnxruntime-gpu = { version = "^1.15.1", platform = "linux", markers = "platform_machine == 'x86_64'" } onnxruntime-gpu = { version = ">=1.15.1", platform = "linux", markers = "platform_machine == 'x86_64'" }
pillow = "^9.2.0" pillow = "*"
poetry = "==1.2.2" poetry = "==1.2.2"
psutil = "^5.9.1" protobuf = "==3.20.3"
pycapnp = "^1.3.0" psutil = "*"
pycryptodome = "^3.15.0" pycapnp = "*"
PyJWT = "^2.5.0" pycryptodome = "*"
pyopencl = "^2022.2.4" PyJWT = "*"
pyserial = "^3.5" pyopencl = "*"
python-dateutil = "^2.8.2" pyserial = "*"
PyYAML = "^6.0" python-dateutil = "*"
pyzmq = "^23.2.0" PyYAML = "*"
requests = "^2.28.1" pyzmq = "*"
scons = "^4.5.2" requests = "*"
sentry-sdk = "^1.6.0" scons = "*"
setproctitle = "^1.2.3" sentry-sdk = "*"
smbus2 = "^0.4.2" setproctitle = "*"
sounddevice = "^0.4.5" smbus2 = "*"
spidev = { version = "^3.6", platform = "linux" } sounddevice = "*"
spidev2 = { version = "^0.9.0", platform = "linux" } spidev = { version = "*", platform = "linux" }
sympy = "^1.11.1" spidev2 = { version = "*", platform = "linux" }
timezonefinder = "^6.2.0" sympy = "*"
tqdm = "^4.64.0" timezonefinder = "*"
urllib3 = "^1.26.10" tqdm = "*"
utm = "^0.7.0" urllib3 = "*"
websocket_client = "^1.3.3" utm = "*"
polyline = "^1.4.0" websocket_client = "*"
polyline = "*"
sconscontrib = {git = "https://github.com/SCons/scons-contrib.git"} sconscontrib = {git = "https://github.com/SCons/scons-contrib.git"}
[tool.poetry.group.dev.dependencies] [tool.poetry.group.dev.dependencies]
av = "^10.0.0" av = "*"
azure-storage-blob = "~2.1" azure-storage-blob = "~2.1"
breathe = "^4.34.0" breathe = "*"
carla = { url = "https://github.com/commaai/carla/releases/download/3.11.4/carla-0.9.14-cp311-cp311-linux_x86_64.whl", platform = "linux", markers = "platform_machine == 'x86_64'" } carla = { url = "https://github.com/commaai/carla/releases/download/3.11.4/carla-0.9.14-cp311-cp311-linux_x86_64.whl", platform = "linux", markers = "platform_machine == 'x86_64'" }
control = "^0.9.2" control = "*"
coverage = "^6.4.1" coverage = "*"
dictdiffer = "^0.9.0" dictdiffer = "*"
fastcluster = "^1.2.6" fastcluster = "*"
ft4222 = "^1.4.1" ft4222 = "*"
hexdump = "^3.3" hexdump = "*"
hypothesis = "==6.46.7" hypothesis = "==6.46.7"
inputs = "^0.5" inputs = "*"
lru-dict = "^1.1.7" lru-dict = "*"
lxml = "^4.9.1" lxml = "*"
markdown-it-py = "^2.1.0" markdown-it-py = "*"
matplotlib = "^3.5.2" matplotlib = "*"
mpld3 = "^0.5.8" mpld3 = "*"
mypy = "^1.4.0" mypy = "*"
myst-parser = "^0.18.0" myst-parser = "*"
natsort = "^8.1.0" natsort = "*"
opencv-python-headless = { url = "https://github.com/commaai/opencv-python-builder/releases/download/4.5.5.64%2Bcu118-cp311/opencv_python_headless-4.5.5.64-cp311-cp311-manylinux_2_31_x86_64.whl", platform = "linux" } opencv-python-headless = { url = "https://github.com/commaai/opencv-python-builder/releases/download/4.5.5.64%2Bcu118-cp311/opencv_python_headless-4.5.5.64-cp311-cp311-manylinux_2_31_x86_64.whl", platform = "linux" }
pandas = "^1.4.3" pandas = "*"
parameterized = "^0.8.1" parameterized = "^0.8"
paramiko = "^2.11.0" paramiko = "*"
pprofile = "^2.1.0" pprofile = "*"
pre-commit = "^2.19.0" pre-commit = "*"
pycurl = "^7.45.1" pycurl = "*"
pygame = "^2.4.0" pygame = "*"
pylint = "^2.17.4" pylint = "*"
pyprof2calltree = "^1.4.5" pyprof2calltree = "*"
pytest = "^7.1.2" pytest = "*"
pytest-xdist = "^2.5.0" pytest-xdist = "*"
reverse_geocoder = "^1.5.1" reverse_geocoder = "*"
scipy = "==1.9.3" # pinned until xx refs changes can be checked scipy = "==1.9.3" # pinned until xx refs changes can be checked
sphinx = "^5.0.2" sphinx = "*"
sphinx-rtd-theme = "^1.0.0" sphinx-rtd-theme = "*"
sphinx-sitemap = "^2.2.0" sphinx-sitemap = "*"
tabulate = "^0.8.10" tabulate = "*"
tenacity = "^8.0.1" tenacity = "*"
types-atomicwrites = "^1.4.5" types-atomicwrites = "*"
types-certifi = "^2021.10.8" types-certifi = "*"
types-pycurl = "^7.45.1" types-pycurl = "*"
types-python-dateutil = "^2.8.19.13" types-python-dateutil = "*"
types-PyYAML = "^6.0" types-PyYAML = "*"
types-requests = "^2.28.11" types-requests = "*"
types-tabulate = "^0.8.10" types-tabulate = "*"
[tool.poetry.group.xx] [tool.poetry.group.xx]
optional = true optional = true
[tool.poetry.group.xx.dependencies] [tool.poetry.group.xx.dependencies]
aenum = "^3.1.11" aenum = "*"
aiohttp = "^3.8.1" aiohttp = "*"
albumentations = "^1.2.1" albumentations = "*"
azure-cli-core = "^2.38.0" azure-cli-core = "*"
azure-common = "^1.1.28" azure-common = "*"
azure-core = "^1.24.2" azure-core = "*"
azure-nspkg = "~3.0" azure-nspkg = "~3.0"
azure-storage-common = "~2.1" azure-storage-common = "~2.1"
azure-storage-nspkg = "~3.1" azure-storage-nspkg = "~3.1"
blosc = "==1.9.2" blosc = "==1.9.2"
cloudpickle = "^2.1.0" cloudpickle = "*"
configargparse = "^1.5.3" configargparse = "*"
cupy-cuda11x = "^11.6.0" cupy-cuda11x = "*"
datadog = "^0.44.0" datadog = "*"
dotmap = "^1.3.30" dotmap = "*"
einops = "^0.5.0" einops = "*"
elasticsearch = "^8.3.1" elasticsearch = "*"
Flask-Cors = "^3.0.10" Flask-Cors = "*"
Flask-SocketIO = "^5.2.0" Flask-SocketIO = "*"
GeoAlchemy2 = "^0.12.1" GeoAlchemy2 = "*"
imageio = "^2.19.5" imageio = "*"
influxdb-client = "^1.30.0" influxdb-client = "*"
ipykernel = "^6.15.1" ipykernel = "*"
ipython = "^8.4.0" ipython = "*"
joblib = "^1.1.0" joblib = "*"
json-logging-py = "^0.2" json-logging-py = "*"
jupyter = "^1.0.0" jupyter = "*"
jupyterlab = "^3.4.4" jupyterlab = "*"
jupyterlab-vim = "^0.15.1" jupyterlab-vim = "*"
Markdown = "^3.4.1" Markdown = "*"
msgpack-python = "^0.5.6" msgpack-python = "*"
networkx = "~2.8" networkx = "~2.8"
nvidia-ml-py3 = "^7.352.0" nvidia-ml-py3 = "*"
onnx2torch = "^1.5.4" onnx2torch = "*"
onnxoptimizer = "^0.3.1" onnxoptimizer = "*"
osmium = "^3.3.0" osmium = "*"
pillow-avif-plugin = "^1.2.2" pillow-avif-plugin = "*"
pipenv = "==2022.10.12" pipenv = "==2022.10.12"
plotly = "^5.9.0" plotly = "*"
pycuda = "^2022.1" pycuda = "*"
Pygments = "^2.12.0" Pygments = "*"
PyMySQL = "~0.9" PyMySQL = "~0.9"
pyproj = "^3.3.1" pyproj = "*"
python-logstash = "^0.4.8" python-logstash = "*"
redis = "^4.3.4" redis = "*"
s2sphere = "^0.2.5" s2sphere = "*"
scikit-image = "^0.19.3" scikit-image = "*"
scikit-learn = "^1.1.1" scikit-learn = "*"
segmentation-models-pytorch = "==0.3.3" segmentation-models-pytorch = "==0.3.3"
simplejson = "^3.17.6" simplejson = "*"
SQLAlchemy = "^1.4.39" SQLAlchemy = "*"
torch = { url = "https://download.pytorch.org/whl/cu118/torch-2.0.1%2Bcu118-cp311-cp311-linux_x86_64.whl" } torch = { url = "https://download.pytorch.org/whl/cu118/torch-2.0.1%2Bcu118-cp311-cp311-linux_x86_64.whl" }
torchsummary = "^1.5.1" torchsummary = "*"
torchvision = { url = "https://download.pytorch.org/whl/cu118/torchvision-0.15.2%2Bcu118-cp311-cp311-linux_x86_64.whl" } torchvision = { url = "https://download.pytorch.org/whl/cu118/torchvision-0.15.2%2Bcu118-cp311-cp311-linux_x86_64.whl" }
triton = "^2.0.0" triton = "*"
Werkzeug = "^2.1.2" Werkzeug = "*"
zerorpc = { git = "https://github.com/commaai/zerorpc-python.git", branch = "master" } zerorpc = { git = "https://github.com/commaai/zerorpc-python.git", branch = "master" }
omegaconf = "^2.3.0" omegaconf = "*"
osmnx = "==1.2.2" osmnx = "==1.2.2"
tritonclient = {version = "2.28.0", extras = ["http"]} tritonclient = {version = "2.28.0", extras = ["http"]}
transformers = "^4.29.2" transformers = "*"
timm = "==0.9.2" timm = "==0.9.2"
PyNvCodec = { git = "https://github.com/NVIDIA/VideoProcessingFramework.git", rev = "3347e55" } PyNvCodec = { git = "https://github.com/NVIDIA/VideoProcessingFramework.git", rev = "3347e55" }

@ -301,6 +301,10 @@ std::optional<bool> send_panda_states(PubMaster *pm, const std::vector<Panda *>
std::vector<std::array<can_health_t, PANDA_CAN_CNT>> pandaCanStates; std::vector<std::array<can_health_t, PANDA_CAN_CNT>> pandaCanStates;
pandaCanStates.reserve(pandas_cnt); pandaCanStates.reserve(pandas_cnt);
const bool red_panda_comma_three = (pandas.size() == 2) &&
(pandas[0]->hw_type == cereal::PandaState::PandaType::DOS) &&
(pandas[1]->hw_type == cereal::PandaState::PandaType::RED_PANDA);
for (const auto& panda : pandas){ for (const auto& panda : pandas){
auto health_opt = panda->get_state(); auto health_opt = panda->get_state();
if (!health_opt) { if (!health_opt) {
@ -323,6 +327,13 @@ std::optional<bool> send_panda_states(PubMaster *pm, const std::vector<Panda *>
health.ignition_line_pkt = 1; health.ignition_line_pkt = 1;
} }
// on comma three setups with a red panda, the dos can
// get false positive ignitions due to the harness box
// without a harness connector, so ignore it
if (red_panda_comma_three && (panda->hw_type == cereal::PandaState::PandaType::DOS)) {
health.ignition_line_pkt = 0;
}
ignition_local |= ((health.ignition_line_pkt != 0) || (health.ignition_can_pkt != 0)); ignition_local |= ((health.ignition_line_pkt != 0) || (health.ignition_can_pkt != 0));
pandaStates.push_back(health); pandaStates.push_back(health);

@ -236,9 +236,12 @@ int PandaSpiHandle::spi_transfer_retry(uint8_t endpoint, uint8_t *tx_data, uint1
std::this_thread::yield(); std::this_thread::yield();
if (ret == SpiError::NACK) { if (ret == SpiError::NACK) {
// prevent busy wait while the panda is NACK'ing // prevent busy waiting while the panda is NACK'ing
// due to full TX buffers
nack_count += 1; nack_count += 1;
usleep(std::clamp(nack_count*10, 200, 2000)); if (nack_count > 3) {
usleep(std::clamp(nack_count*10, 200, 2000));
}
} }
} }
} while (ret < 0 && connected && !timed_out); } while (ret < 0 && connected && !timed_out);
@ -260,7 +263,6 @@ int PandaSpiHandle::wait_for_ack(uint8_t ack, uint8_t tx, unsigned int timeout,
spi_ioc_transfer transfer = { spi_ioc_transfer transfer = {
.tx_buf = (uint64_t)tx_buf, .tx_buf = (uint64_t)tx_buf,
.rx_buf = (uint64_t)rx_buf, .rx_buf = (uint64_t)rx_buf,
.delay_usecs = 10,
.len = length .len = length
}; };
tx_buf[0] = tx; tx_buf[0] = tx;
@ -284,9 +286,6 @@ int PandaSpiHandle::wait_for_ack(uint8_t ack, uint8_t tx, unsigned int timeout,
LOGD("SPI: timed out waiting for ACK"); LOGD("SPI: timed out waiting for ACK");
return SpiError::ACK_TIMEOUT; return SpiError::ACK_TIMEOUT;
} }
// backoff
transfer.delay_usecs = std::clamp(transfer.delay_usecs*2, 10, 250);
} }
return 0; return 0;

@ -361,11 +361,13 @@ FW_VERSIONS = {
b'\xf1\x8703H906026S \xf1\x896693', b'\xf1\x8703H906026S \xf1\x896693',
b'\xf1\x8703H906026S \xf1\x899970', b'\xf1\x8703H906026S \xf1\x899970',
b'\xf1\x873CN906259 \xf1\x890005', b'\xf1\x873CN906259 \xf1\x890005',
b'\xf1\x873CN906259F \xf1\x890002',
], ],
(Ecu.transmission, 0x7e1, None): [ (Ecu.transmission, 0x7e1, None): [
b'\xf1\x8709G927158A \xf1\x893387', b'\xf1\x8709G927158A \xf1\x893387',
b'\xf1\x8709G927158DR\xf1\x893536', b'\xf1\x8709G927158DR\xf1\x893536',
b'\xf1\x8709G927158DR\xf1\x893742', b'\xf1\x8709G927158DR\xf1\x893742',
b'\xf1\x8709G927158EN\xf1\x893691',
b'\xf1\x8709G927158F \xf1\x893489', b'\xf1\x8709G927158F \xf1\x893489',
b'\xf1\x8709G927158FT\xf1\x893835', b'\xf1\x8709G927158FT\xf1\x893835',
b'\xf1\x8709G927158GL\xf1\x893939', b'\xf1\x8709G927158GL\xf1\x893939',

@ -164,10 +164,10 @@ void MapWindow::updateState(const UIState &s) {
// Only open the map on setting destination the first time // Only open the map on setting destination the first time
if (allow_open) { if (allow_open) {
emit requestSettings(false);
emit requestVisible(true); // Show map on destination set/change emit requestVisible(true); // Show map on destination set/change
allow_open = false; allow_open = false;
} }
emit requestSettings(false);
} }
loaded_once = loaded_once || (m_map && m_map->isFullyLoaded()); loaded_once = loaded_once || (m_map && m_map->isFullyLoaded());

Loading…
Cancel
Save