Commit Graph

135 Commits

Author SHA1 Message Date
Adeeb Shihadeh a8fec54e7b thermald: use latest modem temps (#23878)
* thermald: use latest modem temps

* move that
old-commit-hash: 52cd58068e6412cdbd2d483b864c14fb942542ee
2022-03-02 11:01:06 -08:00
Robbe Derks 98caf30f9b Fan controller cleanup + testing (#23886)
* clean up fan controllers in preparation for testing

* add fan controller to release

* add some unit tests around the fan controller

* subclass ABC
old-commit-hash: 8c971f24e37024a89ab7e7c49c001f2ea0423ded
2022-03-02 17:35:58 +01:00
Robbe Derks 1edd9bfb60 fix kF value for thermal PI controller (#23871)
old-commit-hash: f539d9c0bce0b3b992ab1a3ff128de01fefa3c41
2022-02-27 19:51:59 +01:00
Igor Biletskyy 64d3fa7e64 thermald: accept ignition from any panda (#23721)
* ignition from any panda

* more elegant )

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

* typo

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 2629715097c94b11ceec2a2a5fae7daca957e42e
2022-02-07 14:32:29 -08:00
Adeeb Shihadeh c491f3fc2c for those who want to live in the moment
old-commit-hash: e6d8a845782e1b902b2966edb3c39c882e735b97
2022-01-31 14:30:40 -08:00
Willem Melching 43ec802122 thermald: increase kmsg loglevel to end up in console-ramoops-0
old-commit-hash: 1a96886dd1396f5ae52373570402f6d5819a401a
2022-01-24 13:19:48 +01:00
Willem Melching 5cb4528fc3 thermald: move dbus and other slow calls into thread (#23525)
* split thermald in threads

* small cleanup

* type

* already done that

* add none check

* fix sleep

* shut down on exception
old-commit-hash: 850a2307d621c7c4528cb1fef6b5bee6a13197ad
2022-01-17 12:06:37 +01:00
Willem Melching 4c5a5581db thermald: let manager handle shutdown (#23528)
* thermald: let manager handle shutdown

* add warning so its actually sent
old-commit-hash: 53ca0360061ca890a5354650fdc06b0bb42d3b9b
2022-01-14 14:13:32 +01:00
Willem Melching 6346a84060 thermald: remove panda disconnect logic (#23526)
* thermald: remove panda disconnect logic

* keep that
old-commit-hash: ed231778982a2f8087c3eb378a6dec0fdbc09266
2022-01-14 14:13:18 +01:00
Willem Melching f6ba27a1ea thermald: remove brightness setting on ui crash (#23527)
old-commit-hash: e72eb1d472fcd1f12b6e05c547a225bdd1cf5cd4
2022-01-14 14:06:21 +01:00
Willem Melching 0e06079700 thermald: remove modem version log (#23524)
old-commit-hash: ef3a549fac65f9e3b33ec0c29434c5f51f7c6fdf
2022-01-14 12:20:12 +01:00
Willem Melching efc06c6290 thermald: track engaged state in param and kmsg (#23478)
* thermald: track engaged state in param

* write in kmsg

* format string

* move to python
old-commit-hash: 3ce4976db79fde95264f114b61d6be025aec9a71
2022-01-10 19:54:07 +01:00
Robbe Derks 323febbf37 Statsd (#23413)
* device side of statsd

* need to start it

* enable in manager

* add sleep

* cleanup

* remove aggregates for now and standardize on industry terms

* manager needs main

* need to have a try/except

* atomic_write_on_fs_tmp does not work

* cleaner

* use dump

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

* one file at a time

* limit amount of files

* move to influx line protocol and cleanup

* needs to be a list

* fix timezone bug

* actually rate limit

* add to release

* normalized origin

* also log deviceType

* more stats

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 1b49ce6ec401966b0c56f62ea2b71209e9d4075b
2022-01-10 15:21:48 +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: dc96d4bee7b898172a6a15de4799af0e2d35605e
2021-12-28 18:07:00 +01:00
Ewout ter Hoeven f206ebd054 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>
old-commit-hash: 332f568a8241fba9459cb70c76840b9670e6993a
2021-12-24 11:18:39 -08:00
Adeeb Shihadeh dc273557ba tici: lower offroad temp setpoint (#23177)
* tici: lower offroad temp setpoint

* Update selfdrive/thermald/thermald.py
old-commit-hash: aa02e05193a247fe6fc14d494245e9126e7d2e96
2021-12-08 17:46:01 -08:00
Adeeb Shihadeh 2f51cbab73 thermald: only go offroad on falling edge of ignition (#23130)
* thermald: only go offroad on falling edge of ignition

* and

* fix taht
old-commit-hash: 4803b26352ce691b22b371e9d5140c61646d4964
2021-12-04 22:17:44 -08:00
Adeeb Shihadeh fc641646ed updated: move update alerts out of thermald (#23028)
* updated: move update alerts out of thermald

* cleanup last update time

* set on startup
old-commit-hash: b79eaca18df6535066a23a128d124f75e8bb6bdd
2021-12-04 22:15:55 -08: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: f7c46c694985456e569ce2313b29e43607c62a12
2021-11-29 19:38:55 +01:00
George Hotz 5d990ad509 thermald: track power usage / pmic temps (#23013)
Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 6462ced209fe545c2354c0d04bee98767a03eea7
2021-11-23 16:08:20 -08:00
Adeeb Shihadeh 1d7184d160 better update prompt text
old-commit-hash: 6c909ba651d3d7199c8b8a4c529de84001f4f943
2021-11-17 23:28:23 -08:00
Robbe Derks bad079992c reset on ignition edge (#22915)
old-commit-hash: 1d03f2a97bb0a95fdc701fed4a03cc061f792c92
2021-11-15 17:52:42 +01:00
Adeeb Shihadeh 29f6b5cb98 allow update snoozing (#22876)
* allow update snoozing

* not immediately visible

* dismiss and close

* grey button
old-commit-hash: e528e2e3e2760c52266b126a803a0f7bb872cf3d
2021-11-11 15:32:25 -08:00
Robbe Derks dbe4641e04 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>
old-commit-hash: 585c16cd2aba6e2504c2427aaf1855b97035eb41
2021-10-29 13:04:26 +02:00
Adeeb Shihadeh 4099783375 add sdcard support (#22703)
* generalize

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

* bump cereal
old-commit-hash: d708b5b5464811dc6b58b7e88dfe614f90170723
2021-10-15 17:19:45 -07:00
Robbe Derks 58c99158a1 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
old-commit-hash: 91987f38d425e2a5dc61d09571933cffb9536113
2021-10-08 17:54:34 +02:00
Adeeb Shihadeh afe88f7552 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>
old-commit-hash: 493e32431c721aa92c2f53800109155284928969
2021-10-06 20:32:22 -07:00
Willem Melching 11066c6236 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>
old-commit-hash: f4e2537b124d3d1c0d697a12d8b243b54b76501b
2021-10-04 11:30:11 +02:00
Willem Melching 8aa225b3f9 move acados deps out of devpackages (#22376)
* move acados deps out of devpackages

* fix new pylint errors
old-commit-hash: a60f3c6a35736d39a4ad73e69b5c91c47279d934
2021-09-29 23:20:33 +02:00
Robbe Derks 04d8197e1c higher offroad danger temp for tici (#22363)
old-commit-hash: 664d48fd5e2c767bbc37924a3b4ea3524acdfd01
2021-09-29 11:45:02 +02:00
Robbe Derks df273353c5 Modem temp is an expensive call (#22309)
old-commit-hash: da2aa127541ef1beebc33692891bebc0c1e9f257
2021-09-23 11:33:47 +02:00
Adeeb Shihadeh ad04fa8625 thermald: remove cpr logging
old-commit-hash: d4e867e976d98cbb0d4e1403d227159f2a8b44df
2021-09-22 22:25:48 -07:00
Adeeb Shihadeh cadba6f36c add booted onroad flag (#22318)
old-commit-hash: e9e490a72933e81a190d7d7bbb94661864270885
2021-09-22 22:25:08 -07:00
Adeeb Shihadeh f53a09f40e log nvme temp (#22296)
* log nvme temp

* fix high cpu

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 212d2c3998852d4eb374e54479f79078b10c2762
2021-09-21 14:39:07 -07:00
Robbe Derks 4827dea04c 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>
old-commit-hash: 6117c7ce816f8896702ac4810ff8d421d2f6f224
2021-09-21 14:40:05 +02:00
Adeeb Shihadeh 50ea63cb76 no battery (#22124)
* no battery

* little more

* used for power monitoriong
old-commit-hash: 69fd26623846e6b82bfa4cb022bc84a8f2df1771
2021-09-03 22:17:57 -07:00
Robbe Derks a6e6667a3a 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>
old-commit-hash: 86bceed57da78ff6b182d6dae46556958df28494
2021-09-03 17:19:11 -07:00
robbederks f8085a47ef 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>
old-commit-hash: f539cd45c99034d379c797bb7faeb0e0dc44899e
2021-08-31 12:29:53 -07:00
Adeeb Shihadeh ac8b08fa0c alert for per-core cpu usage (#21983)
* thermald: per-core cpu usage

* add alert

* better alert text

* list

* fix process replay
old-commit-hash: fc8b571a847f1a89abb331eef8f85f310453fd77
2021-08-19 19:14:51 -07:00
Adeeb Shihadeh 54270d569c update tested branches
old-commit-hash: 116bb0b52486d5b5d5fcf682b1353d48126ea157
2021-07-23 15:47:00 -07:00
robbederks 6e867a05cf Tici: amplifier config (#21596)
* amplifier config on boot

* add to release

* another spot

* add debug when running separately

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

* whitespace
old-commit-hash: fb8f0ac09213014095358f937e7be2b2d22bb4c6
2021-07-12 15:52:09 +02:00
Adeeb Shihadeh f725c5dc2a remove modem logging (#21497)
old-commit-hash: a6efe9a6b7b3bd054822c2fe71329939d30d1fef
2021-07-06 13:51:45 -07:00
Willem Melching 30fff7fead Log gpu usage (#21404)
* Log gpu usage

* 100 total

* bump cereal

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

* log max power

* cloudlog

* no print

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 1da3ab42dc9cc87a9477d5b2d74165ec826f0a53
2021-06-23 23:53:22 -07:00
Adeeb Shihadeh 784601c8e1 remove lte toggle (#21392)
* remove lte toggle

* little more
old-commit-hash: a420c7ad50eec716e53537957b1439b2ce44d73e
2021-06-23 17:01:17 -07:00
Willem Melching 1966c6d908 tici: toggle wwan when stuck registered
old-commit-hash: 38380612d5372b8e4949a50d3c7db9da840eea32
2021-06-23 12:40:21 +02:00