Commit Graph

138 Commits (master)

Author SHA1 Message Date
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
robbederks 4a24d389c4
Add harness connection as requirement for powerdown (#21087)
* add harness connection as requirement for powerdown

* fix unittests
2021-05-31 13:32:26 +02:00
Adeeb Shihadeh 4e17c0b01a
add athena last ping time to deviceState (#20961) 2021-05-19 00:19:49 -07:00
Willem Melching 147ffb1441
Also shutdown after one hour after not going onroad (#20949) 2021-05-18 15:35:02 +02: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
robbederks 13a6e3c68f
add lower limit to prevent triggering on power loss (#20720)
Co-authored-by: Comma Device <device@comma.ai>
2021-04-21 13:15:44 +02:00
Adeeb Shihadeh 2eac604993
lte toggle (#20683) 2021-04-14 21:19:06 -07:00
Adeeb Shihadeh b0bd123445
tici power saving (#20644)
* start power saving

* set power save in thermald

Co-authored-by: Comma Device <device@comma.ai>
2021-04-12 01:40:58 -07:00
Adeeb Shihadeh 14295e9203 reduce STATUS_PACKET logging frequency to every 10 minutes 2021-04-08 22:50:11 -07:00
Willem Melching ae094042ad
add putBool/getBool wrappers to cython params class (#20611)
* add putBool/getBool wrappers to cython class

* use new API

* some more puts

* fix mockparams arguments

* add get_bool to MockParams

* typo
2021-04-07 15:36:37 +02:00
Willem Melching 2a5d8b6f74
Remove oneplus fan support (#20520) 2021-03-29 14:37:52 -07:00
Willem Melching 611446edd4 CPR3 logging only on C2 2021-03-29 12:01:28 +02:00
Adeeb Shihadeh f89818b2d9
log cpr voltages (#20519) 2021-03-28 21:22:31 -07:00
Greg Hogan 3d48bd934d
log to file and send through athena (#20250)
* log to file and send through athena

* rename logging level

* pass thru log formatter

* logMessage is TEXT

* send queue always strings

* switch to xattr and lower priority queue

* enable cloud logging for devices

* time or size based log rotation

* basename -> dirname

* remove HARDWARE.get_cloudlog_enabled

* fix errors

* fix another exception

* xattrs need to be bytes

* sending works

* cleanup files at start

* add id and adjust formatting

* do not send active log file

* better names

* separate log formatters

* fix formatter super init

* fix log file order

* ensure file always has file formatter

* i see why there was no formatter

* apply same formatting to cpp log msgs

* apply same formatting to cpp log msgs

* update queue names in tests

* strip deprecated keys in STATUS_PACKET

* strip DEPRECATED from dict recursively

* athena log queue test

* instanceof instead of type

* isinstance instead of type

* use super

* remove logentries

* last_scan param unused

* comment about special log msg attr names

* add dict_helpers.py to release files

* use monotonic time and counter for log rotation

* update for adjusted log file naming

* use monotonic clock for tracking last log file scan
2021-03-25 13:30:09 -07:00
Willem Melching 0072f71fb4
only do hardware supported check if PandaState is not None (#20385) 2021-03-17 14:19:55 +01:00
Adeeb Shihadeh 8c207d3cd5 only show EON charge alert on EONs 2021-03-08 17:00:58 -08:00
Adeeb Shihadeh 167fa565c0 default this on 2021-03-01 12:14:29 -08:00
Adeeb Shihadeh f7019a6a2c
add file to disable lte while onroad (#20163)
Co-authored-by: Comma Device <device@comma.ai>
2021-02-25 21:10:10 -08:00
robbederks 4c243da019
Turn up brightness a little when UI crashes (#20142)
* implement ui check and brightness set in thermald

* fix bugs

* only set once

* duh

* forgot factor for tici
2021-02-24 15:25:06 +01:00
Greg Hogan 7cc0999aeb fix pylint errors 2021-02-23 13:58:58 -08:00
robbederks 8ad1c793d1
Fix tici powerdown and add support for forcing (#20132)
* also shutdown on tici

* force powerdown

* bump panda

* abstract out shutdown and thermal config

* add comment on tici shutdown

Co-authored-by: Comma Device <device@comma.ai>
2021-02-23 17:04:10 +01:00
Adeeb Shihadeh f28673e8b5
fix apk after cereal cleanup (#20098)
* actually a percent

* update apk

* update refs
2021-02-19 12:19:29 -08:00
Adeeb Shihadeh 312b681a46
cereal cleanup part 2 (#20092)
* car stuff

* thermal

* Revert "car stuff"

This reverts commit 77fd1c65eb.

* panda state

* camera stuff

* start deg

* most is building

* builds

* planner + controls run

* fix up paramsd

* cleanup

* process replay passes

* fix webcam build

* camerad

* no more frame

* thermald

* ui

* paramsd

* camera replay

* fix long tests

* fix camerad tests

* maxSteeringAngle

* bump cereal

* more frame

* cereal master
2021-02-16 21:39:32 -08:00
Adeeb Shihadeh 4ace476f14 fanSpeedRpmDesired -> fanSpeedPercentDesired 2021-02-11 17:00:26 -08:00
Adeeb Shihadeh fe7f3f0ec6
remove gpsd (#20027) 2021-02-10 16:39:39 -08:00
Adeeb Shihadeh 000bd226aa
Cereal cleanup (#20003)
* start cleanup

* fan speed

* cleanup dm

* fix cereal

* hwType -> pandaType

* update refs

* update refs

* bump cereal

* freeSpacePercent

* cereal master
2021-02-03 19:57:30 -08:00
Adeeb Shihadeh 449e60cb82 skip dashcam3 build for now 2021-02-01 21:14:02 -08:00
Adeeb Shihadeh 758794dec5 few fixes from LGTM 2021-01-16 14:23:06 -08:00
Willem Melching 0cdb9e8658
Fix battery voltage reading (#19699)
* tici: correct battery voltage

* read current

* use current too
2021-01-08 17:21:58 +01:00
Adeeb Shihadeh ffa7e0cbdb
manager tests + make all processes exit cleanly (#19595)
* manager tests

* logcatd exits cleanly

* sigint

* boardd

* multiple dbus connections hangs for some reason

* clocksd proclogd

* network type from thermal

* fix tests

* fix android logcatd

* fix mac

* fix mac proclogd

* move on device athena tests

* build first

* build first

Co-authored-by: Comma Device <device@comma.ai>
2020-12-29 22:32:03 -08:00
Adeeb Shihadeh 41b31a1756
don't go onroad if internet needed (#19572) 2020-12-21 15:13:20 -08:00
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
George Hotz 917eff8c30
New settings for governors, +30% memory bandwidth (#2590)
* new settings for governors, +30% memory bandwidth

* CPU waste is better

* warm up frame_drop

* optional CORE arg for rtshield

* back off priorities of processes not critical to driving

* if it doesn't drive, it's not realtime

* err, resource. this should have been included

* reverse order to not spike

Co-authored-by: Comma Device <device@comma.ai>
2020-11-20 19:25:12 -08:00
Willem Melching ff65dc1401
Stricter check on date for RTC time sync (#2582)
* More strict check on time

* Also update thermald
2020-11-20 11:47:39 +01:00
Adeeb Shihadeh 30112f9add don't show unspported alert with no health packet 2020-11-08 15:22:27 -08:00
Adeeb Shihadeh 47c21f10f5
grey panda is unsupported (#2458) 2020-11-03 19:56:25 -08:00
Willem Melching 77d9a68f5d
only log startup blocked on conditions changed (#2382) 2020-10-21 15:14:29 +02:00
Adeeb Shihadeh 4c4b53beda
prevent snapshot while onroad (#2366)
* prevent snapshot while onroad

* fix offroad check
2020-10-20 14:04:18 -07:00
Willem Melching a1fd08c1e1
Add logs for why start was blocked (#2312) (#2346)
* Add logs for why start was blocked

* adding wrapper and prev offroad alert state

* Small updates and fixes

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

* Moving to dict of startup conditions

* Fixing dict access

* add type for dict

* remove global

* Use cloudlog event

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

* Fix driverview and snapshot start

* not always log

* Cleanup update alerts

* Only ignition needs init

* Fix typing

Co-authored-by: Logan Lasiter <lasiterlogan@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-10-15 15:47:38 +02:00
Adeeb Shihadeh 81763a18b5
fix not going onroad on clean dashcam install (#2280) 2020-10-06 11:10:45 +02:00
vanillagorillaa c35af4b619
Typo: thershold -> threshold (#2230) 2020-09-25 22:50:55 -07:00
Willem Melching 73a2067be3
Get power usage from current sensor (#2192) 2020-09-18 12:25:55 +02:00
Willem Melching 4891d3787a
Wait 5 minutes after offroad before changing thresholds (#2113) 2020-09-01 11:25:04 +02:00
Willem Melching c7152d5419
Hardware abstraction class (#2080)
* hardware abstraction class

* De Morgan

* Rename pc hardware class

* Fix sound card in controlsd

* Pc get sim info

* fix hardware in test

* two more

* No more random imei on android

* no randomness on android

* Need to return something that looks like imei for registration to work

* Return proper network strength

* Unused import

* Bug fixes + gpsd is only android
2020-08-26 14:57:17 +02:00
Willem Melching 6bb2630eba
Pandad: turn on panda power (#2073)
* pandad turn on panda power

* Add gpio.py

* needs bytes

Co-authored-by: Comma Device <device@comma.ai>
2020-08-24 16:56:29 +02:00
Willem Melching 9eb3d89ca2
Thermald cleanup (#2049)
* Thermald cleanup

* no Temps, fix ui formatter

* Fix scaling

* Don't touch that

* typo

* Fix fan control

* Fix if

* change cereal

* Update comment
2020-08-24 14:17:41 +02:00
Adeeb Shihadeh 2476ea213c clip carBatteryCapacity to 0 2020-08-19 12:34:49 -07:00
Adeeb Shihadeh 266ef886dd add a sleep after cloudlog 2020-08-18 11:52:01 -07:00
Adeeb Shihadeh a46d2f5b17 log when thermald shuts down device 2020-08-18 07:45:20 -07: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
Willem Melching e909fddac0 Force battery temperature to 0 on comma two 2020-08-12 16:36:17 +02:00
Adeeb Shihadeh 8e63f06540
Alert when updated consistently fails (#2013)
* alert when update fails more than 10 times

* bring over offroad alert refactor from other branch

* and we have tests

* use it in snapshot

* bump apk

* don't show exceptions on release branches

* only write when changed

* why does delete use so much cpu

* clean that up

* little more
2020-08-11 16:23:57 -07:00
Adeeb Shihadeh 897ee6bd2b
Use a monotonic clock source for power monitoring (#1861) 2020-07-12 01:46:02 -07:00
Willem Melching 10bfbaff8e Lower max CPU temp to go onroad to 70 C 2020-07-06 13:37:09 +02:00
robbederks df86c476c7
Dos (#1795) 2020-06-29 12:47:48 +02:00
Willem Melching 3c5c8c2508 lower temperatures slightly until UI/modeld GPU interaction is improved 2020-06-23 19:02:42 -07:00
Willem Melching 955d2aefdd
Cool down device before going onroad if CPU temp over 75 C (#1688)
* Block going onroad when temperatures are too high

* add relay check
2020-06-12 15:03:32 -07:00
Willem Melching c82fda995b Increase temperature range 2020-06-10 17:20:39 -07:00
Adeeb 367155168a
Update Flake8 config (#1624)
* update flake8 checks

* add E502

* no whitespace warnings

* fix violations

* no W391

Co-authored-by: Jason Young <jason@comma.ai>
2020-06-03 16:13:34 -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
Adeeb d9bf9f0a40
Enable more flake8 checks (#1602)
* enable some more flake8 checks

* some more quick ones

* bump opendbc

* e401

* e711 e712

* e115 e116

* e222

* e301

* remove that

* e129

* e701 e702

* e125 e131

* e227

* e306

* e262

* W503

* e713

* e704

* e731

* bump opendbc

* fix some e722
2020-05-30 20:14:58 -07:00
William aef01f4bdf
Shebang Fix (#1477)
* Shebang Fix

Per George's "I'd merge a PR replacing the 4 python3.7 with python3" on Discord. George updated Python to 3.8.2 for webcam tools, which broke manager from launching. Instead of chasing the exact version, it seems more reasonable to fall back to 3.

* More Python3.7's
2020-05-08 18:08:11 -07:00
Willem Melching 2ea494ed52
Wait 5s before going offroad after panda disconnect (#1406)
* wait 10s before going offroad after panda disconnect

* Add cloudlog

* Typo

* 5 s
2020-04-20 14:15:01 -07:00
robbederks 15f57c4c22
Added value-error for negative integration (#1390) 2020-04-17 14:05:43 -07:00
ZwX1616 133b1a20b4
RHD support for driver monitoring (#1299) 2020-04-15 16:48:44 -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
Willem Melching b497a01417
add low pass filter on cpu temp (#1305) 2020-04-01 15:58:40 -07:00
eFini 106be23c4e
use put_nonblocking when possible (#1288)
* use put_nonblocking when possible

* revert uneeded changes
2020-03-31 12:09:38 -07:00
Andy 54f34abdb3
Replace usages of datetime.now() with datetime.utcnow() (#1267) 2020-03-26 19:49:58 -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