Commit Graph

258 Commits

Author SHA1 Message Date
Dean Lee
405df8b165 Params: python-like interface (#20506)
* rebase master

* delete outdated test_params.c

* putBool & more robust getBool

* putBool(SshEnabled)
old-commit-hash: 98e55996f67aaaf715c941d417ae4d3b0187f388
2021-03-30 12:54:59 +02:00
Dean Lee
c5194fcb85 Qt: show username for current SSH keys (#20508)
* Show username for current SSH keys

* Update ssh_keys.cc

* Update ssh_keys.cc

* Update selfdrive/ui/qt/widgets/ssh_keys.cc

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

* rename param

* cleanup

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 5cd676797a21215dcf574d545f38ec2e1a0b14f0
2021-03-28 22:32:33 -07:00
Greg Hogan
f0b9176bd7 logging cleanup (#20502)
* switch some uploader messages to debug log

* use allow_sleep

* log when not request or response

* test both with params and without params
old-commit-hash: 1e3f8b014ef63f5e3d0a3f7622a03892dd8958b2
2021-03-26 17:36:01 -07:00
Willem Melching
8c296312e3 Cache prime/points widget (#20497)
* cache prime status on homescreen

* use stacked widget

* add caching and clear on 404
old-commit-hash: d43d62561063c4d3f8b10b08d7bde9ed8bd0f395
2021-03-26 14:53:12 +01:00
Dean Lee
ae8893a77f Qt: cache home screen state (#20395)
* cache drive stats

* don't parse response if it's the same as previous

* remove blank line

* cleanup

* update stats in place

* validate json

* add DriveStats to params.pyx

* cleanup

* cleanup

* remove //#include

* simplify

* add cache to RequestRepeater

* rename CachedDriveStats to ApiCacheDriveStats

* rename ApiCacheDriveStats to ApiCache_DriveStats

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 80ae6a7e1b1d1ec231c4719b677fd08b22818ce1
2021-03-26 13:29:30 +01:00
Adeeb Shihadeh
0d5dec9276 updated: log git diff on overlay init (#20476)
* updated: log git diff on overlay init

* add git diff param

* params
old-commit-hash: bcb6879199948c21f1ebef9afc2a63f433309c00
2021-03-25 16:16:12 -07:00
Greg Hogan
183d9f98a1 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
old-commit-hash: 3d48bd934d6c84a5352c2a1d56e6f93ed59e28c4
2021-03-25 13:30:09 -07:00
HaraldSchafer
eae1fa481c New KL model + laneless toggle (#20454)
* New model: 0bf38240-6b55-42b0-bcfb-da08ff5cd0b9/650

* laneless baby

* hardcode model difference for now

* kale toggle

* kale emoji

* sensible description

* make clear it is not just for ui

* emojis dont work yet

* 9671a8fe-539f-4a04-a163-54571df21139/650

* new model

* only read param on rising edge of ignition

* update toggle text

* fix that

* update refs

Co-authored-by: mitchell <mitchellgoffpc@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 7ee79c99236f749d02a6779b006ee1ab187e0612
2021-03-24 01:10:31 -07:00
Adeeb Shihadeh
5cfc42911b Remove lane change toggle and default LDW to off (#20442)
* remove lane change toggle and default LDW to off

* update refs
old-commit-hash: 43ce7165c4eee9af167a650decdb8c3f11195d8d
2021-03-22 20:55:57 -07:00
Adeeb Shihadeh
1a0ac978ec record front lock (#20400)
* record front lock

* only if set

* add to internal installer

* move that

* change that bck

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: b60cd8d0a0a03b3c1f9f06cba1650a9afe8eb772
2021-03-18 20:15:51 -07:00
Shane Smiskol
d670eb4125 Spinner: wait for UI to start (#20279)
* Impose a max rate for updating spinner progress

* fix import

* Show spinner until offroad is started

* no need for time

* Fix ROOT_DIR

* Fix fb include

* fix relative path

* don't touch these files

* Close spinner after all procs have started

* don't touch file

* Move up

* Revert changes to spinner, and only sleep on final progress update

* add this back

* revert time

* test sending 100

* test sending 100

* revert makefile changes

* rm 2nd 100% update

* pass spinner to thread function

* pass ignore list

* Default to None

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

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: a3556410deb187d7efd95631c970fc90d6861228
2021-03-09 13:37:11 -08:00
robbederks
0f73681f8d 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>
old-commit-hash: 8ad1c793d1c4fbb37d763b40750561ad3aca137e
2021-02-23 17:04:10 +01:00
Adeeb Shihadeh
3ede01fb14 agnos 0.6 (#20077)
* updates for agnos 0.6

* timezone

* bump version
old-commit-hash: d169914674f428f0355c0ec456ed9336fce500a1
2021-02-18 18:14:34 -08:00
HaraldSchafer
8bb63abe4f fixup ui (#20049)
* fixup ui

* works

* new formate

* more cleanup

* works I assume we need a library somehow

* more readable

* fix lead sign

* put on road

* transformations lib

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: ab0456c0eb41090fd9292d8643975e93983ae85e
2021-02-09 17:23:46 -08:00
Willem Melching
17d5446650 Timezoned (#19960)
* untested code

* add to manager

* whitespace

* only save on fix

* cleanup

* fix typo

* add to ignored processes

* import tici

* fix param name

* cleanup

* only run offroad

* use itertools

* wait for thermald

* simpler

* fall back to api call

* add param to override timezone

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 4c04e220a15c013c86d2d1695764fc339b82c2bc
2021-02-06 11:07:37 +01:00
Shubham Dhumal
cf03d69f71 Fix jwt.encode return type (#19776) (#19958)
* Fix for issue #19776

PyJWT 2.0.0 does not return `bytes` for `encode()` instead returns `str`. So converted the `str` to `bytes` and returned the resulting value

* added check for jwt.encode return type

* Update __init__.py

* Updated with suggested change

* Test to check return type of get_token() 

The `get_token()` must return a `str` but for PyJWT version < 2.0.0 the `jwt.encode()` returns `bytes`. This test is to make sure if token returned by `get_token()` is `str`.

* Update test_get_token.py

* Update test_get_token.py

* Delete test_get_token.py

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 236743a4e2499c29e6651f6231c5734ccc6d213f
2021-02-02 15:36:04 +01:00
Greg Hogan
09f27c5b8e vision-only radar toggle (#19849)
old-commit-hash: 767ada98c750a4d2bf2bbf36dc6dbc869123090f
2021-01-27 14:15:59 +01:00
Greg Hogan
668949dca7 params helpers (#19788)
* params helpers

* add validation
old-commit-hash: 1dd3a1e8614e9d045ad9a80ec065f49139e1b78b
2021-01-19 14:39:00 -08:00
grekiki
0c141e45aa Qt offroad: pairing (#19675)
* kind of works now

* QR code is now on screen

* testing is needed

* works, waiting for server update

* reduce diff

* refactoring part1

* refactor part2

* refactor part3

* works on PC

* fix build, annoying bug though...

* git is annoying

* more classes, still crashes after a while

* better style

* clearer qr code

* less code and test new ssh key

* no more AA

* rename and collect garbage

* no pairing widget without the internet connection

* No network connection

* more logs

* refactor the network calls

* no more leaking

* works

* cleanup

* spaces

* works on device

* fix merge

* don't run if screen is off

* always initialized

* stats updating, not running without scrren

* formatting

* nicer QR code

* ensure the registration

* no qr code if no IMEI or no HWSerial

* all works

* refactor

* better networking

* all functionality seems to work

* small cleanup

* get serial once

* Small cleanup

* No internet text

* Don't crash if private key not found

* no network should say so

* new qr code every 30 minutes

* 20FPS sidebar

* more responsive networking and QR

* more logs

* no log spam

* fix merge

* no running onroad

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 10bd761cd6fb59f8113f88cc4dc764fbc4f5abf2
2021-01-18 12:07:55 +01:00
HaraldSchafer
c6d9b9565a Mpc rework2 (#19660)
* start again

* need that too

* this actually works

* not needed

* do properly

* still works

* still works

* still good

* all G without ll

* still works

* all still good

* cleanup building

* cleanup sconscript

* new lane planner

* how on earth is this silent too....

* update

* add rotation radius

* update

* pathplanner first pass

* misc fixes

* fix

* need deep_interp

* local again

* fix

* fix test

* very old

* new replay

* interp properly

* correct length

* another horrible silent bug

* like master

* fix that

* do doubles

* different delay compensation

* make robust to empty msg

* make pass with hack for now

* add some extra

* update ref for increased leg

* test cpu usage on this pr

* tiny bit faster

* purge numpy

* update ref

* not needed

* ready for merge

* try again after recompile

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 158210cde8e689daa04bcaa1e502727cf7bfddb6
2021-01-14 18:43:50 -08:00
Dean Lee
4c1919f41e merge utilpp.h into util.h (#19710)
old-commit-hash: 595830135bb79c8b23eb8339ae768ca7b6a822f8
2021-01-10 14:57:32 -08:00
Adeeb Shihadeh
c55926c7b8 lgtm fixes (#19610)
* pass matrices by reference

* suppress that

* destructor

* that's wrong, suppress it
old-commit-hash: 4096f86e210e7caa94e7be2edfd1eb2c247175e8
2020-12-28 20:36:23 -08:00
Adeeb Shihadeh
eb0fd3eaac fix startup spinner for non-C2 (#19536)
* limit build progress

* cleanup

* types

* comment
old-commit-hash: 71d317872a8df87e571a9078d874e776400df930
2020-12-18 14:47:25 -08:00
grekiki
9f0611507e Qt Offroad stats (#19498)
* probably broke a lot, need the commit though

* finally works

* make it work...

* ...

* kind of works

* better styling

* all should work

* tiny cleanup

* temp

* looks nicer

* create JWT in C++

* kilometers -> km

* use correct free methods

* dont put code in assert statement

* Build JWT payload dynamically

* get dongle id once

* include cleanup

* Remove qDebug

* Update drive_stats.cc

Github is a nice editor :)

* swap week and all and fix sconscript

* install openssl

* openssl include dirs on mac

* is this where openssl is?

* It's here

* small cleanup

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 5b26c97141b65e3bcbddaec7e6526d5f2f1c910e
2020-12-18 13:29:20 +01:00
Adeeb Shihadeh
349429836c agnos updater (#2600)
* agnos updater

* add manifest

* fix path

* get manifest from overlay

* update manifest

* remove merge markers

* add streaming decompressor

* dont need read all

* Unsparsify

* Fix output filename

* Optimization

* cleanup

* Small cleanup

* Read manifest from merged overlay

* Write hash at end of partition

* Sync before writing hash

* Write bytes in file

* add manifest with image sizes

* Fix manifest path

* File was closed already

* Format string

* Put raw hash

* Read hashes in launch script

* update launch script

* should be agnos version

* fix slot

* Make sure we clear the hash

* Verify partition size

* move updated

* Standalone flasher

* Don't rely on ordering

* Get path

* Debug log

* Download agnos

* Info is enough

* update manifest

* Remove f

* Check downloader return code

* Exit on wrong manifest

* Fix typos

* Set pythonpath before hardware init

* move agnos into hardware folder

* remove comments

* Fix abstractmethod

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: b276881fcdb95b6160bae23600ed204f521bdbb4
2020-12-18 13:17:12 +01:00
Adeeb Shihadeh
b950cab874 HW abstraction layer (#19530)
* start hw refactor

* move that

* pins

* put that back
old-commit-hash: 8674b023bab2b44405139ceec5785a389f837682
2020-12-16 21:30:23 -08:00
Adeeb Shihadeh
d5ad6237cf Revert "Handle python-dbus not installed"
This reverts commit fd22f01b1f21005846bef211851d17f602a7c600.

old-commit-hash: a2c6fdd14ce9ef1dfa59db6de91ebf863920d381
2020-12-15 20:29:24 -08:00
Adeeb Shihadeh
762eda95cd Set GPU priorities + improved modeld priorities (#2691)
* give gpu threads rt priority

* modeld gets highest prio on core 2

* fix frame stream

* lower prio of cal thread

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: c57ee16e86275820f97631fb79df1685e914d564
2020-12-15 19:22:03 -08:00
Willem Melching
d47396f4da Handle python-dbus not installed
old-commit-hash: 25054cdc0538a0324b7f7c1bcc9d6166291b4e10
2020-12-14 15:04:17 +01:00
Willem Melching
442c569812 hardware.py: get network info over dbus (#2727)
* Get network stuff using dbus

* most people would call EDGE 2G

* Small cleanup
old-commit-hash: c3b5ef8d4b596cc1463b426a43334a3c53421473
2020-12-14 14:19:14 +01:00
robbederks
3209380a23 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>
old-commit-hash: e64484aecdffbadbcc32c8bd316b579cdd3938ad
2020-12-02 15:20:57 +01:00
George Hotz
c22f0fc034 Make the DSP work everywhere (#2621)
* Use DSP again

* 20 Hz

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: bdb1b766d03d6f2ffa87a15971f6718f4cdc5e58
2020-11-30 11:21:06 +01:00
Jon Ander Oribe
9f61dd6254 Simple improvements for quality gate (#2517)
* Improvements for quality gate

* Update test_xattr.py

* Update test_mpc_wobble.py

* python

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 887d67eb8d8d2da8e07ff3a74517b620afa9542a
2020-11-12 14:48:45 -08:00
grekiki
0b902a02c1 Scons builder for cython extensions (#2485)
* complie boardd without python

* not good, but don't want to lose the file, because it works

* clean a bit

* update dbc

* should build on CI

* not good, but don't want to lose the file, because it works

* clean a bit

* should build on CI

* remove unneeded path

* reorder paths

* reduce diff

* and now it works?!

* ... should work in CI

* add kj, 30% chance to fix macos

* pydebug

* new way to find path

* fix :)

* tested

* sanity check

* repl. MacOS flags

* hope it works

* need more logs

* need more logs2

* test if it works

* should work on CI

* correct python file

* should not work

* cleanup

* real cleanup

* more removals

* 50% of file

* transformations

* fixed a hardcoded variable

* more logs

* simpl.

* kalman

* all donw if it passes tests

* cleanup

* reduce code by 20 lines if this works

* fix bugs

* cleanup

* SharedLibrary

* cleanup

* ...

* remove unused

* CI fix maybe?

* add more valid path

* more logs

* ...:

* fix webcam CI

* remove WError flag

* deprecated is not an error

* more Wno things

* reduce diff, add Wno to env

* don't import nonexistent stuff

* SharedLibrary v2

* less custom env

* renaming, remove SharedLibs

* pack libs in envCython

* experiment

* better docker caching

* whitespace

* more docker caching

* improvement

* improvements

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 9529764549b8c59f7cf141ff3d2d9613ab53beab
2020-11-11 21:14:51 +01:00
Dean Lee
8fd79f63f1 params_pyx_setup.py: -std=c++17 (#2503)
old-commit-hash: c88ab9bfd696ae617317c50ce1fc2179dfc82441
2020-11-07 21:59:37 -08:00
Adeeb Shihadeh
3a05f06ced Qt spinner (#2494)
* move android spinner

* qt spinner

* rotation

* nothing by default

* spin spin

* fix rotate

* style

* spinner for all

* -2

* unused
old-commit-hash: 6c86afee16c706a3c8e787d576ead509373e6b55
2020-11-06 18:44:04 -08:00
Adeeb Shihadeh
57de41eae5 Qt text window (#2489)
* qt text window

* auto size

* real text

* this is cleaner

* fix android build

* exit on pc

* tici fixes
old-commit-hash: 68ba1649b91984c106491cf1894c3f44f21a34df
2020-11-06 12:05:24 -08:00
ZwX1616
4dc3fb994e generalize camera assumptions (#2423)
* clean up 1

* complain

* cleanup

* make models api generic

* clean up 2

* cleanup

* remove unused
old-commit-hash: c0946c8bdbaac0029c67e0b2ba4e591f591790eb
2020-11-05 13:22:28 -08:00
Adeeb Shihadeh
f25cec394e grey panda is unsupported (#2458)
old-commit-hash: 47c21f10f598639307994392e96f4d9293b295c7
2020-11-03 19:56:25 -08:00
George Hotz
87fecbdaef sbigmodel, a bigmodel with the size of a smallmodel
old-commit-hash: 85dab89e1ce7a877e48ceb929866b150705bc9cd
2020-10-27 10:46:02 -07:00
George Hotz
8a09c46c38 support for halve in Window
old-commit-hash: bb2e69faf339aaddf04e49d2dfd71367e72957de
2020-10-20 16:07:05 -07:00
Willem Melching
9ecc0d362e store params in ~/.comma on PC (#2369)
old-commit-hash: c0d92516ccf4dcb8a09c972815a6e08326b59105
2020-10-20 13:18:21 +02:00
Willem Melching
651d4ce031 --std=c++17 (#2330)
* switch to c++17

* more 17

* 1z

* use std::clamp

* Fix types in clamp

* bump submodules

* bump laika

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 339d1967cb1e8ca73aeb1f0066a23b0933706ae5
2020-10-17 13:33:12 -07:00
Adeeb Shihadeh
f92c30b164 fix build warnings (#2355)
* fix build warnings

* cython fixes

* cleanup transformations build

* little more
old-commit-hash: 96b637737bd42b334bffb188d278766bd0abe6c6
2020-10-17 12:40:01 -07:00
Adeeb Shihadeh
e7da1b9275 revert apk launch thread
old-commit-hash: 0fe70c6ef4400fd8be080f590aafede8f9533468
2020-10-15 16:40:56 -07:00
Willem Melching
bc62d8c2e2 tici: reboot
old-commit-hash: 3fe3ec79496a39647435d3f5566147aee75ece22
2020-10-15 20:52:27 +02:00
Willem Melching
789d5176cb Params path only in one place (#2344)
* fix params paths

* Qcom & qcom2

* This env variable is not used anywhere

* params path in only one place

* fix other PARAMS_PATH references

* absolute path is probably better
old-commit-hash: 3dd944898183be0ecf985f389d462e53c3feb8e5
2020-10-15 13:15:22 +02:00
Adeeb Shihadeh
80078ac1b3 set default path for put_nonblocking helper
old-commit-hash: de833ecb067d84b7427710832a99186647b4d579
2020-10-14 13:57:10 -07:00
Adeeb Shihadeh
31ea16e7fa fix params on PC and when reading path from env (#2340)
* fix params when reading path from env

* fix pc
old-commit-hash: 707a670f42dc87c322c6d27eb147ba260b149e23
2020-10-14 13:45:24 -07:00
Willem Melching
498ecbdf3c Params refactor, simplified (#2300)
* always c++

* Create C++ params class

* get works

* tests hang now

* passes tests

* cleanup string formatting

* handle interrupt in blocking read

* fix memory leak

* remove unused constructor

* Use delete_db_value directly

* Rename put -> write_db_value

* filename cleanup

* no semicolons in cython

* Update common/SConscript

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

* add std::string version of delete_db_value

* This is handled

* cleanup encoding

* Add clear method to clear all

* add persistent params

* fix android build

* Should be called clear_all

* only import params when needed

* set params path on manager import

* recusrively create directories

* Fix function order

* cleanup mkdirp

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 2e182e5c574ea1468678b5fd8d0597e34ed5898d
2020-10-13 16:23:23 +02:00