Commit Graph

68 Commits

Author SHA1 Message Date
Adeeb Shihadeh
6590fb2b93 pre-commit: add codespell (#25571) 2022-08-30 11:20:55 -07:00
Jason Young
c007c7e681 Improved steering accuracy measurement script (#23583)
* move steering accuracy measurement script

* git rebase is utterly worthless

* fix header width
2022-05-12 15:09:37 +02:00
Adeeb Shihadeh
b16e612102 remove eon debug scripts 2022-05-05 19:42:18 -07:00
grekiki
b8b15d5cf1 mypy: enable --warn-unreachable (#24282)
* Optional solves mypy assuming None is always None

* oops

* spaces

* Update registration.py

* fix local error

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2022-04-21 18:27:45 +02:00
Adeeb Shihadeh
6013d733a3 add mpld3 python pacakge (#24138)
* add mpld3 python pacakge

* move to dev

* fix for new pylint
2022-04-05 15:00:35 -07: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
Adeeb Shihadeh
ea82af14ca delete old scripts 2021-12-20 23:20:02 -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
grekiki
6951b3271d 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>
2021-12-03 22:57:19 -08:00
Robbe Derks
91987f38d4 Make pandaState and safetyMode a list (#22454)
* wip: move to pandaStates

* bump cereal

* wip: SafetyMode struct

* move to safetyMode

* fix typo

* this can be None

* fix potential empty pandaStates list

* fix thermald

* fix controlsd

* rename safetyModes to safetyConfigs

* update process_replay

* fix test_models

* bump cereal
2021-10-08 17:54:34 +02:00
Adeeb Shihadeh
bd79e7f023 remove old can replay script 2021-09-02 16:56:13 -07:00
Adeeb Shihadeh
fd81a5556b fix up can replay script 2021-08-18 14:06:06 -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
Willem Melching
ee39e7ba18 qlog_size.py: print size 2021-07-15 12:36:03 +02:00
eFini
5c450026ef two minor bug fixes (#21134) 2021-06-04 21:20:02 -07:00
Adeeb Shihadeh
4dec92f273 add ignition cycling to can replay script 2021-05-22 14:14:48 -07:00
George Hotz
36d7a86579 allow core voltage setting 2021-04-22 19:42:32 -07:00
George Hotz
4a710bfc16 core voltage sweep 2021-04-22 17:22:31 -07:00
George Hotz
a1fb21e066 script to do voltage sweep 2021-04-22 17:07:31 -07:00
Willem Melching
34328ba305 Remove panda set power functions (#20712)
* remove panda set power functions

* removed
2021-04-20 15:31:19 +02: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
Willem Melching
da5f0c5332 run paramsd: sort messages 2021-03-26 17:15:55 +01:00
Willem Melching
c0e3e2ba1b add debug script to run paramsd on route 2021-03-26 17:06:41 +01:00
Willem Melching
526d0c3d53 add script to show rlog/qlog breakdown 2021-02-23 15:36:46 +01:00
Adeeb Shihadeh
312b681a46 cereal cleanup part 2 (#20092)
* car stuff

* thermal

* Revert "car stuff"

This reverts commit 77fd1c65ebd01abfa8493ae12c9e6b14f7ada976.

* panda state

* camera stuff

* start deg

* most is building

* builds

* planner + controls run

* fix up paramsd

* cleanup

* process replay passes

* fix webcam build

* camerad

* no more frame

* thermald

* ui

* paramsd

* camera replay

* fix long tests

* fix camerad tests

* maxSteeringAngle

* bump cereal

* more frame

* cereal master
2021-02-16 21:39:32 -08:00
Adeeb Shihadeh
000bd226aa Cereal cleanup (#20003)
* start cleanup

* fan speed

* cleanup dm

* fix cereal

* hwType -> pandaType

* update refs

* update refs

* bump cereal

* freeSpacePercent

* cereal master
2021-02-03 19:57:30 -08:00
Adeeb Shihadeh
229395e15b fix static analysis checks after mypy update 2021-01-30 16:53:48 -08:00
Comma Device
523a73774a replay improvements for testing closet 2021-01-16 01:03:10 +00:00
Adeeb Shihadeh
413e0fa40a fix import error 2021-01-14 18:02:13 -08:00
Adeeb Shihadeh
e6478c6b35 better can replay script 2021-01-14 17:49:17 -08:00
Adeeb Shihadeh
b1a4ec8135 make fingerprint script nice 2020-12-08 13:39:22 -08:00
Adeeb Shihadeh
9a9e4ba45e fix fingerprint script 2020-10-29 13:56:58 -07:00
Adeeb Shihadeh
9060d3c87b fix paths for waste3 debug script 2020-09-29 15:51:58 -07:00
Adeeb Shihadeh
ebab660622 rt debug scripts (#2165)
* rt debug scripts

* bigger buffer

* cleanup

* move to internal

Co-authored-by: Comma Device <device@comma.ai>
2020-09-16 17:42:37 -07:00
Adeeb Shihadeh
520c2676b6 type hints for messaging (#2061)
* bump cereal

* fix bugs found by mypy

* bump cereal
2020-08-23 00:33:19 -07:00
Willem Melching
74f95b8b26 skip 1st segment in debug replay 2020-07-23 17:56:36 +02:00
Adeeb Shihadeh
b17a6e8f31 default to a reasonable amount of segs in replay_drive_can.py 2020-07-10 17:58:04 -07:00
Adeeb Shihadeh
af22b282ff Fix some alert sounds not repeating (#1763)
* fix sounds not repeating

* fix PC build

* 3 loop

Co-authored-by: Comma Device <device@comma.ai>
2020-06-22 19:22:02 -07:00
Willem Melching
0681fc04ad debug script to track droppped frames (#1749) 2020-06-19 16:56:56 -07:00
Willem Melching
2400417084 vehicle model types (#1631) 2020-06-03 13:47:47 -07:00
Willem Melching
843a64c72f Make pylint more strict (#1626)
* make pylint more strict

* cleanup in progress

* done cleaning up

* no opendbc
2020-06-02 16:29:32 -07:00
Adeeb Shihadeh
f3dcf861c7 enable flake8 E303: too many blank lines 2020-05-31 17:21:11 -07:00
Adeeb Shihadeh
27754a277c enable E261 in flake8: two spaces before inline comment 2020-05-31 14:07:29 -07:00
Adeeb Shihadeh
efd5dffb1e enable flake8 E231: missing whitespace after comma 2020-05-31 12:49:11 -07:00
Willem Melching
ba2ac1207a Running pre-commit in CI (#1590)
* Running pre-commit in CI

* fix dockerfile syntax

* dont run on submodule repo folders

* Fix some import errors in ci

* more stuff

* That should be the last one
2020-05-28 15:40:48 -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
bee15f8abe make pre-commit pass without xx present 2020-05-28 13:20:28 -07:00
Willem Melching
bd06434243 pre-commit pylint (#1580)
* "The commit-hook project sounds interesting though. I would definitely merge something that runs flake8 and pylint on the modified files!"
-  pd0wm, https://github.com/commaai/openpilot/pull/1575#issuecomment-634974344

* add pylint to pre-commit and make everything pass

* Remove uncommented stuff

Co-authored-by: J <user@4800.lan>
2020-05-27 20:00:14 -07:00
Willem Melching
e66c246f34 add simple script to print controlsd alive and valid 2020-05-14 20:16:24 -07:00
Jason Young
09d465013c Fix hardcoded path in sensor test script (#1481)
* Fix hardcoded path to sensor test script

* Rename the other place too
2020-05-09 22:17:24 -07:00