Commit Graph

112 Commits (dc96d4bee7b898172a6a15de4799af0e2d35605e)

Author SHA1 Message Date
George Hotz dc96d4bee7
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>
2021-12-28 18:07:00 +01:00
Ewout ter Hoeven 332f568a82
Pyupgrade 3.6: Update syntax with Python 3.6+ features (#23305)
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>
2021-12-24 11:18:39 -08:00
Adeeb Shihadeh aa02e05193
tici: lower offroad temp setpoint (#23177)
* tici: lower offroad temp setpoint

* Update selfdrive/thermald/thermald.py
2021-12-08 17:46:01 -08:00
Adeeb Shihadeh 4803b26352
thermald: only go offroad on falling edge of ignition (#23130)
* thermald: only go offroad on falling edge of ignition

* and

* fix taht
2021-12-04 22:17:44 -08:00
Adeeb Shihadeh b79eaca18d
updated: move update alerts out of thermald (#23028)
* updated: move update alerts out of thermald

* cleanup last update time

* set on startup
2021-12-04 22:15:55 -08: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
George Hotz 6462ced209
thermald: track power usage / pmic temps (#23013)
Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-11-23 16:08:20 -08:00
Adeeb Shihadeh 6c909ba651 better update prompt text 2021-11-17 23:28:23 -08:00
Robbe Derks 1d03f2a97b
reset on ignition edge (#22915) 2021-11-15 17:52:42 +01:00
Adeeb Shihadeh e528e2e3e2
allow update snoozing (#22876)
* allow update snoozing

* not immediately visible

* dismiss and close

* grey button
2021-11-11 15:32:25 -08:00
Robbe Derks 585c16cd2a
Multipanda support (#22402)
* squash all PR commits for easy rebase

* merged all panda rx can into one message

* fix buffers in can_send

* more cleanup and minor fixes

* fix even more stuff

* fix non-allocated send buffer

* make connecting more robust

* fix bus offset

* fix controls_mismatch?

* simplify mismatch check

* C++ style struct

* fix connect loop

* update ref

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-10-29 13:04:26 +02:00
Adeeb Shihadeh f4c2398db4
add sdcard support (#22703)
* generalize

* factory reset
2021-10-26 19:34:08 -07:00
Adeeb Shihadeh 168493767e
relax the no connectivity time to two weeks (#22607) 2021-10-18 16:58:41 -07:00
Adeeb Shihadeh d708b5b546
thermald: log screen brightness (#22570)
* thermald: log screen brightness

* bump cereal
2021-10-15 17:19:45 -07:00
Robbe Derks 91987f38d4
Make pandaState and safetyMode a list (#22454)
* wip: move to pandaStates

* bump cereal

* wip: SafetyMode struct

* move to safetyMode

* fix typo

* this can be None

* fix potential empty pandaStates list

* fix thermald

* fix controlsd

* rename safetyModes to safetyConfigs

* update process_replay

* fix test_models

* bump cereal
2021-10-08 17:54:34 +02:00
Adeeb Shihadeh 493e32431c
only run get_nvme_temps on C3 (#22464)
* only run get_nvme_temps on C3

* temperatures

* fix imports

Co-authored-by: Comma Device <device@comma.ai>
2021-10-06 20:32:22 -07:00
Willem Melching f4e2537b12
Split pandaState into peripheralState and pandaState (#22385)
* publish peripheralState from boardd

* refactor consumers

* rename thread

* peripheralState has panda type too

* add to process replay

* fix device build

* properly remove hardware unsupported alert

* latest peripheralState

* remove pandaState from thermal_monitor

* put that back

* add back harness check

* fix cloudlog

* needs pandaState

* Update selfdrive/thermald/tests/test_power_monitoring.py

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

* dont conflate

* Update selfdrive/thermald/tests/test_power_monitoring.py

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

* pigeon is peripheral

* cleanup

* less global

* comment

* move rtc to peripheral_control_thread

* better diff?

* whitespace

* get msg

* bump cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-10-04 11:30:11 +02:00
Robbe Derks 664d48fd5e
higher offroad danger temp for tici (#22363) 2021-09-29 11:45:02 +02:00
Robbe Derks da2aa12754
Modem temp is an expensive call (#22309) 2021-09-23 11:33:47 +02:00
Adeeb Shihadeh d4e867e976 thermald: remove cpr logging 2021-09-22 22:25:48 -07:00
Adeeb Shihadeh e9e490a729
add booted onroad flag (#22318) 2021-09-22 22:25:08 -07:00
Adeeb Shihadeh 212d2c3998
log nvme temp (#22296)
* log nvme temp

* fix high cpu

Co-authored-by: Comma Device <device@comma.ai>
2021-09-21 14:39:07 -07:00
Robbe Derks 6117c7ce81
Log modem temps on Tici (#22281)
* log max modem temp

* not sure what happened here

* fix this

* make modem temps a list

* this is not needed

Co-authored-by: Comma Device <device@comma.ai>
2021-09-21 14:40:05 +02:00
Adeeb Shihadeh 69fd266238
no battery (#22124)
* no battery

* little more

* used for power monitoriong
2021-09-03 22:17:57 -07:00
Robbe Derks 86bceed57d
Thermald thermal state cleanup (#21959)
* dumb controller 'tuned' on a desk

* reduce Ki

* fix prev_time bug

* reset integral on going onroad

* cleanup thermal detection logic

* more minor tuning

* use controls' PI controller

* get rid of bat_temp

* change if once more

* cleanup

* cleanup import order

* add back bat temp in this PR

* cleanup thermal status logic

* use offroad danger temp

* revert that

* use ordered dict for prev/next bands

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-09-03 17:19:11 -07:00
robbederks f539cd45c9
Smarter thermal controls for tici (#21923)
* dumb controller 'tuned' on a desk

* reduce Ki

* fix prev_time bug

* reset integral on going onroad

* cleanup thermal detection logic

* more minor tuning

* use controls' PI controller

* get rid of bat_temp

* change if once more

* cleanup

* cleanup import order

* add back bat temp in this PR

* move to constructor

* consistency

* add bp

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-08-31 12:29:53 -07:00
Adeeb Shihadeh fc8b571a84
alert for per-core cpu usage (#21983)
* thermald: per-core cpu usage

* add alert

* better alert text

* list

* fix process replay
2021-08-19 19:14:51 -07:00
Adeeb Shihadeh 116bb0b524 update tested branches 2021-07-23 15:47:00 -07:00
robbederks cbae2899df
Tici: amplifier config (#21596)
* amplifier config on boot

* add to release

* another spot

* add debug when running separately

* rename for clarity
2021-07-14 15:53:39 +02:00
Willem Melching fb8f0ac092
cloudlog modem version (#21562)
* log modem version

* whitespace
2021-07-12 15:52:09 +02:00
Adeeb Shihadeh a6efe9a6b7
remove modem logging (#21497) 2021-07-06 13:51:45 -07:00
Willem Melching ad7f0207ac
Log gpu usage (#21404)
* Log gpu usage

* 100 total

* bump cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-06-29 13:55:18 -07:00
Willem Melching eb3144ef71 use nmcli conn up lte to bring out of registered state 2021-06-25 11:00:40 +02:00
Adeeb Shihadeh 1da3ab42dc
diag logging (#21360)
* rat

* log max power

* cloudlog

* no print

Co-authored-by: Comma Device <device@comma.ai>
2021-06-23 23:53:22 -07:00
Adeeb Shihadeh a420c7ad50
remove lte toggle (#21392)
* remove lte toggle

* little more
2021-06-23 17:01:17 -07:00
Willem Melching 38380612d5 tici: toggle wwan when stuck registered 2021-06-23 12:40:21 +02:00
Willem Melching 68e562454e tici: log stuck registered 2021-06-22 15:29:02 +02:00
Dean Lee 8781f586c5
UI: refactor onboarding (#21223)
* refactor onboarding

* skip training guide if is dashcam

* apply review

* cleanup include

* move public ctro up

* slots is private

* cleanup headers

* set style sheet in onboardingwindow

* rebase master

* match ui

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-06-18 16:01:22 -07:00
Adeeb Shihadeh 96271f8bc3
log on startup if onroad flag set (#21150) 2021-06-04 22:04:26 -07:00
Adeeb Shihadeh 4e17c0b01a
add athena last ping time to deviceState (#20961) 2021-05-19 00:19:49 -07:00
Adeeb Shihadeh 2cf7ee8ced missing nvme is only offroad alert 2021-05-17 16:12:31 -07:00
Adeeb Shihadeh 313741062e
offroad alert for missing nvme (#20931)
* offroad alert for missing nvme

* remove that

Co-authored-by: Comma Device <device@comma.ai>
2021-05-17 13:35:24 -07:00
Willem Melching f6cf350d3a
thermald: fetch more detailed network info (#20928) 2021-05-17 13:10:08 +02:00
Willem Melching 4ca0edda97
Change wwan power command (#20874) 2021-05-11 16:58:45 +02:00
Adeeb Shihadeh b4447993c1
add CLEAR_ON_IGNITION param type (#20810) 2021-05-04 11:32:40 -07:00
Adeeb Shihadeh 8fb26b95e9 rate limit offroad mem logging 2021-04-28 00:09:03 -07:00
Adeeb Shihadeh 42af09b15b clear scons cache more aggressively 2021-04-27 19:16:03 -07:00
Adeeb Shihadeh 83e8ccb4ef make memory usage cloudlog an event 2021-04-27 11:27:43 -07:00
Adeeb Shihadeh 4f02b4386c log for high offroad memory usage 2021-04-25 17:48:37 -07:00
George Hotz b88aa6b57f
log /sys/kernel/debug/regulator/pm8994_s11/voltage (#20727) 2021-04-22 12:02:12 -07:00