Commit Graph

138 Commits (master)

Author SHA1 Message Date
Adeeb Shihadeh a6d4bb5d01
Add warning for unsupported NVME (#23972)
* Add warning for unsupported NVME

* fix it up

* fix typo

Co-authored-by: Comma Device <device@comma.ai>
2022-03-20 17:28:09 -07:00
George Hotz 814741dafe
thermald: use named thermal zones (#23936)
* thermald: use named thermal zones

* remove print

* and for c2

Co-authored-by: Comma Device <device@comma.ai>
2022-03-14 14:45:50 -07:00
Willem Melching da5a0c41a0
C3: detect metered Android hotspot (#23734)
* C3: detect metered networks

* show in ui

* fix text layout

* bump cereal

* revert ui changes

* set networkMetered

* add athena method

* add metered logging to uploader

* use in athena uploader

* remove param

* use networkmanager properties to set cell to unmetered

* fix indentation

* no need to check

* bump cereal

* review

* bump cereal
2022-03-09 11:36:52 +01:00
Adeeb Shihadeh 52cd58068e
thermald: use latest modem temps (#23878)
* thermald: use latest modem temps

* move that
2022-03-02 11:01:06 -08:00
Robbe Derks 8c971f24e3
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
2022-03-02 17:35:58 +01:00
Robbe Derks f539d9c0bc
fix kF value for thermal PI controller (#23871) 2022-02-27 19:51:59 +01:00
Igor Biletskyy 2629715097
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>
2022-02-07 14:32:29 -08:00
Adeeb Shihadeh e6d8a84578 for those who want to live in the moment 2022-01-31 14:30:40 -08:00
Willem Melching 1a96886dd1 thermald: increase kmsg loglevel to end up in console-ramoops-0 2022-01-24 13:19:48 +01:00
Willem Melching 850a2307d6
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
2022-01-17 12:06:37 +01:00
Willem Melching 53ca036006
thermald: let manager handle shutdown (#23528)
* thermald: let manager handle shutdown

* add warning so its actually sent
2022-01-14 14:13:32 +01:00
Willem Melching ed23177898
thermald: remove panda disconnect logic (#23526)
* thermald: remove panda disconnect logic

* keep that
2022-01-14 14:13:18 +01:00
Willem Melching e72eb1d472
thermald: remove brightness setting on ui crash (#23527) 2022-01-14 14:06:21 +01:00
Willem Melching ef3a549fac
thermald: remove modem version log (#23524) 2022-01-14 12:20:12 +01:00
Willem Melching 3ce4976db7
thermald: track engaged state in param and kmsg (#23478)
* thermald: track engaged state in param

* write in kmsg

* format string

* move to python
2022-01-10 19:54:07 +01:00
Robbe Derks 1b49ce6ec4
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>
2022-01-10 15:21:48 +01:00
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
Willem Melching a60f3c6a35
move acados deps out of devpackages (#22376)
* move acados deps out of devpackages

* fix new pylint errors
2021-09-29 23:20:33 +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