Commit Graph

57 Commits

Author SHA1 Message Date
Adeeb Shihadeh
3c48bc47b7 Move a bunch of stuff to system/ part 3 (#24829)
* move swaglog.py

* timezoned

* logmessaged

* version.py

* fix linter
old-commit-hash: 0fce5d9045
2022-06-11 23:19:27 -07:00
Adeeb Shihadeh
9a45a3b99b Move selfdrive/hardware/ to system/ (#24725)
* move hardware to system/

* fix mypy
old-commit-hash: 1139fe507b
2022-06-11 16:38:24 -07:00
Adeeb Shihadeh
d097c4df26 manager: start process by callback (#24417)
old-commit-hash: cdf6338388
2022-05-03 23:30:35 -07:00
Willem Melching
b9fb3cb647 updated: only run offroad & disable automatic git garbage collection (#24269)
* updated: disable automatic git garbage collection

* set gc.autoDetach false

* add gc cloudlogs

* trigger updated

* handle exception

* trigger updated

* only while offroad

* no trigger needed

* trigger updated

* check if git gc was interrupted

* trigger updated

* dont set params when shutting down

* let manager clear params

* no offroad check anymore

* event is nicer to parse

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 3063c70ff1
2022-04-22 14:43:44 -07:00
Adeeb Shihadeh
ae71ecf8b8 manager: start bridge and web joystick for notcars (#24212)
* manager: start bridge and web joystick for notcars

* fix that

* bump cereal

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 76a8338197
2022-04-19 14:13:05 -07:00
Shane Smiskol
474ba19c81 Add Disengage on Accelerator Toggle (#23977)
* Squashed commit of the following:

commit 953bcf0ecf8d03f0fec9ce0d5442cc660ae2347d
Merge: b4198608d efd04715e
Author: Shane Smiskol <shane@smiskol.com>
Date:   Fri Apr 1 19:58:06 2022 -0700

    Merge remote-tracking branch 'upstream/master' into disengage-on-gas

commit b4198608dac9595bfeb9443f95cd6c5d385cd62d
Merge: 24f90b2c8 0e983562d
Author: Shane Smiskol <shane@smiskol.com>
Date:   Fri Apr 1 14:32:54 2022 -0700

    Merge remote-tracking branch 'upstream/master' into disengage-on-gas

commit 24f90b2c8d6ae509c0776b6e33b743467aa08dee
Author: Shane Smiskol <shane@smiskol.com>
Date:   Thu Mar 31 14:07:52 2022 -0700

    revert changes and get ready for override

commit aa514df6b5e8431f0faa07f6b25eb5cb6c9f2749
Author: Shane Smiskol <shane@smiskol.com>
Date:   Wed Mar 30 20:52:24 2022 -0700

    temporary

commit c874e10c2555968c683f629c4582ab22e51d431f
Author: Shane Smiskol <shane@smiskol.com>
Date:   Wed Mar 30 00:30:13 2022 -0700

    move gasPressed to controlsd

commit fe670439dff5bc6dfc5963d79ca2febe0c5920c7
Merge: 49d3b6d11 c78701e47
Author: Shane Smiskol <shane@smiskol.com>
Date:   Wed Mar 30 00:15:48 2022 -0700

    Merge remote-tracking branch 'upstream/master' into disengage-on-gas

commit 49d3b6d1162893fa94b2294152f0718eeb4698ed
Merge: 475b27e74 3e819bc5a
Author: Shane Smiskol <shane@smiskol.com>
Date:   Mon Mar 28 13:06:08 2022 -0700

    Merge remote-tracking branch 'upstream/master' into disengage-on-gas

commit 475b27e74fd6479f1d148e9ded1eca6ee476865c
Author: Shane Smiskol <shane@smiskol.com>
Date:   Thu Mar 24 20:24:59 2022 -0700

    update SAFETY.md

commit 0798eadb82749e12ecbaa86f4e57b21bd3dbc7e8
Author: Shane Smiskol <shane@smiskol.com>
Date:   Thu Mar 24 17:52:06 2022 -0700

     ➡️ 🔋

    bump

commit d2b64b89cf8d7265bc90848b4e3a2276c9a4cb78
Author: Shane Smiskol <shane@smiskol.com>
Date:   Thu Mar 24 16:19:34 2022 -0700

    these changes will be in border PR

    these changes will be border PR

commit bed31e63de2244c161729773978fef8a9246ddb5
Merge: 491417640 603e07793
Author: Shane Smiskol <shane@smiskol.com>
Date:   Thu Mar 24 16:17:31 2022 -0700

    Merge remote-tracking branch 'upstream/master' into disengage-on-gas

commit 49141764098e3a701ff123ead52de4656b31db4d
Merge: 9291e9f00 46ed8bb8e
Author: Shane Smiskol <shane@smiskol.com>
Date:   Wed Mar 23 19:00:26 2022 -0700

    Merge remote-tracking branch 'upstream/master' into disengage-on-gas

commit 9291e9f0045780669b2ffa7f08fb10373c03b070
Merge: 2aed64157 2c947f193
Author: Shane Smiskol <shane@smiskol.com>
Date:   Fri Mar 18 19:03:13 2022 -0700

    Merge remote-tracking branch 'upstream/master' into disengage-on-gas

commit 2aed64157d6e9dc993d103a2c6abf7e643410562
Author: Shane Smiskol <shane@smiskol.com>
Date:   Fri Mar 18 19:03:03 2022 -0700

    Revert "send pre-enable state when gas is pressed"

    This reverts commit 8d82e697dc2efade307413e767d14b56b4d2d079.

commit a219defe5342efa731a957b2ff4fd86292c1f239
Author: Shane Smiskol <shane@smiskol.com>
Date:   Thu Mar 17 12:50:46 2022 -0700

    bump cereal

commit 8d82e697dc2efade307413e767d14b56b4d2d079
Author: Shane Smiskol <shane@smiskol.com>
Date:   Wed Mar 16 22:40:13 2022 -0700

    send pre-enable state when gas is pressed

    formatting and it's out

    forgot one

    allow gas press

    show toggle

    revert changes

    revert changes

commit 5eb4d1ab1b77ac65bdd901f692ebfb848d5187ca
Merge: bad1bdc74 d0ef25959
Author: Shane Smiskol <shane@smiskol.com>
Date:   Wed Mar 16 22:29:43 2022 -0700

    Merge remote-tracking branch 'upstream/master' into disengage-on-gas

commit bad1bdc7428c5d8a4a765b259da504f0ade84424
Author: Shane Smiskol <shane@smiskol.com>
Date:   Tue Mar 15 23:03:56 2022 -0700

    clean up a bit

commit 7516ed9b786536a07f00a92b9c1742ca252a01d1
Author: Shane Smiskol <shane@smiskol.com>
Date:   Tue Mar 15 22:55:09 2022 -0700

    these are null checks right now

commit 408f5f1d633521b29b08d966c9b387fa79dff0d6
Author: Shane Smiskol <shane@smiskol.com>
Date:   Tue Mar 15 22:51:14 2022 -0700

    should work

commit be1978e29c03d8843cf073cc9ddf84020fd2b378
Author: Shane Smiskol <shane@smiskol.com>
Date:   Tue Mar 15 22:36:16 2022 -0700

    stash

commit f0bd4c47e9d27061c6cd3b88765a7c10995f42db
Author: Shane Smiskol <shane@smiskol.com>
Date:   Tue Mar 15 22:26:24 2022 -0700

    this was flipped

commit d5b6e30389a727e8559331acd706422e1b246f60
Merge: 820b19894 c814c1383
Author: Shane Smiskol <shane@smiskol.com>
Date:   Tue Mar 15 22:25:49 2022 -0700

    Merge remote-tracking branch 'upstream/master' into disengage-on-gas

commit 820b1989496225df1f66f39b477f1e9402db1b19
Merge: 91763f9ff 6d2483ff9
Author: Shane Smiskol <shane@smiskol.com>
Date:   Mon Mar 14 23:39:34 2022 -0700

    Merge remote-tracking branch 'upstream/master' into disengage-on-gas

commit 91763f9ff4321986babce1a7b1272fcf64c8f753
Author: Shane Smiskol <shane@smiskol.com>
Date:   Thu Feb 24 20:15:26 2022 -0800

    add icon from jozef 🔥

commit 1885c9e2bacd9351c7e421b1436dcbfbde238436
Merge: 1f591736a eae207a84
Author: Shane Smiskol <shane@smiskol.com>
Date:   Thu Feb 24 20:08:07 2022 -0800

    Merge remote-tracking branch 'upstream/master' into disengage-on-gas

commit 1f591736a2767b1ed892c29ec5000cc7348f01c7
Merge: 465811f0b ebf5b27a7
Author: Jason Wen <47793918+sunnyhaibin@users.noreply.github.com>
Date:   Sat Feb 12 10:24:29 2022 -0500

    Merge branch 'master' into disengage-on-gas

commit 465811f0b4776e43a289398e4d4369362b7da58c
Author: Jason Wen <haibin.wen3@gmail.com>
Date:   Fri Feb 11 11:20:32 2022 -0500

    Add param to process replay

commit 0344363a533505435cff87eb33356b2364a4156f
Merge: 700efcb3f 1175355b7
Author: Jason Wen <47793918+sunnyhaibin@users.noreply.github.com>
Date:   Fri Feb 11 11:07:31 2022 -0500

    Merge branch 'master' into disengage-on-gas

commit 700efcb3f444092f99ef10e9908f83402429d742
Author: Jason Wen <haibin.wen3@gmail.com>
Date:   Fri Feb 11 11:04:39 2022 -0500

    Add param to unsafeMode

commit 220ce272fee1f7f5ace2a04052605a6e4f95712b
Author: Jason Wen <haibin.wen3@gmail.com>
Date:   Fri Feb 11 10:54:16 2022 -0500

    Add param to unsafeMode

commit d273bb78acbc23ee5255e461fa71b2f0400a5e03
Author: Jason Wen <haibin.wen3@gmail.com>
Date:   Fri Feb 11 10:52:22 2022 -0500

    Resolve conflicts

commit 1a85afd60c2f0d3140dfa8e7cd574d6b88abd5e3
Author: Jason Wen <haibin.wen3@gmail.com>
Date:   Fri Feb 11 10:51:50 2022 -0500

    Resolve conflicts

commit e3be32afc2bb2423d29e2b4f85b3cff3fe72aab9
Author: Jason Wen <haibin.wen3@gmail.com>
Date:   Fri Feb 11 10:51:08 2022 -0500

    Resolve conflicts

commit f27203af3afe612173bf9a63e15c57118598b5b8
Author: Jason Wen <haibin.wen3@gmail.com>
Date:   Wed Jan 19 00:30:09 2022 -0500

    Add param to process replay

commit 04c0ad1a54f4fea5efe74b3203d9bdbd693b64a6
Author: Jason Wen <47793918+sunnyhaibin@users.noreply.github.com>
Date:   Wed Jan 19 00:28:49 2022 -0500

    Update interfaces.py

    Co-authored-by: Willem Melching <willem.melching@gmail.com>

commit 99cf13caeb4d9f2c95c25e1e78b6e353ea508cb6
Author: Jason Wen <haibin.wen3@gmail.com>
Date:   Sat Jan 15 00:03:38 2022 -0500

    Fix missing params lib

commit 2230254ca709625d591b0c73d1a6022c450f6ef6
Author: Jason Wen <haibin.wen3@gmail.com>
Date:   Fri Jan 14 23:38:46 2022 -0500

    Disengage on gas toggle

commit 87475e02cb63cc39c9b16edc67f303e02d17e6ef
Author: Jason Wen <haibin.wen3@gmail.com>
Date:   Fri Jan 14 23:24:00 2022 -0500

    Disengage on gas toggle

* bump

* use ALTERNATIVE_EXPERIENCE

* or it

* de-bump

* update refs

* update refs!

* you can just ctrl+click ALTERNATIVE_EXPERIENCE!

* already have a params

* update text
old-commit-hash: f1f40c117a
2022-04-04 21:59:52 -07:00
Adeeb Shihadeh
e077b5c2ff manager: kill UI when manager failed to start
old-commit-hash: edcee81796
2022-02-01 11:06:32 -08:00
Adeeb Shihadeh
543860d318 manager: don't start uploader with dongle id
old-commit-hash: 818d4a0a96
2022-01-25 15:42:38 -08:00
Ryan
0dbb4fb3b0 Add more type hinting (#23595)
* Add more type hinting.

* Revert joystick_alert changes.

* Add typing to statsd.

* Update selfdrive/statsd.py

* Update selfdrive/test/test_fingerprints.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: aa9e635311
2022-01-21 15:11:16 -08:00
Adeeb Shihadeh
fa8ba3617b sentry fixups (#23249)
* set env

* do init in same place

* no sentry for forks

* start session

* start session

* remove that

* val
old-commit-hash: b63bc89bc9
2022-01-14 15:25:16 -08:00
Adeeb Shihadeh
ccf91380f2 manager: log exit reason (#23532)
old-commit-hash: 308a6f1730
2022-01-14 08:55:51 -08:00
Willem Melching
729973f511 Do not disable loggerd when below 5% space (#23440)
old-commit-hash: 9e1428fd84
2022-01-13 10:31:37 +01:00
George Hotz
86a39e838b Add More Types for mypy (#23268)
* mypy passes

* a few more

* a few in manager

* more types, will lint

* more

* simple types

* events type

* Update selfdrive/thermald/thermald.py

* Apply suggestions from code review

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: dc96d4bee7
2021-12-28 18:07:00 +01:00
Adeeb Shihadeh
6fc218503c cloudlog: add daemon name to context for python daemons (#23225)
* python

* manager is a daemon too

* Update selfdrive/manager/process.py

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: b27a19e9d1
2021-12-14 20:43:26 -08:00
Shane Smiskol
ef38c36435 version.py: make function names more clear (#23216)
* rename a few version functions

* and is_prebuilt

* and some formatting 😊
old-commit-hash: b745a14ff7
2021-12-14 12:15:13 +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: 6951b3271d
2021-12-03 22:57:19 -08:00
Willem Melching
176f552c9e manager.py use get_short_branch() for GitBranch param
old-commit-hash: e8d56f241a
2021-12-02 10:25:03 +01:00
Willem Melching
28dd415759 Do not run code on version.py import (#23063)
* Do not run code on version.py import

* fix athena
old-commit-hash: f7c46c6949
2021-11-29 19:38:55 +01:00
Willem Melching
1ae492370d Add LastPowerDropDetected and create bootlog before clearing params (#23062)
* Add LastControlledShutdown and create bootlog before clearing params

* update param name

* sorting
old-commit-hash: 7c8044d2db
2021-11-29 15:51:27 +01:00
Adeeb Shihadeh
182a12fdca manager: kill procs in parallel (#23010)
* manager: kill procs in parallel

* oops block
old-commit-hash: ba67c355db
2021-11-29 11:49:04 +01:00
Willem Melching
425349a55c swaglog.py: respect LOGPRINT env variable (#22950)
* swaglog.py: respect LOGPRINT env variable

* only change handler that prints

* keep usefull manager prints

* only print running list

* revert process changes

* fix test
old-commit-hash: 77b334a698
2021-11-18 16:05:06 +01:00
Willem Melching
bb8d0aa76d Move shutdown/reboot handling to manager (#22882)
* Move shutdown/reboot handling to manager

* more logging

* check enagaged

* Apply suggestions from code review

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 07ff724726
2021-11-12 09:10:34 -08:00
Willem Melching
06e22360ae Add DisableRadar_Allow param and settings toggle (#22329)
old-commit-hash: 8c01ae5716
2021-09-23 17:19:47 -07:00
Willem Melching
6f92abc815 Less open file permissions (#21922)
* Less open file permissions

* add test back

* remove params test for permissions

* remove umask

* bump cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: dddab597bc
2021-08-28 18:25:05 -07:00
Adeeb Shihadeh
784601c8e1 remove lte toggle (#21392)
* remove lte toggle

* little more
old-commit-hash: a420c7ad50
2021-06-23 17:01:17 -07:00
Adeeb Shihadeh
03405b81fd acados support (#21319)
* acados support

* add pyextra to python path

* x86 libs
old-commit-hash: 6e4c2aa4d2
2021-06-17 16:40:00 -07:00
Adeeb Shihadeh
baa85548de don't write last update time param on pc
old-commit-hash: 29ac94b719
2021-06-07 14:07:08 -07:00
Adeeb Shihadeh
5a80518b52 tici, it's just like cici
old-commit-hash: 189ee62d00
2021-05-25 20:36:50 -07:00
Willem Melching
9754f9fdc5 manager.py: fix UNREGISTERED_DONGLE_ID check (#21027)
old-commit-hash: ba5d6bbd70
2021-05-25 17:26:25 +02:00
Adeeb Shihadeh
932486f4ef default lte param to on
old-commit-hash: 7a4d319035
2021-05-18 15:29:02 -07:00
Adeeb Shihadeh
8002b848b6 offroad alert for unregistered devices (#20870)
* offroad alert for unregistered devices

* update tests

* add param

* fix stretch
old-commit-hash: b93ccc465d
2021-05-11 03:18:45 -07:00
Adeeb Shihadeh
88434dc9e4 add CLEAR_ON_IGNITION param type (#20810)
old-commit-hash: b4447993c1
2021-05-04 11:32:40 -07:00
Adeeb Shihadeh
8a759792c4 don't init sentry on non-comma remote
old-commit-hash: 5f3fe01002
2021-05-03 20:14:31 -07:00
Adeeb Shihadeh
c9d5447edd registration unit tests (#20792)
* start tests

* more test

* done
old-commit-hash: 5b764ab477
2021-05-01 17:16:58 -07:00
Adeeb Shihadeh
c7cca3b07e update registration policy (#20770)
* update registration policy

* move that

* handle 403

* fix that
old-commit-hash: 4d8a35d639
2021-04-28 14:09:13 -07:00
Adeeb Shihadeh
4c461b3f7f disable sentry for devices without a dongle ID (#20729)
* disable sentry for devices without a dongle ID

* import pc

* unused
old-commit-hash: 47ad2a485f
2021-04-23 11:29:38 -07:00
Willem Melching
ab900874db manager.py: fix git commit param write outside of git repo
old-commit-hash: 01c5d7f7ed
2021-04-23 13:28:49 +02:00
Adeeb Shihadeh
3e4eb2e343 handle unregistered devices (#20728)
* handle unregistered devices

* cleanup

* no uploader or athena

* clean up
old-commit-hash: 1786d04239
2021-04-22 21:03:57 -07:00
Willem Melching
c0ca2ce743 Switch to new sentry_sdk (#20690)
* remove unused crash.install

* use sentry_sdk in crash.py

* athena crashes dont rely on excepthook

* make default crash handler work

* make it work in athena

* fixup tombstoned
old-commit-hash: ea0e611872
2021-04-22 15:24:35 +02:00
Adeeb Shihadeh
6d04f375e0 upload raw on tici
old-commit-hash: a3df0e9827
2021-04-15 21:36:09 -07:00
Adeeb Shihadeh
50a73824f9 raw upload off by default
old-commit-hash: 9adaff5379
2021-04-14 21:06:30 -07:00
Adeeb Shihadeh
f11dd415e8 update time from RTC on manager init (#20678)
* set time on manager init

* earlier

* handle exception

* logging

* add to release files

* run in launch script too

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 1adf34f033
2021-04-14 12:04:02 -07:00
Adeeb Shihadeh
89720ef6ce more apk cleanup (#20646)
* bump cereal

* cleanup

* little more

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 58dabdda00
2021-04-10 14:53:51 -07:00
Willem Melching
51e12611ce use put_bool to set Passive
old-commit-hash: 2967e79296
2021-04-09 17:56:50 +02: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
Greg Hogan
183d9f98a1 log to file and send through athena (#20250)
* log to file and send through athena

* rename logging level

* pass thru log formatter

* logMessage is TEXT

* send queue always strings

* switch to xattr and lower priority queue

* enable cloud logging for devices

* time or size based log rotation

* basename -> dirname

* remove HARDWARE.get_cloudlog_enabled

* fix errors

* fix another exception

* xattrs need to be bytes

* sending works

* cleanup files at start

* add id and adjust formatting

* do not send active log file

* better names

* separate log formatters

* fix formatter super init

* fix log file order

* ensure file always has file formatter

* i see why there was no formatter

* apply same formatting to cpp log msgs

* apply same formatting to cpp log msgs

* update queue names in tests

* strip deprecated keys in STATUS_PACKET

* strip DEPRECATED from dict recursively

* athena log queue test

* instanceof instead of type

* isinstance instead of type

* use super

* remove logentries

* last_scan param unused

* comment about special log msg attr names

* add dict_helpers.py to release files

* use monotonic time and counter for log rotation

* update for adjusted log file naming

* use monotonic clock for tracking last log file scan
old-commit-hash: 3d48bd934d
2021-03-25 13:30:09 -07:00
Willem Melching
5c08699614 Start ui before manager preimport (#20468)
* start ui early

* test sets this afer import
old-commit-hash: 261045668b
2021-03-25 17:27:15 +01:00
Adeeb Shihadeh
51c13aa552 APK purge (#20446)
* purge begins

* release files

* remove those

* no more android

* only qt

* text and spinner

* neos update script

* update sounds

* update cpu usage

* all done

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: e76c80ffa1
2021-03-24 14:30:41 -07:00
HaraldSchafer
eae1fa481c New KL model + laneless toggle (#20454)
* New model: 0bf38240-6b55-42b0-bcfb-da08ff5cd0b9/650

* laneless baby

* hardcode model difference for now

* kale toggle

* kale emoji

* sensible description

* make clear it is not just for ui

* emojis dont work yet

* 9671a8fe-539f-4a04-a163-54571df21139/650

* new model

* only read param on rising edge of ignition

* update toggle text

* fix that

* update refs

Co-authored-by: mitchell <mitchellgoffpc@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 7ee79c9923
2021-03-24 01:10:31 -07:00
Adeeb Shihadeh
5cfc42911b Remove lane change toggle and default LDW to off (#20442)
* remove lane change toggle and default LDW to off

* update refs
old-commit-hash: 43ce7165c4
2021-03-22 20:55:57 -07:00