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>
* 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>
* rename and add dep
* proto thresholds
* tweak vk
* update natural offset and clip offsets
* 95th looks good
* no punish for being relaxed
* yaw laplace only
* some pay more attention
* update ref
Co-authored-by: Willem Melching <willem.melching@gmail.com>
* alert text simplification
* little more
* user triggered
* little more
* less annoying ldw
* Update selfdrive/controls/lib/events.py
* update refs
* revert
* 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>
* Add cost for creep
* more reasonable cost
* seems better than before
* science tune
* more chill
* closer follow
* stopping takes some leeway
* better cruise
* needed to be cumsum all along
* jerk not even needed
* matches better
* 6 is too much
* add back
* a little extra buffer is good for badly tuned cars
* new refs
* refs again
* new engage/disengage + amp config
* first family
* cleanup audible alerts
* tici isn't special
* fix up debug cycle alerts
* these were better
* extend range
* use distracted sound
* log scaling
* getting closer
* slightly louder
* prompt
* update tests
* update refs
* fix c2 test
* resolve todo
* adjust tolerance
* revert for now
* should work
Co-authored-by: Comma Device <device@comma.ai>
* modify reset logic
* remove debug statements
* use ecef pos and vel covariances during reset
* reset orientations initialized to 0,0,GPSbearing
* refactor nav fix
* add fake gps observations to control ecef pos and ecef vel std
* replace fake_P with individual fake cov
* set gps mode flag
* add gps invalid flag names
* update refs
* more accurate gps accuracy check + update refs
* set ECEF_POS valid flag to false if in no-gps mode
* modify valid flag for all ecef states before gps
* add calibrated valid when no gps
* update refs
* remove extra whitespace
* add invalid flag to all NED values pre gps
* update refs
* update correct refs
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* Mazda: disable hud alerts for now until we find a way to silence audible warnings
Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
* Mazda: add hud alert for steer lockout
Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
* show when above min steer speed
* update refs
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* add no gps observations
* use correct ecef_location, orientation vals and stds for nogps states
* remove earth radius obs
* move initial loc to the ocean
* remove unnecessary changes
* update refs