Commit Graph

167 Commits (2fe5eff88c66caa22f615fff2919356b3178a30e)

Author SHA1 Message Date
Shane Smiskol a3556410de
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>
2021-03-09 13:37:11 -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 d169914674
agnos 0.6 (#20077)
* updates for agnos 0.6

* timezone

* bump version
2021-02-18 18:14:34 -08:00
HaraldSchafer ab0456c0eb
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>
2021-02-09 17:23:46 -08:00
Willem Melching 4c04e220a1
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>
2021-02-06 11:07:37 +01:00
Shubham Dhumal 236743a4e2
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>
2021-02-02 15:36:04 +01:00
Greg Hogan 767ada98c7
vision-only radar toggle (#19849) 2021-01-27 14:15:59 +01:00
Greg Hogan 1dd3a1e861
params helpers (#19788)
* params helpers

* add validation
2021-01-19 14:39:00 -08:00
grekiki 10bd761cd6
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>
2021-01-18 12:07:55 +01:00
HaraldSchafer 158210cde8
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>
2021-01-14 18:43:50 -08:00
Dean Lee 595830135b
merge utilpp.h into util.h (#19710) 2021-01-10 14:57:32 -08:00
Adeeb Shihadeh 4096f86e21
lgtm fixes (#19610)
* pass matrices by reference

* suppress that

* destructor

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

* cleanup

* types

* comment
2020-12-18 14:47:25 -08:00
grekiki 5b26c97141
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>
2020-12-18 13:29:20 +01:00
Adeeb Shihadeh b276881fcd
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>
2020-12-18 13:17:12 +01: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
Adeeb Shihadeh a2c6fdd14c Revert "Handle python-dbus not installed"
This reverts commit 25054cdc05.
2020-12-15 20:29:24 -08:00
Adeeb Shihadeh c57ee16e86
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>
2020-12-15 19:22:03 -08:00
Willem Melching 25054cdc05 Handle python-dbus not installed 2020-12-14 15:04:17 +01:00
Willem Melching c3b5ef8d4b
hardware.py: get network info over dbus (#2727)
* Get network stuff using dbus

* most people would call EDGE 2G

* Small cleanup
2020-12-14 14:19:14 +01: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 bdb1b766d0
Make the DSP work everywhere (#2621)
* Use DSP again

* 20 Hz

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2020-11-30 11:21:06 +01:00
Jon Ander Oribe 887d67eb8d
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>
2020-11-12 14:48:45 -08:00
grekiki 9529764549
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>
2020-11-11 21:14:51 +01:00
Dean Lee c88ab9bfd6
params_pyx_setup.py: -std=c++17 (#2503) 2020-11-07 21:59:37 -08:00
Adeeb Shihadeh 6c86afee16
Qt spinner (#2494)
* move android spinner

* qt spinner

* rotation

* nothing by default

* spin spin

* fix rotate

* style

* spinner for all

* -2

* unused
2020-11-06 18:44:04 -08:00
Adeeb Shihadeh 68ba1649b9
Qt text window (#2489)
* qt text window

* auto size

* real text

* this is cleaner

* fix android build

* exit on pc

* tici fixes
2020-11-06 12:05:24 -08:00
ZwX1616 c0946c8bdb
generalize camera assumptions (#2423)
* clean up 1

* complain

* cleanup

* make models api generic

* clean up 2

* cleanup

* remove unused
2020-11-05 13:22:28 -08:00
Adeeb Shihadeh 47c21f10f5
grey panda is unsupported (#2458) 2020-11-03 19:56:25 -08:00
George Hotz 85dab89e1c sbigmodel, a bigmodel with the size of a smallmodel 2020-10-27 10:46:02 -07:00
George Hotz bb2e69faf3 support for halve in Window 2020-10-20 16:07:05 -07:00
Willem Melching c0d92516cc
store params in ~/.comma on PC (#2369) 2020-10-20 13:18:21 +02:00
Willem Melching 339d1967cb
--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>
2020-10-17 13:33:12 -07:00
Adeeb Shihadeh 96b637737b
fix build warnings (#2355)
* fix build warnings

* cython fixes

* cleanup transformations build

* little more
2020-10-17 12:40:01 -07:00
Adeeb Shihadeh 0fe70c6ef4 revert apk launch thread 2020-10-15 16:40:56 -07:00
Willem Melching 3fe3ec7949 tici: reboot 2020-10-15 20:52:27 +02:00
Willem Melching 3dd9448981
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
2020-10-15 13:15:22 +02:00
Adeeb Shihadeh de833ecb06 set default path for put_nonblocking helper 2020-10-14 13:57:10 -07:00
Adeeb Shihadeh 707a670f42
fix params on PC and when reading path from env (#2340)
* fix params when reading path from env

* fix pc
2020-10-14 13:45:24 -07:00
Willem Melching 2e182e5c57
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>
2020-10-13 16:23:23 +02:00
grekiki 8a952cec33
Speedup android permissions (#2331)
* get android permissions before setiing them

* cleanup

* add newline

* make code nicer

* simplify code

* str()

* utf-8 and nicer exception handling
2020-10-13 15:35:18 +02:00
George Hotz f65f7051c4 improve profiler 2020-10-09 18:39:54 -07:00
Adeeb Shihadeh 671183184b
UI cleanup + startup time improvement (#2295) 2020-10-08 19:29:56 -07:00
Willem Melching 8e0bb6a7ce
Fix MacOS CI (#2145)
* compile flag for cython

* fix more setups

* bump cereal

* reenable mac build

* don't let that fail the build

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-10-04 15:03:20 -07:00
Adeeb Shihadeh 059cf6b43e
Run all driving processes on cores 2-3 (#2257) 2020-10-02 17:18:18 -07:00
HaraldSchafer d2539e01d3
Update README.md 2020-09-25 06:33:36 -07:00
Dean Lee 4fba3408c4
Params: use a multiple-reader / single-writer flock to improve concurrency (#2207)
* improve concurrency: multiple readers, single writer locks

* remove lock in read_db_value
2020-09-24 11:51:36 +02:00
Adeeb Shihadeh b341fdc644
Realtime shield (#2194)
* cpu 3 shield

* set priority before affinity

* add to release files

* only run on android
2020-09-17 15:49:14 -07:00
Willem Melching c90cb1b529
Tici hardware abstraction layer (#2183)
* rename android hardware

* add tici class

* elif

* read correct serial number

* Update release files

* Get IMEI

* Refactor AT command

* move get_cmdline into base class

* Remove unused import

* Small cleanup
2020-09-17 13:36:42 +02:00
Adeeb Shihadeh ef21b83937
Improve realtime performance on NEOS (#2166)
* fix setting core affinity

* dmonitoringd doesn't need rt priority

* android only gets two cores

* model and planner get core 2

* log missed cycle count

* neos update

* prod image

* revert NEOS changes

* still need this
2020-09-16 15:33:12 -07:00