Commit Graph

155 Commits

Author SHA1 Message Date
Shane Smiskol 5fb25ccc7d Power Monitoring test: fix exceptions (#24981)
* fix missing POWER_DRAW

* think should be 0
old-commit-hash: d693285b02a0f005ce1d29793c8672ab2fe24a24
2022-06-28 01:09:52 -07:00
Robbe Derks a6efa2c7d3 Log SOM power draw (#24975)
* log SOM power draw

* bump cereal

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 684d4b75a1c2f349da1e00dae9a40c39e3bb3607
2022-06-27 15:33:46 +02:00
Shane Smiskol fe2f1901c2 thermald: fix panda dropout when we miss a pandaStates (#24870)
immediate fix for "panda dropout"
old-commit-hash: e910ce87a44884a3f216fbced306e8d3124a04de
2022-06-15 21:42:54 -07:00
Adeeb Shihadeh 71d489a41e Revert "thermald: consider pmic in component temp management (#24708)"
This reverts commit 5ab1b471582c259a3041b00f7fcd217e7814b609.

old-commit-hash: cbd404b954b5b80b65f1ad8363b0245c3c7c7911
2022-06-13 16:38:32 -07:00
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: 0fce5d90459b77bf2cfa70f55f322f0e1fb8d01c
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: 1139fe507b01f34de9714c99228f411558b44231
2022-06-11 16:38:24 -07:00
Adeeb Shihadeh 393ce7cfeb thermald: add back panda disconnect handling (#24713)
* thermald: add back panda disconnect handling

* cleanup
old-commit-hash: 302b0ea9bbac0fec939919b0d09b604569305be7
2022-06-02 13:39:41 -07:00
Willem Melching 753045c73d less TICI when not needed (#24698)
* less TICI when not needed

* fix process replay

* move reading voltages into hw abstraction layer

* Update selfdrive/hardware/tici/hardware.h

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

* Update selfdrive/hardware/hw.h

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

* Update selfdrive/hardware/base.h

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

* rename init function

* Update selfdrive/athena/athenad.py

Co-authored-by: Robbe Derks <robbe.derks@gmail.com>

* Update selfdrive/boardd/boardd.cc

* Apply suggestions from code review

* Update selfdrive/thermald/thermald.py

* update ref

* fix alert width if all cameras are bad

* add ecam to test_loggerd

* bump cereal

* bump cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Robbe Derks <robbe.derks@gmail.com>
old-commit-hash: f49a9c9fd2100a4f1401a93d88064ddbbbd935c1
2022-06-02 15:20:51 +02:00
Jason Young e683db37b8 thermald: consider pmic in component temp management (#24708)
old-commit-hash: c8c21baf50865b0db2cc9345901bb98904cfbaaf
2022-06-02 11:58:47 +02:00
Adeeb Shihadeh 5659b6e6ce more comma two cleanup (#24300)
* more comma two cleanup

* fix up power monitoring
old-commit-hash: 6a48a7acef483907990e34e040deee70c689e700
2022-05-15 17:55:22 -07:00
Adeeb Shihadeh 3b1f479fa9 always tici
old-commit-hash: 4af943dc015551a952b508291a6dfa1d151a24b7
2022-04-26 20:02:39 -07:00
Adeeb Shihadeh db252b457a improve tici thermal control (#24228)
* improve tici thermals

* more i

* always 70
old-commit-hash: c5378cf8b923446269b7c207451a9804b6f862b0
2022-04-19 11:07:54 -07:00
Adeeb Shihadeh 5a9644261f remove comma two support (#24248)
* remove comma two support

* cleanup release files

* little more

* more libs

* no more gralloc

* add snpe back
old-commit-hash: 5c48e7bc86a621dd35f4ff25da7a26ee506bac76
2022-04-18 17:55:23 -07:00
Adeeb Shihadeh ad8e58c250 comma three: correctly set initial EPS bearer settings for AT&T sim cards (#24175)
* 3g sunset

* only for blue prime

* pass

* full att code

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: c1388636a28b880e5c9b07bcaa8fbf867e23f02a
2022-04-11 15:33:58 -07:00
HaraldSchafer 305a7a6bc9 Make PI into a PID (#24151)
* Make PI into a PID

* Cast like before
old-commit-hash: 634f7cebef415cda913517c157c0a1d025b6f2b4
2022-04-07 11:34:45 -07:00
Willem Melching 9cd2f5a7a3 Log modem version and some NV values (#24137)
* add back modem version number logging

* tici only

* log nv

* make event

* str cast
old-commit-hash: be35caca614c45f54d2e76f394b2fdecd841cb3f
2022-04-05 14:29:07 -07:00
Robbe Derks f6ebc8993b Add power usage stat (#24055)
old-commit-hash: 68f86d815ecd4573419b027df818a0a3f9442dbd
2022-03-29 11:30:13 +02:00
Adeeb Shihadeh d8b0684434 Add warning for unsupported NVME (#23972)
* Add warning for unsupported NVME

* fix it up

* fix typo

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

* remove print

* and for c2

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 814741dafe6a591b87d23d3b0aa9662a01f61634
2022-03-14 14:45:50 -07:00
Willem Melching 2eded18267 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
old-commit-hash: da5a0c41a00e4de076c2846ed54049c3dff3bc5a
2022-03-09 11:36:52 +01:00
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