Commit Graph

47 Commits

Author SHA1 Message Date
Adeeb Shihadeh
f69e234419 updated: fix surfacing exceptions and errors (#20754)
* updated: fix surfacing exceptions and errors

* can't rely on that

* unused

* ugh pylint

* try this

* this makes pylint happy

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 3c9e46d8a2
2021-04-26 20:58:21 -07:00
Willem Melching
8f4a445171 add putBool/getBool wrappers to cython params class (#20611)
* add putBool/getBool wrappers to cython class

* use new API

* some more puts

* fix mockparams arguments

* add get_bool to MockParams

* typo
old-commit-hash: ae094042ad
2021-04-07 15:36:37 +02:00
Adeeb Shihadeh
0d5dec9276 updated: log git diff on overlay init (#20476)
* updated: log git diff on overlay init

* add git diff param

* params
old-commit-hash: bcb6879199
2021-03-25 16:16:12 -07:00
Adeeb Shihadeh
8866942686 offroad alert for agnos update (#20270)
old-commit-hash: 6e101fd691
2021-03-07 15:37:09 -08:00
Adeeb Shihadeh
6dbc7c6d92 oneplus cleanup (#20200)
* start cleanup

* cleanup camerad

* remove unused

* little more

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 07ab081a42
2021-03-01 17:14:03 -08:00
Adeeb Shihadeh
ec468f88c9 move agnos manifest to selfdrive/hardware (#19889)
old-commit-hash: cfb0390183
2021-01-30 18:31:28 -08:00
Adeeb Shihadeh
933f2952bd fix updated bug that allows for mismatch openpilot/agnos (#19943)
old-commit-hash: 09ee2a8c51
2021-01-27 15:39:14 -08:00
Adeeb Shihadeh
349429836c agnos updater (#2600)
* agnos updater

* add manifest

* fix path

* get manifest from overlay

* update manifest

* remove merge markers

* add streaming decompressor

* dont need read all

* Unsparsify

* Fix output filename

* Optimization

* cleanup

* Small cleanup

* Read manifest from merged overlay

* Write hash at end of partition

* Sync before writing hash

* Write bytes in file

* add manifest with image sizes

* Fix manifest path

* File was closed already

* Format string

* Put raw hash

* Read hashes in launch script

* update launch script

* should be agnos version

* fix slot

* Make sure we clear the hash

* Verify partition size

* move updated

* Standalone flasher

* Don't rely on ordering

* Get path

* Debug log

* Download agnos

* Info is enough

* update manifest

* Remove f

* Check downloader return code

* Exit on wrong manifest

* Fix typos

* Set pythonpath before hardware init

* move agnos into hardware folder

* remove comments

* Fix abstractmethod

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: b276881fcd
2020-12-18 13:17:12 +01:00
Adeeb Shihadeh
804f08f593 disable updater for oneplus EONs
old-commit-hash: 40a4bd9fc7
2020-12-17 12:20:07 -08:00
Adeeb Shihadeh
b950cab874 HW abstraction layer (#19530)
* start hw refactor

* move that

* pins

* put that back
old-commit-hash: 8674b023ba
2020-12-16 21:30:23 -08:00
Adeeb Shihadeh
f359b4cf49 remove fsck logging in updated
old-commit-hash: 238ac19ba9
2020-12-14 10:51:03 -08:00
Adeeb Shihadeh
3e6abdd8bd oneplus deprecation (#2748)
* oneplus deprecation

* lowercase

* too long

* no udpates
old-commit-hash: 6a151dcd9c
2020-12-12 12:51:12 -08:00
Adeeb Shihadeh
d05c8e2a08 Tici updated (#2126)
* run updated on tici

* do this for now

* two didn't like empty string

* fix permissions
old-commit-hash: 38ded9b1e7
2020-10-02 16:36:20 -07:00
Adeeb Shihadeh
9bb39d1145 updated: remove old overlay init file
old-commit-hash: 2a2cfd6bb5
2020-09-29 21:26:27 -07:00
Adeeb Shihadeh
c23faac9df updated: log git corruption (#2242)
* log git corruption

* better cloudlog
old-commit-hash: 3f40a9ee75
2020-09-29 12:08:55 -07:00
Adeeb Shihadeh
12b7a29d06 Improved updater robustness (#2046)
* git ping

* cleanup overlay init

* separate update available check from fetch

* cleanup setting params

* only fetch neos update on android

* move that

* type hints

* lightweight update check with git ls-remote

* git fetch dry run

* cleanup
old-commit-hash: 722a440eb6
2020-09-22 12:09:41 -07:00
Greg Hogan
d200f048b7 fix pylint errors
old-commit-hash: 1e6c7c94e4
2020-09-03 18:46:13 -07:00
Adeeb Shihadeh
b2e40a7487 remove dead code in updated
old-commit-hash: 21a1792f89
2020-08-17 16:21:55 -07:00
Adeeb Shihadeh
c2b1d97b20 NEOS background updater (#1892)
old-commit-hash: cb5a2996e7
2020-08-12 11:39:21 -07:00
Adeeb Shihadeh
dde753d531 fix linter
old-commit-hash: 60e2267f02
2020-08-11 20:37:51 -07:00
Adeeb Shihadeh
017b084154 Alert when updated consistently fails (#2013)
* alert when update fails more than 10 times

* bring over offroad alert refactor from other branch

* and we have tests

* use it in snapshot

* bump apk

* don't show exceptions on release branches

* only write when changed

* why does delete use so much cpu

* clean that up

* little more
old-commit-hash: 8e63f06540
2020-08-11 16:23:57 -07:00
Adeeb Shihadeh
3dccc7fc2e Updater tests (#1974)
* refactor exit handling

* test update

* more reliable?

* better

* init git in CI

* testy tester

* CI should work

* test overlay reinit

* only one

* still need to fix loop test

* more patience

* more patience in CI

* no ping in CI

* this is cleaner

* need to run these in jenkins

* clean up

* run in jenkins

* fix test file path

* it's a git repo now

* no commit

* reinit

* remove duplicate

* why not git

* la

* git status

* pythonpath

* fix

* no CI fro now

* check overlay consistent

* more tests

* make more changes in the update commit

* sample

* no k
old-commit-hash: fe18a014c7
2020-08-06 21:49:05 -07:00
Adeeb Shihadeh
792b74f543 Improve update reliability and responsiveness (#1986)
* handle orphaned git lock

* trigger update after going offroad

* git ping
old-commit-hash: a115366ddd
2020-08-06 12:49:11 -07:00
Adeeb Shihadeh
b5fa861871 Cleanup updated (#1981)
* remove dead code from updated

* no short

* simpler

* simplify that

* move that into the class

* little more
old-commit-hash: f61dcb6e12
2020-08-05 13:29:03 -07:00
Adeeb Shihadeh
0b64a13bc9 improve updated responsiveness (#1973)
old-commit-hash: 88c67e7e9f
2020-08-04 13:48:19 -07:00
Adeeb Shihadeh
05628116ee fix blocking sleep in updated (#1860)
old-commit-hash: 62a94eb0cd
2020-07-12 01:46:18 -07:00
Jason Young
2b60599543 Make updated more resilient (#1853)
* Add sleep at updated startup

* Mitigate symlink-related FS damage
old-commit-hash: c43df81214
2020-07-10 07:41:26 -04:00
George Hotz
70dbce450c Add an SSH param to disable updates (#1807)
* disable updates with optional param

* dont create the alert

* Revert "dont create the alert"

This reverts commit 7179a6c8b4b4656e0b203b5a590b33d3388aa9c9.

* keep alert, but allow engagement

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: cb495bb8c9
2020-07-01 14:26:35 -07:00
Adeeb
9027018368 Update Flake8 config (#1624)
* update flake8 checks

* add E502

* no whitespace warnings

* fix violations

* no W391

Co-authored-by: Jason Young <jason@comma.ai>
old-commit-hash: 367155168a
2020-06-03 16:13:34 -07:00
Willem Melching
a56e2b01f8 Make pylint more strict (#1626)
* make pylint more strict

* cleanup in progress

* done cleaning up

* no opendbc
old-commit-hash: 843a64c72f
2020-06-02 16:29:32 -07:00
Willem Melching
36e26ce381 updater read git config first (#1376)
old-commit-hash: 0418da517a
2020-04-16 11:55:16 -07:00
Andy
a1c67df499 Replace usages of datetime.now() with datetime.utcnow() (#1267)
old-commit-hash: 54f34abdb3
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: e8cb6ea06a
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: a5bd1d2a88
2020-02-11 14:59:37 -08:00
George Hotz
a7fa20b566 selfdrive/*.py
old-commit-hash: 2f9379a139
2020-01-17 11:03:42 -08:00
George Hotz
81dd5a50cf root commit
old-commit-hash: 6c33a5c1f3
2020-01-17 10:02:52 -08:00
Vehicle Researcher
fa4b6f33d1 openpilot v0.7.1 release
old-commit-hash: 8da8b6135c
2020-01-15 14:05:04 -08:00
Vehicle Researcher
99b637c7ce openpilot v0.7 release
old-commit-hash: c025b96e8a
2019-12-13 13:03:08 -08:00
Vehicle Researcher
89d1d84c70 openpilot v0.6.5 release
old-commit-hash: cf80f7a28b
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: 9dae0bfac4
2019-05-02 11:08:59 -07:00
Vehicle Researcher
e41a943dd0 openpilot v0.5 release
old-commit-hash: de33bc4645
2018-07-12 18:52:06 -07:00
Vehicle Researcher
405e7c1b02 openpilot v0.4.7.2 release
old-commit-hash: 95509a58cd
2018-06-25 13:48:52 -07:00
Vehicle Researcher
cd558d30d1 openpilot v0.4.3.2 release
old-commit-hash: 78df63a6af
2018-03-31 07:54:47 +00:00
Vehicle Researcher
df22dac4f6 openpilot v0.4.3 release
old-commit-hash: 9a411ebf32
2018-03-17 00:01:50 -07:00
Vehicle Researcher
e147663381 openpilot v0.4.0.1 tweaks
old-commit-hash: 7ef3fd567f
2018-01-16 23:26:39 -08:00
Vehicle Researcher
d9578e2f8e openpilot v0.4.0.1 release
old-commit-hash: a77c0a1098
2017-12-23 17:15:27 -08:00
Vehicle Researcher
81ebf6b142 openpilot v0.3.8.2 release
old-commit-hash: 187a70f760
2017-10-31 02:27:39 -07:00