Commit Graph

44 Commits

Author SHA1 Message Date
Adeeb Shihadeh
b27a19e9d1 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>
2021-12-14 20:43:26 -08:00
Shane Smiskol
b745a14ff7 version.py: make function names more clear (#23216)
* rename a few version functions

* and is_prebuilt

* and some formatting 😊
2021-12-14 12:15:13 +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
Willem Melching
e8d56f241a manager.py use get_short_branch() for GitBranch param 2021-12-02 10:25:03 +01:00
Willem Melching
f7c46c6949 Do not run code on version.py import (#23063)
* Do not run code on version.py import

* fix athena
2021-11-29 19:38:55 +01:00
Willem Melching
7c8044d2db Add LastPowerDropDetected and create bootlog before clearing params (#23062)
* Add LastControlledShutdown and create bootlog before clearing params

* update param name

* sorting
2021-11-29 15:51:27 +01:00
Adeeb Shihadeh
ba67c355db manager: kill procs in parallel (#23010)
* manager: kill procs in parallel

* oops block
2021-11-29 11:49:04 +01:00
Willem Melching
77b334a698 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
2021-11-18 16:05:06 +01:00
Willem Melching
07ff724726 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>
2021-11-12 09:10:34 -08:00
Willem Melching
8c01ae5716 Add DisableRadar_Allow param and settings toggle (#22329) 2021-09-23 17:19:47 -07:00
Willem Melching
dddab597bc 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>
2021-08-28 18:25:05 -07:00
Adeeb Shihadeh
a420c7ad50 remove lte toggle (#21392)
* remove lte toggle

* little more
2021-06-23 17:01:17 -07:00
Adeeb Shihadeh
6e4c2aa4d2 acados support (#21319)
* acados support

* add pyextra to python path

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

* update tests

* add param

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

* more test

* done
2021-05-01 17:16:58 -07:00
Adeeb Shihadeh
4d8a35d639 update registration policy (#20770)
* update registration policy

* move that

* handle 403

* fix that
2021-04-28 14:09:13 -07:00
Adeeb Shihadeh
47ad2a485f disable sentry for devices without a dongle ID (#20729)
* disable sentry for devices without a dongle ID

* import pc

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

* cleanup

* no uploader or athena

* clean up
2021-04-22 21:03:57 -07:00
Willem Melching
ea0e611872 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
2021-04-22 15:24:35 +02:00
Adeeb Shihadeh
a3df0e9827 upload raw on tici 2021-04-15 21:36:09 -07:00
Adeeb Shihadeh
9adaff5379 raw upload off by default 2021-04-14 21:06:30 -07:00
Adeeb Shihadeh
1adf34f033 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>
2021-04-14 12:04:02 -07:00
Adeeb Shihadeh
58dabdda00 more apk cleanup (#20646)
* bump cereal

* cleanup

* little more

Co-authored-by: Comma Device <device@comma.ai>
2021-04-10 14:53:51 -07:00
Willem Melching
2967e79296 use put_bool to set Passive 2021-04-09 17:56:50 +02:00
Willem Melching
ae094042ad 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
2021-04-07 15:36:37 +02:00
Greg Hogan
3d48bd934d 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
2021-03-25 13:30:09 -07:00
Willem Melching
261045668b Start ui before manager preimport (#20468)
* start ui early

* test sets this afer import
2021-03-25 17:27:15 +01:00
Adeeb Shihadeh
e76c80ffa1 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>
2021-03-24 14:30:41 -07:00
HaraldSchafer
7ee79c9923 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>
2021-03-24 01:10:31 -07:00
Adeeb Shihadeh
43ce7165c4 Remove lane change toggle and default LDW to off (#20442)
* remove lane change toggle and default LDW to off

* update refs
2021-03-22 20:55:57 -07:00
Adeeb Shihadeh
b60cd8d0a0 record front lock (#20400)
* record front lock

* only if set

* add to internal installer

* move that

* change that bck

Co-authored-by: Comma Device <device@comma.ai>
2021-03-18 20:15:51 -07:00
Comma Device
8111d78cf3 uncomment 2021-03-09 23:00:25 -08:00
Comma Device
7a3d195f53 smoother spinner transition on startup 2021-03-09 22:59:43 -08:00
Shane Smiskol
a3556410de Spinner: wait for UI to start (#20279)
* Impose a max rate for updating spinner progress

* fix import

* Show spinner until offroad is started

* no need for time

* Fix ROOT_DIR

* Fix fb include

* fix relative path

* don't touch these files

* Close spinner after all procs have started

* don't touch file

* Move up

* Revert changes to spinner, and only sleep on final progress update

* add this back

* revert time

* test sending 100

* test sending 100

* revert makefile changes

* rm 2nd 100% update

* pass spinner to thread function

* pass ignore list

* Default to None

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

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-03-09 13:37:11 -08:00
Adeeb Shihadeh
7cfd6b1170 fix manager crash on PC after going offroad 2021-03-07 21:52:20 -08:00
Adeeb Shihadeh
745a4e884a fix uninstall after manager refactor 2021-03-07 21:02:37 -08:00
Willem Melching
5a3b511306 Manager cleanup (#20231)
* move manager in folder

* inital refactor

* call start

* small cleanup

* add comments

* use self.signal()

* order shouldnt matter

* newlines

* add helpers

* newlines

* add process config

* split out build part of manager

* this should fix most tests

* no sensord on pc

* dont start athena

* remove comment

* fix old athena test

* fix inject model

* fix test car models

* should be not none

* fix helpers exitcode

* ignore manage_athenad

* Use time.monotonic()

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* combine init, remove spinner

* move manager test

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-03-05 11:03:23 +01:00