Commit Graph

16 Commits

Author SHA1 Message Date
Andy
a1c67df499 Replace usages of datetime.now() with datetime.utcnow() (#1267)
old-commit-hash: 54f34abdb36cbf7a43b3de1ba8765a972413179d
2020-03-26 19:49:58 -07:00
Adeeb
65a2c62114 Abstract common events + event cleanup (#1129)
* too many if

* unused

* whitespace

* key

* sefldrive/car/*

* no more gctx

* lower

* start abstracting common events

* all cars

* start small

* all cars

* reverse gear

* wrongCarMode

* wrongGear

* espDisabled

* steerUnvailable

* make linter happy

* c isn't used

* fix esp_disabled in VW

* update ref

* more red

* more cleanup

* fix subaru

* update ref

old-commit-hash: e8cb6ea06a2470dd89a6ad8fd17bd1d1b62034cc
2020-02-20 16:22:25 -08:00
Willem Melching
8611b1b648 Only show update alert if updater failed once since reboot (#1078)
* Only show update alert if updater failed

* no negetive days in warning message

* Also increase failed count when no internet

* Only set count to zero on actual update

* First run always fails because IsOffroad is not set yet

old-commit-hash: a5bd1d2a88173b28bff872c7635a8e126318029d
2020-02-11 14:59:37 -08:00
George Hotz
a7fa20b566 selfdrive/*.py
old-commit-hash: 2f9379a139e8f7e479bd7baaa0a85cb872c2eb4d
2020-01-17 11:03:42 -08:00
George Hotz
81dd5a50cf root commit
old-commit-hash: 6c33a5c1f3878e1d8c8a9db600dd44d188f02c87
2020-01-17 10:02:52 -08:00
Vehicle Researcher
fa4b6f33d1 openpilot v0.7.1 release
old-commit-hash: 8da8b6135c600ec653c16606239364ab9324fd98
2020-01-15 14:05:04 -08:00
Vehicle Researcher
99b637c7ce openpilot v0.7 release
old-commit-hash: c025b96e8a15640ee4d6e4d513fada6ed101afe5
2019-12-13 13:03:08 -08:00
Vehicle Researcher
89d1d84c70 openpilot v0.6.5 release
old-commit-hash: cf80f7a28bc737f50e096b21dea2dd2d6d4a1621
2019-10-09 18:43:53 +00:00
Drew Hintz
3ad68e4378 getting ready for Python 3 (#619)
* tabs to spaces
python 2 to 3: https://portingguide.readthedocs.io/en/latest/syntax.html#tabs-and-spaces

* use the new except syntax
python 2 to 3: https://portingguide.readthedocs.io/en/latest/exceptions.html#the-new-except-syntax

* make relative imports absolute
python 2 to 3: https://portingguide.readthedocs.io/en/latest/imports.html#absolute-imports

* Queue renamed to queue in python 3
Use the six compatibility library to support both python 2 and 3: https://portingguide.readthedocs.io/en/latest/stdlib-reorg.html#renamed-modules

* replace dict.has_key() with in
python 2 to 3: https://portingguide.readthedocs.io/en/latest/dicts.html#removed-dict-has-key

* make dict views compatible with python 3
python 2 to 3: https://portingguide.readthedocs.io/en/latest/dicts.html#dict-views-and-iterators
Where needed, wrapping things that will be a view in python 3 with a list(). For example, if it's accessed with []
Python 3 has no iter*() methods, so just using the values() instead of itervalues() as long as it's not too performance intensive. Note that any minor performance hit of using a list instead of a view will go away when switching to python 3. If it is intensive, we could use the six version.

* Explicitly use truncating division
python 2 to 3: https://portingguide.readthedocs.io/en/latest/numbers.html#division
python 3 treats / as float division. When we want the result to be an integer, use //

* replace map() with list comprehension where a list result is needed.
In python 3, map() returns an iterator.
python 2 to 3: https://portingguide.readthedocs.io/en/latest/iterators.html#new-behavior-of-map-and-filter

* replace filter() with list comprehension
In python 3, filter() returns an interatoooooooooooor.
python 2 to 3: https://portingguide.readthedocs.io/en/latest/iterators.html#new-behavior-of-map-and-filter

* wrap zip() in list() where we need the result to be a list
python 2 to 3: https://portingguide.readthedocs.io/en/latest/iterators.html#new-behavior-of-zip

* clean out some lint
Removes these pylint warnings:
************* Module selfdrive.car.chrysler.chryslercan
W: 15, 0: Unnecessary semicolon (unnecessary-semicolon)
W: 16, 0: Unnecessary semicolon (unnecessary-semicolon)
W: 25, 0: Unnecessary semicolon (unnecessary-semicolon)
************* Module common.dbc
W:101, 0: Anomalous backslash in string: '\?'. String constant might be missing an r prefix. (anomalous-backslash-in-string)
************* Module selfdrive.car.gm.interface
R:102, 6: Redefinition of ret.minEnableSpeed type from float to int (redefined-variable-type)
R:103, 6: Redefinition of ret.mass type from int to float (redefined-variable-type)
************* Module selfdrive.updated
R: 20, 6: Redefinition of r type from int to str (redefined-variable-type)

old-commit-hash: 9dae0bfac4e54ec2b2e488d2b4ead1495c8f56d8
2019-05-02 11:08:59 -07:00
Vehicle Researcher
e41a943dd0 openpilot v0.5 release
old-commit-hash: de33bc46452b1046387ee2b3a03191b2c71135fb
2018-07-12 18:52:06 -07:00
Vehicle Researcher
405e7c1b02 openpilot v0.4.7.2 release
old-commit-hash: 95509a58cd906827bff61937f6132daa7460122e
2018-06-25 13:48:52 -07:00
Vehicle Researcher
cd558d30d1 openpilot v0.4.3.2 release
old-commit-hash: 78df63a6af4b3108a25094f719d4c5e26b2fd658
2018-03-31 07:54:47 +00:00
Vehicle Researcher
df22dac4f6 openpilot v0.4.3 release
old-commit-hash: 9a411ebf32ae6908156badae25c16839ada7ad99
2018-03-17 00:01:50 -07:00
Vehicle Researcher
e147663381 openpilot v0.4.0.1 tweaks
old-commit-hash: 7ef3fd567ffdc2dac3cba5484099b83eeee3f4d9
2018-01-16 23:26:39 -08:00
Vehicle Researcher
d9578e2f8e openpilot v0.4.0.1 release
old-commit-hash: a77c0a1098d629b45cb363d38a9df36445ea8bd0
2017-12-23 17:15:27 -08:00
Vehicle Researcher
81ebf6b142 openpilot v0.3.8.2 release
old-commit-hash: 187a70f760b4b1cd463619a161e6a929fc86e1b4
2017-10-31 02:27:39 -07:00