Commit Graph

30 Commits (master)

Author SHA1 Message Date
Dean Lee a653461dec
check in tuple instead of list (#23477)
* check in tuple instead of list

* Update selfdrive/car/toyota/carcontroller.py

Co-authored-by: Willem Melching <willem.melching@gmail.com>

* Update selfdrive/car/mazda/interface.py

Co-authored-by: Willem Melching <willem.melching@gmail.com>

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2022-01-10 16:36:51 +01:00
martinl 6b205347e5
Subaru FPv2 support (#1878)
* Add Subaru FPv2 support

* Add Subaru Ascent and Impreza FPv2 values

* Remove 10 second delay, use UDS for Subaru FPv2

* before VW

* before hyundai

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2022-01-04 11:06:29 +01:00
Ewout ter Hoeven 332f568a82
Pyupgrade 3.6: Update syntax with Python 3.6+ features (#23305)
Updated Python code with Python 3.6+ features:
- utf-8 encoding is now the default (PEP 3120)
- Replace list comprehensions by Generator Expressions (PEP 289)
- Replace yield loop by yield from (PEP 380)
- Remove the (object) subclass when defining a class
- Replace the IOError alias by OSError (PEP 3151)
- Define sets with curly braces {} instead of set()
- Remove "r" parameter from open function, which is default

Co-Authored-By: Adeeb Shihadeh <8762862+adeebshihadeh@users.noreply.github.com>
Co-Authored-By: GregorKikelj <96022003+GregorKikelj@users.noreply.github.com>

Co-authored-by: Adeeb Shihadeh <8762862+adeebshihadeh@users.noreply.github.com>
Co-authored-by: GregorKikelj <96022003+GregorKikelj@users.noreply.github.com>
2021-12-24 11:18:39 -08:00
Ewout ter Hoeven 55390d273f
Convert format strings strings to f-strings (#23241)
* Convert all text strings to f-strings

Reformats all the text from the old "%-formatted" and .format(...) format to the newer f-string format, as defined in PEP 498. This requires Python 3.6+.

Flynt 0.69 was used to reformat the strings. 120 f-strings were created in 51 files.

F-strings are in general more readable, concise and performant. See also: https://www.python.org/dev/peps/pep-0498/#rationale

* revert pyextra changes

* revert ublox.py

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-12-16 14:58:17 +01:00
Willem Melching 0ec68a5a09
0.8.11-release FW batch (#23167)
* 0.8.11-release FW batch

* those toyota also dont always return esp

* attempt to clean up 2018 & 2021 accord
2021-12-08 14:44:00 +01:00
robin-reckmann e2288371f2
Fingerprinting v2 support for Nissan vehicles (#22655)
* Add Nissan FPv2

* Update Nissan version response

* Add second Nissan FPv2 query

* Add multiple offsets for Nissan

* Nissan offset fix

* Add Nissan diagnostic request

* Use 21 83 for Nissan version request

* Add partial 2018 Leaf FPv2

* Update 2018 Leaf FPv2

* Nissan FPv2: more RX offsets, add no diagostic request scan for 0x20

* Add FPv2 imports to Nissan values

* Change LEAF to LEAF_IC

It is an instrument cluster leaf. With this minor change it works :).

* fixed ecu addr for nissan eps

* Remove FW not used for fpv2

* Remove unused offsets

* add fw versions for 2018 Nissan Leaf JP

* add standard ecu fw query

* add esp fw

* add nissan xtrail

* Add missing ESP FW for 2018 Nissan Leaf IC

* Add fwdCamera FW for Xtrail 2017

* add missing comma

* Add 0x8 default offset

needed e.g. for xtrail engine ecu

* Apply suggestions from code review

Co-authored-by: Willem Melching <willem.melching@gmail.com>

* Fix variable naming

* remove unnecessary part of standard fw query

* add fw versions for CAN-GW ECU

* transmission eco does not reliable answer -> remove

* add Altima FWs (part 1)

* add Altima EPS FW

* Remove NISSAN_KWP_DIAGNOSTIC_REQUEST and cleanup

* Revert "Remove NISSAN_KWP_DIAGNOSTIC_REQUEST and cleanup"

This reverts commit 808d6f1562.

* cleanup

Co-authored-by: Martin Lillepuu <martin@mlp.ee>
Co-authored-by: Julian Pieles <julian@pieles.digital>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-11-08 10:51:59 +01:00
Willem Melching 2d7d8fba99
Improve Hyundai FW query stability (#22344)
* extend timeout on valid response

* extend total timeout in fw query

* redundant query

* cleanup

* add 2 new sonata fw

* add cloudlog

* total timeout always 10x

* update ref

* time.monotonic()

* more logging
2021-09-24 17:32:09 -07:00
arfy slowy d74def61f8
fix: spelling typos (#21861)
* fix: typo spelling grammar

* revert

* Update selfdrive/locationd/calibrationd.py

* more revert

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-08-05 12:05:49 -07:00
ShaneSmiskol 07e4129edc
Split Avalon 2016-18 and Avalon 2019+ (#21058)
* start to separate Avalon 2019+

* reverts #20824 (2020)...

and removes fw from a 2020 avalon

* revert 2020 fw from #20241

* revert 2021 fw from #19790

* bump opendbc, add smartDsu

* Add only removed fw from listed PRs above and from jryan's 2020

* bump opendbc to master

* comment out any non-original avalon fw

* new fw

* these 2016 (5 byte EPS_STATUS msg) Avalon fws are correct. comment out any 2019+ fw I haven't seen yet

* Add to release files

* these are good too

* nothing on 7e0 yet

* both have their engines on one address

* validated remaining fws! some from adeeb's, chris's, and kumar's PRs

* Add test route for Avalon 2019

* horrible

* Duplicate

* use nodsu dbc. Only difference is the addition of some signals that don't work, and max of BRAKE_PRESSURE is different

* Enablem 2019 Avalon test route
2021-06-01 12:41:24 -07:00
Jafar Al-Gharaibeh 824f93303d
Mazda FP 2.0 support (#20879)
* Mazda FP 2.0 support

ECU FW for CX-5 2017 and Mazda3 2017

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Use standard UDS request/reponse, fix missing arg.

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Add CX-5 FW test

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* update/add FW FP

Current suported models:
  CX-5 2017/2021
  CX-9 2019/2020
  Mazda3 2017/2018

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Add Cx-9 2019 FW FP

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Remove comments, remove TESTER_PRESENT_REQUEST from Mazda

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* add transmission ecu to startup test

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
2021-05-28 15:50:58 +02:00
Erich Moraga cb4ab31362
Add missing Camry FW (#20953)
* Add missing several missing Camry firmwares

@oxigen#0649 2019 Toyota Camry ICE  DongleID/route 04b2f59611cf9e7f|2021-05-18--11-11-17

* Update fw_versions.py
2021-05-18 15:46:04 -07:00
Gabor 7d9aa1352f
Civic 2019 EU new ECU values added (#20774)
* Update values.py

* non essential

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-04-30 17:06:12 -07:00
Willem Melching e4f73fbda5
Fuzzy match on ECU FW versions (#20687)
* Fuzzy match on 3+ ECUs

* reuse dict

* exclude some shared ecus to be sure

* show alert for fuzzy match

* use title case

* require community toggle

* refactor

* do both exact and fuzzy in test script

* update test script

* add fuzz test and lower matches to >= 2

* strip alert length

* sort mismatches

* add fw tests to test_startup

* bump cereal
2021-04-20 12:00:36 +02:00
Jason Young e7fc11c7fb
VW MQB: UDS fingerprinting support (#20271)
* FPv2 support for MQB

* Comment touch-ups

* Trim extra newlines

* Add Atlas and Tiguan

* Update submodule ref

* Revert "Add Atlas and Tiguan"

This reverts commit a47bc1bca7.

* Curb my enthusiasm

* Drop ABS/ESP from UDS fingerprinting for now

* Use multi-query to grab SW build ID and parameterization

* Resolve merge oops

* Resolve merge conflicts

* Make Ecu.fwdCamera optional for VW

* Where'd that come from?

* Propitiate process replay checks until ready for model dump

* FW values for Audi A3 Prestige

* Revert "Make Ecu.fwdCamera optional for VW"

This reverts commit 56852b99

* Don't try to FP fwdCamera for VW

* Remove FW comments

* Simplify RX offset handling

* Corrected scoping for MQB trans detection

* Add default response_offset

* Remove explicit list of MQB vehicles for now

* Deal with pylint warning

* Clarify and simplify comments

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-03-25 16:06:59 -07:00
Adeeb Shihadeh 876602ba91
Toyota Avalon 2021 (#19790) 2021-01-16 14:14:13 -08:00
Adeeb Shihadeh 27fefb9f60 fix lexus is fw fingerprinting 2020-11-20 14:29:54 -08:00
Adeeb Shihadeh 27754a277c enable E261 in flake8: two spaces before inline comment 2020-05-31 14:07:29 -07:00
Willem Melching 3d08dcc3b2
Run mypy commit hook (#1591)
* run mypy commit hook

* fix mypy errors
2020-05-28 15:05:04 -07:00
Willem Melching 68ef23f97b Fixup comments 2020-05-20 14:10:55 -07:00
openpilot laptop b8cc31f888 Add single fw requests for hyundai ECUs not supporting multi requests 2020-05-20 14:07:04 -07:00
Willem Melching 1162041ea6
Only send FW query requests for the right brand (#1546)
* only send requests for the right brand

* this works on sonata

Co-authored-by: openpilot laptop <laptop@comma.ai>
2020-05-20 13:02:24 -07:00
Willem Melching bb8bbdd9ee
Hyundai fw query (#1540)
* hyundai fw query

* Change query

* this works

* That is not engine

* hyundai fw query

* Change query

* this works

* That is not engine

* Skip FW query in test_car_models

* Those routes don't fingerprint properly after speedup

* only send toyota queries to subaddresses

Co-authored-by: openpilot laptop <laptop@comma.ai>
2020-05-19 13:43:44 -07:00
Willem Melching 10c3494bc9 add TOYOTA CHR fw versions 2020-03-13 11:13:55 -07:00
jpancotti 1dea855708
classify ecus (#1092) 2020-02-20 17:07:21 -08:00
Willem Melching f719c9a657
remove duplicate addresses from firmware query. Fixes #1088 (#1100)
* remove duplicate addresses from firmware query

* Update release notes
2020-02-14 15:51:56 -08:00
Willem Melching 719e0572e1 Fix fw_versions.py --scan 2020-02-06 10:58:18 -08:00
Willem Melching bfa2d030d2 Add batch of firmware versions 2020-02-01 13:06:05 -08:00
Willem Melching b7aeb5d64d
Cache FW query (#1025)
* split fw query and matching

* Read cached firmware versions

* add tests

* this works
2020-01-30 17:57:20 -08:00
Willem Melching 356f353489
FW fingerprint for Honda & Toyota (#961)
* add script to process logs

* Skip rav4 ESP

* Improve gathering script

* Update firmware versions for honda and toyota

* more firmware versions

* If FW query returns 1 candidate, use it

* Add FW versions

* Fix COROLLA_TSS2 two enigine addresses

* uncomment rav4h tss2

* add progress bar to test script

* Batch with more ecu versions
2020-01-30 14:32:26 -08:00
George Hotz 71ead9adea selfdrive/car 2020-01-17 10:58:43 -08:00