Commit Graph

25 Commits

Author SHA1 Message Date
Ewout ter Hoeven a962365292 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>
old-commit-hash: 55390d273f36f49da3896e687ac5530f40c1d150
2021-12-16 14:58:17 +01:00
grekiki 9e4cc1f7ff Python: Replace more lists with generators (#23116)
* Replace lists with generators v2

* Replace set with {}

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Replace more set() with {}

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 6951b3271d1770297cb6bd53878463035ec0bf43
2021-12-03 22:57:19 -08:00
Jason Young 24a9b9248c Update CI tests for CAN fingerprinting deprecation (#21043)
* Start refactor of CI tests for FPv1 deprecation

* Fix test_car_interfaces

* Touch up comment

* Smaller diff
old-commit-hash: 182b00896c7c49dc18ee100fdb3cb7128f1dd5ea
2021-05-26 14:02:42 -07:00
Adeeb Shihadeh 7546f7d084 enforce message checks in can parser (#20742)
* enforce message checks in can parser

* nissan

* vw

* hkg

* subaru

* toyota

* honda bosch

* gm

* honda nidec

* bump opendbc

* not all tss2 have bsm

* toyota fixes

* honda fixes

* vw fix

* fix subaru

* fix long tests

* update refs

* crv bsm
old-commit-hash: 6c7ed8f2e4a3769c12e61be57e802920b84dcc29
2021-04-25 12:52:16 -07:00
Willem Melching ee0e80a6d4 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
old-commit-hash: e4f73fbda5c2dd07cbb15816ac1bf30b010408fe
2021-04-20 12:00:36 +02:00
Willem Melching 4bd1929d2b LateralPlanner should only compute curvature (#20289)
* get curvature from planner

* no need to check active

* remove that

* remove self

* liveParams not needed

* cast

* fix test bug

* fixes

* fix ui.py

* fix radians

* update refs

* update refs

* bump cereal

* bump cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: c23ec9f75389c9ad86400e9a9d23ee6bc5b648a2
2021-03-11 21:08:51 -08:00
Igor b1c6f804e5 Add indi breakpoints (#19664)
* Added BP, V to latcontrol_indi

* hyundai

* toyota

* Tests for INDI outerLoopGain
old-commit-hash: 0a65e87394f071a18cd377ab81391a48729d1fa0
2021-01-07 15:55:46 +01:00
Adeeb Shihadeh 412fb8c2f2 more robust fingerprint test
old-commit-hash: dc371f951ac5e3cbff7d2cec74c56efbe4b3a0c7
2020-12-12 01:19:38 -08:00
Adeeb Shihadeh d84ede9f00 better debug msg for fw fingerprinting test
old-commit-hash: 1e78469fba11b493d021214d086353e9f63a7037
2020-12-12 00:29:14 -08:00
Adeeb Shihadeh f25cec394e grey panda is unsupported (#2458)
old-commit-hash: 47c21f10f598639307994392e96f4d9293b295c7
2020-11-03 19:56:25 -08:00
Adeeb Shihadeh 39d98d3d2d Car cleanup (#1924)
* cleanup car code

* more pruning

* little more

* less pylint disables

* radar stuff

* fix

* udpate refs

* fix honda bosch

* fix test
old-commit-hash: 892e1162c0bfa0970cbe262452a70745eccb8ba6
2020-07-25 15:07:27 -07:00
Adeeb Shihadeh 59b626ba8c test each model fingerprints with FW fingerprinting (#1769)
* test each model fingerprints with FW fingerprinting

* lock

* test for all
old-commit-hash: b44569284a70b07b15daa580922d895a70956c20
2020-06-23 15:33:04 -07:00
Adeeb Shihadeh 521e57e262 test for duplicate ECU firmware versions
old-commit-hash: b5efaef98afb812846a5f1c8df07970a9c73e7be
2020-06-22 22:47:16 -07:00
Adeeb daea932130 Release cleanup (#1649)
* start cleanup

* whitelist submodule release files

* don't need to ship tests

* revert changes to build script

* add those tests back

* fix typo

* whitelist dbcs

* test

* run the right test

* whitelist opendbc/can

* revert that

* add missing dotfiles

* clean up

* ford DBCs

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: c24a7e248a295641f58d39e0db25dde1b742fc16
2020-06-08 14:24:14 -07:00
Willem Melching 2ee34128d0 add some sanity checks on returned params
old-commit-hash: 4fcf47812bee79a82919799d9a9b9cac115dea99
2020-05-30 17:15:41 -07:00
Willem Melching 8d4c5fcc7d run carcontrollers multiple times
old-commit-hash: 60431802ba8ff197ae9f92d7b38be7c0d178ed2d
2020-03-24 16:04:42 -07:00
rbiasini 27c9381aa5 Test interfaces also in enabled state and fix a bug (#1213)
old-commit-hash: 6582d632ec58336158147afdcba1172d7455f11e
2020-03-06 23:48:47 -08:00
Willem Melching ac9ecb3e3b also call interface.apply in test
old-commit-hash: e31ebda7a304f9783928edf6b5f4697b86e695f9
2020-03-06 17:02:37 -08:00
Willem Melching 3206cb8ca2 Unneeded tuple
old-commit-hash: ca5185864460c83fd03a8077adf89bf3e9ea729c
2020-03-06 14:06:54 -08:00
Willem Melching 2ab4d10d20 Fix typo in test comment
old-commit-hash: df16d08efbc2a7950b0ec2ea90906534957ce0fc
2020-03-06 14:06:02 -08:00
Willem Melching d7810667e8 Also test radar interface
old-commit-hash: 54ef38d7f614eda7383a4a4059d8f3addf0995ef
2020-03-06 14:02:40 -08:00
Willem Melching 60677729eb Also create a radar interface
old-commit-hash: 86e0202549b3d6eb9965d9149a9cee4517c26159
2020-03-06 13:56:27 -08:00
Willem Melching de8dcf3614 Add test that gets all the car params
old-commit-hash: 16b6c70884f870461cd3fa7d18daf61faa5c25d0
2020-03-06 13:54:32 -08:00
Willem Melching 1dee8638d6 Cache FW query (#1025)
* split fw query and matching

* Read cached firmware versions

* add tests

* this works

old-commit-hash: b7aeb5d64d
2020-01-30 17:57:20 -08:00
George Hotz 9ef085076b selfdrive/car
old-commit-hash: 71ead9adea
2020-01-17 10:58:43 -08:00