Commit Graph

13 Commits (8674b023bab2b44405139ceec5785a389f837682)

Author SHA1 Message Date
Adeeb Shihadeh 8674b023ba
HW abstraction layer (#19530)
* start hw refactor

* move that

* pins

* put that back
2020-12-16 21:30:23 -08:00
robbederks e64484aecd
Move thermald hardware calls into HW abstraction layer (#2630)
* abstracted away hardware calls

* oopsie

* remove bugs

* remove bugs #2

* fix unit test

* removed print

Co-authored-by: Comma Device <device@comma.ai>
2020-12-02 15:20:57 +01:00
Adeeb Shihadeh 47c21f10f5
grey panda is unsupported (#2458) 2020-11-03 19:56:25 -08:00
Willem Melching 73a2067be3
Get power usage from current sensor (#2192) 2020-09-18 12:25:55 +02:00
robbederks 7555379b2b
Car power integrator + power management refactor (#1994)
* wip, ready to test

* tweaks

* fix

* fix

* fix power monitoring

* fix param writing

* no forced charging on high voltage

* reset capacity on reboot

* don't shutdown unless started seen

* fix unused var warning

* fix linting errors

* time is always valid

* QCOM gate

* Local params

* decimate saving

* fix linting

* rename param

* Log car battery capacity

* fix put_nonblocking

* Added some unit tests

* Add test to docker test list

* fix precommit

* cleanup

* run tests in CI

* bump cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-08-17 11:56:27 +02:00
Adeeb Shihadeh 897ee6bd2b
Use a monotonic clock source for power monitoring (#1861) 2020-07-12 01:46:02 -07:00
Willem Melching 843a64c72f
Make pylint more strict (#1626)
* make pylint more strict

* cleanup in progress

* done cleaning up

* no opendbc
2020-06-02 16:29:32 -07:00
robbederks 15f57c4c22
Added value-error for negative integration (#1390) 2020-04-17 14:05:43 -07:00
Willem Melching 017b1f6770
Don't use battery temperature to determine fan type (#1331)
* Don't use battery temperature to determine fan type

* Add cloudlog

* Init is_uno
2020-04-07 19:18:14 -07:00
Willem Melching b16e11cde5
Boardd should always send health, even with no panda (#1322)
* dont go offroad when health times out

* always send health packet

* Handle disconnect in thermal

* Handle unplug in power monitoring

* Small cleanup

* Remove copied code

* Add mutex

* Can just use infinite timeout. It will still return if not connected
2020-04-06 16:01:42 -07:00
robbederks 905f6b1b77
Power monitoring fix (#1269)
* Release lock after exceptions

* No pulsed measurement on uno

* Fix last_measurement_time=None while integrating when going offroad

* Also clear next pulsed measurement time

* Move around locks

* Locks are good now?
2020-03-23 18:02:53 -07:00
Willem Melching 65ad31a7e4 Small thermald cleanup 2020-03-12 11:55:33 -07:00
robbederks 992be20d63
Offroad power monitoring (#1067)
* Untested implementation of offroad power monitoring

* Fixed some syntax errors

* Cast to int

* Fixed pylint

* Wrapped in class

* Put pulsed calc in own thread

* Longer timeout before starting pulse measurement

* Fudge factor + flake8

* Made integration thread-safe and catch charge disable exceptions

* Catch all calculation errors

* Fixed networkstrength removal
2020-03-10 22:18:48 -07:00