Commit Graph

368 Commits

Author SHA1 Message Date
Willem Melching
7c4e6cea5f MacOS: mock gpio functions (#26971)
old-commit-hash: 5cf1dd7f13
2023-01-16 10:36:06 -08:00
Adeeb Shihadeh
fee2875004 clutil: use logging functions (#26950)
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 23bd5d6f5d
2023-01-13 14:49:01 -08:00
Adeeb Shihadeh
1946615724 nav: add setting for extra coordinates to specify route (#26803)
old-commit-hash: be9a3fad37
2022-12-14 18:48:39 -08:00
Dean Lee
725e0665df common: add new class OpenPilotPrefix (#26753)
* new class OpenPilotPrefix

* move random_string to util

* rename file

* style

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 0d8254e959
2022-12-12 14:47:27 -08:00
Adeeb Shihadeh
117c99886d bump to 0.9.1
old-commit-hash: c3822bddda
2022-11-19 14:43:20 -08:00
Adeeb Shihadeh
15b07085ff taco time
old-commit-hash: f3efc8998c
2022-11-15 18:49:52 -08:00
Shane Smiskol
74aa9e5b80 offroad ui: support storing confirmation of a toggle (#26510)
* show confirmation toggle on first toggle of experimental mode

* don't store confirmation if users toggle off *after* this PR

* refactor

* cleaner

* not true

* try here
old-commit-hash: 2ad9a4f95a
2022-11-15 16:44:03 -08:00
Adeeb Shihadeh
74979a7c76 experimental mode (#26416)
* experimental mode

* rename param

* red lights
old-commit-hash: 9a3f468051
2022-11-08 14:45:01 -08:00
Adeeb Shihadeh
461206de1c boardd: SPI support (#26374)
* spi handle

* put usb back

* handle eintr

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 8ba9a5107b
2022-11-08 13:21:07 -08:00
Dean Lee
389558776e params: remove all files if call clearAll with the ParamKeyType.ALL key. (#26000)
* remove all files in dir

* fix test case name
old-commit-hash: 8dbb25e683
2022-10-07 11:28:09 -07:00
Adeeb Shihadeh
3e2f436d4c auto-detect pigeon or quectel (#25991)
* auto-detect pigeon or quectel

* persistent

* fix sim

* fix process replay

* fix locationd unit tests

* fix that

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 01d05f66fe
2022-10-06 16:46:15 -07:00
Cameron Clough
597b949813 networking: add unmetered cellular toggle (#25902)
* add metered toggle to UI

* add GsmMetered param

* add NMMetered constants

* change LTE connection settings: connection.metered

* change to GsmUnmetered override

* update translations

* debug ui

* remove comment

* Revert "debug ui"

This reverts commit 2ad9e65ea229b814782be9f30cc7664125d7e908.

* 'Force Unmetered Cellular' toggle

* update translations

* remove description

* update translations

* change unmetered to metered
old-commit-hash: f611960391
2022-10-01 14:47:06 -07:00
Lee Jong Mun
f6700cb7ba remove blank whitespace (#25921)
old-commit-hash: 7df0e3efcf
2022-09-29 13:52:41 -07:00
Cameron Clough
23a4e66b17 configure mypy outside of pre-commit environment (#25892)
* add mypy config matching precommit

* use local mypy, add files to config

* excludes too

* fix config

* pylint is sad now... did it get updated?

* fix typing hints

* ignore

* this should be a regexp

* mypy doesn't like Deque despite inheriting MutableSequence

* more excludes

* Revert "pylint is sad now... did it get updated?"

This reverts commit 250c632f18ecb3d33ffb931e15425f9314a0964b.
old-commit-hash: 4e310b807f
2022-09-27 20:43:05 -07:00
Vivek Aithal
51d25b2011 Live torque (#25456)
* wip torqued

* add basic logic

* setup in manager

* check sanity and publish msg

* add first order filter to outputs

* wire up controlsd, and update gains

* rename intercept to offset

* add cloudlog, live values are not updated

* fix bugs, do not reset points for now

* fix crashes

* rename to main

* fix bugs, works offline

* fix float in cereal bug

* add latacc filter

* randomly choose points, approx for iid

* add variable decay

* local param to capnp instead of dict

* verify works in replay

* use torqued output in controlsd

* use in controlsd; use points from past routes

* controlsd bugfix

* filter before updating gains, needs to be replaced

* save all points to ensure smooth transition across routes, revert friction factor to 1.5

* add filters to prevent noisy low-speed data points; improve fit sanity

* add engaged buffer

* revert lat_acc thresh

* use paramsd realtime process config

* make latacc-to-torque generic, and overrideable

* move freq to 4Hz, avoid storing in np.array, don't publish points in the message

* float instead of np

* remove constant while storing pts

* rename slope, offset to lat_accet_factor, offset

* resolve issues

* use camelcase in all capnp params

* use camelcase everywhere

* reduce latacc threshold or sanity, add car_sane todo, save points properly

* add and check tag

* write param to disk at end of route

* remove args

* rebase op, cereal

* save on exit

* restore default handler

* cpu usage check

* add to process replay

* handle reset better, reduce unnecessary computation

* always publish raw values - useful for debug

* regen routes

* update refs

* checks on cache restore

* check tuning vals too

* clean that up

* reduce cpu usage

* reduce cpu usage by 75%

* cleanup

* optimize further

* handle reset condition better, don't put points in init, use only in corolla

* bump cereal after rebasing

* update refs

* Update common/params.cc

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

* remove unnecessary checks

* Update RELEASES.md

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 4fa62f1464
2022-09-19 15:19:26 -07:00
Dean Lee
daf0a8fc1f params: cleanup constructor (#25834)
old-commit-hash: 583304fc7b
2022-09-18 14:01:33 -07:00
Dean Lee
dc0ad229cd Params: add new method to get all keys (#25779)
* allKeys

* cleanup and test

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 85b433760a
2022-09-15 15:43:27 -07:00
Adeeb Shihadeh
46cfb5c45b good updater experience (#25724)
* good updater experience

* set params on startup

* no fetch on first loop

* little type hinting

* little more

* update translations

* always set params with valid overlay

* wrap check

* use the param

* more wrapping

* vanish

* cleanup

* remove that
old-commit-hash: c4e63d14ab
2022-09-15 15:12:36 -07:00
Willem Melching
7451db46cf sensord: use interrupts to improve LSM6DS3 timing accuracy (#24525)
* change LSM6DS3TR(-c) gyroscope  and accelerometer to interrupt

* add pthread for linking

* add interrupt collector thread to fetch in parallel to non interrupt based sensors

* change get_event interface to return true on successful read

* fetch sensor interrupts via gpiochip

* avoid sending empty messages (interrupt only, non interupt magn can leave a gap in the orphan block)

* add verifier script to sensor interrupts (sensor_data_to_hist.py)

* add/update sensord testsweet (test_sensord.py)

* add poll timed out check

* unexport interrupt gpio pins

* gpiochip on both edges, but skip falling edge if rising edge is detected, this is handled in the sensor as the status flag is checked if new data is availble

* add test to sensord to verify 100Hz interrupt frequency

* add sensor shutdown/low power mode functionality on sensord exit

* relax test, will be readded in the splitup PR

Co-authored-by: Kurt Nistelberger <kurt.nistelberger@gmail.com>
old-commit-hash: 84a3c355e5
2022-09-12 22:29:31 -07:00
Adeeb Shihadeh
e4f9781c17 single longitudinal toggle for e2e and disable radar (#25688)
* single longitudinal toggle for e2e and disable radar

* write disable radar param

* rename

* better param name

* clean that up

* update refs

* update translations

* not live for experimental

* write it out

* vanish
old-commit-hash: 655a64b603
2022-09-07 17:12:49 -07:00
HaraldSchafer
0cccf195f3 Add e2e long toggle (#25638)
* Add toggle

* Misc fixes

* Update translations

* pre alpha not great
old-commit-hash: faff2b8950
2022-09-02 00:24:53 -07:00
George Hotz
29cd51b876 modeld: Move from SNPE to tinygrad (#25207)
* compiling, won't work yet

* running with inputs and outputs

* there's some magic chance this works

* no more dlc, include onnx

* yolo tests plz

* bump tinygrad

* files_common + delete dlc

* tinygrad_repo -> tinygrad

* pre commit config

* llops needed

* extra in files_common

* bump tinygrad

* fix indent

* tinygrad/nn/__init__

* tinygrad_repo

* bump tinygrad repo

* bump tinygrad

* bump with native_exp, match maybe

* native_explog is argument

* pyopencl no cache

* 5% chance this matches

* work in float32?

* bump tinygrad

* fix build

* no __init__

* fix recip

* dumb hack

* adding thneed PC support

* fix pc segfault

* pc thneed is working

* to_image

* prints stuff with debug=2

* it sort of works

* copy host ptr is simpler

* bug fix

* build on c3

* this correct?

* reenable float16

* fix private, fixup copy_inputs internal

* bump tinygrad and update ref commit

* fix OPTWG on PC

* maybe fix non determinism

* revert model replay ref commit

* comments, init zeroed out buffers

* upd ref commit

* bump tinygrad to fix initial image

* try this ref

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 40d6f4b65c
2022-09-01 10:31:14 -07:00
Adeeb Shihadeh
3308e740ea pigeond tests (#25630)
* start pigeond tests

* sm checks

* add some types

* little more

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 4bb399ba3c
2022-08-31 23:12:26 -07:00
ZwX1616
cf84a3ba30 camerad: optional exposure params overrides (#25616)
* add params override

* speedup

* put in param list

* clean up names

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: e9258cccbe
2022-08-31 16:40:25 -07:00
Adeeb Shihadeh
35ff65121e pre-commit: add codespell (#25571)
old-commit-hash: 6590fb2b93
2022-08-30 11:20:55 -07:00
Robbe Derks
78881cf731 Pigeond (#25561)
* split out pigeond from boardd

* also want to turn off power

* fix manager calls

* move to sensord folder

* release files:

* add assistnow code

* no bare except

* add test script to test TTFF

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 13489d092e
2022-08-26 23:11:46 -07:00
Adeeb Shihadeh
d9c279aea9 params: make python and c++ API match (#25573)
* params: make python and c++ API match

* few more
old-commit-hash: 90a4565eb2
2022-08-26 20:46:19 -07:00
Adeeb Shihadeh
6ca02ab549 bump version to 0.8.17
old-commit-hash: 2f604d2f1a
2022-08-23 17:29:03 -07:00
Shane Smiskol
28a60fb42e process replay: initialize controlsState with original route (#25461)
* push

* do process replay

* commit

* update refs

* clean up

* clean up controlsd

* clean up controlsd

* Add assert

* debubuggier param name

* can be peristent

* Revert "can be peristent"

This reverts commit 6e6d3f6423c26a202623cef728e038259e9e46cd.

* Update selfdrive/test/process_replay/process_replay.py
old-commit-hash: 87ca42e993
2022-08-16 22:02:03 -07:00
HaraldSchafer
e5589e572f Cleanup calibration code (#25119)
* First attempt

* worksish

* tests pass

* cleanup

* get rid of garbahe

* fix name

* Still used in xx

* add debug functions

* used

* Revert "used"

This reverts commit 276e8ebab06d2d4f0e9927ba32b7d8aca2bf88c3.

* Update ref
old-commit-hash: 772b748689
2022-08-01 20:35:14 -07:00
ZwX1616
6e5393367d Remove RHD toggle: determine by driver side instead (#24802)
* driverview

* auto choose

* useless

* remove

* modeld not use toggle

* remove from params

* should have commissue anyway

* delete icon file

* deal with init more elegantly and prohibit switching when engaged

* nonblock save when not unstable

* filter very low speeds

* a few more secs dont harm

* draw icon

* match

* radius

* use const

* ref commit

* new transs

* put_bool_nonblocking

* 5k route tune

* ref comm

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 22408781f7
2022-07-29 13:52:24 -07:00
ZwX1616
d500a25ab5 params: add put_bool_nonblocking (#25292)
* add bool flag

* cleanup

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 1f087bceb4
2022-07-28 13:17:11 -07:00
Adeeb Shihadeh
95df2c9b48 updated: add branch switching (#25200)
* switch param

* add to ui

* fix that

* fetch for new branch

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: cc3857eb62
2022-07-18 21:18:10 -07:00
Greg Hogan
5dd12e194b nav: toggle to show on left side of onroad ui (#25169)
* nav: show on left side of onroad ui

* add toggle

* capitalization

* update translations

* single params object

* skip unfinished translations test

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 93cd0285ac
2022-07-18 13:57:21 +02:00
Willem Melching
4d924f1b39 camerad: cleanup unused RGB code (#25172)
* camerad: cleanup unused RGB code

* hdr is unused

* more cleanup

* remove envs

* remove from sconsfile

* fix docs
old-commit-hash: f38204ad26
2022-07-14 19:21:40 +02:00
Adeeb Shihadeh
44881913f6 bump version to 0.8.16
old-commit-hash: 3160f86aa0
2022-07-14 10:18:16 -07:00
Shane Smiskol
23de7b166e UI: Internationalization support (#21212)
* rough multiple language demo

* more wrappings

* stash

* add some bad translations

* updates

* map from french to spanish still has same problem of needing to call setText on everything

* add files

* restart UI

* use return code

* relative path

* more translations

* don't loop restart

* Toggle and prime translations

* try on device

* try QComboBox with readable style

* stash

* not yet scrollable

* stash

* dynamic translations (doesn't work for dynamic widget strings yet)

* clean up multiple option selector

* store languages in json

* try transparent

* Try transparent popup

* see how this looks

* tweaks

* clean up

* update names

* Add Chinese (Simplified) translations

* Do missing French translations

* unit tests caught that :)

* fix test

* fix other test (on PC)

* add entries to dialog to test

* add cancel button, clean up a bit

* just chinese

* some clean up

* use quotes

* clean up

* Just quit, set timeout to 0

* half a second

* use exitcode

* don't print if it's expected

* this comment is outdated

* update translations

* Update translations

* re-order input classes

* Update line numbers

* use enabled property for button style

* Get rid of ListWidget

* Update line numbers

* Log failed to load language

* Log failed to load language

* Move to utils and fix english logging

extra line

* Update translations

* spacing

* looks a bit better

* try this instead of exitcode

fixes

fix

* only one function

* comment

* Update line numbers

* fixup some japanese translations

* clean up multi option dialog

* Update line numbers
old-commit-hash: 949de4d2b6
2022-07-08 20:25:54 -07:00
Dean Lee
31fddf592f swaglog.cc/cloudlog_common: pass json object by reference (#24996)
* pass json object by reference

* space between functions
old-commit-hash: 1ac1fe632f
2022-06-30 10:59:08 +02:00
Willem Melching
f06344811b don't log LaikadEphemeris in initData
old-commit-hash: bef5350fa3
2022-06-29 12:19:37 +02:00
ZwX1616
cd2a98aa11 fullframe DM model (#24860)
* Revert "put cereal on master"

This reverts commit 4646c132bae7358079c9b2867725f8382906c1e5.

* Revert "Revert fullframe DM model (#24812)"

This reverts commit 59e8af4c3101785cead69a9880cc03e0a18081e1.

* revert revert cereal

* clip6

* 0.8 is fair

* Fiction compensation should be based on error

* Update refs

* Add deadzone

* not that

* good mg

* ref

* ref

* ee8f

* minor tweak

* ref

* recompile

* ref

* cereal

* match driverstatus

* new ref

* new ref

* pass token through jenkins credentials

* quote

* fix snpe dead weights

* final ref

Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 1f2f9ea9c9
2022-06-20 16:24:51 -07:00
Adeeb Shihadeh
8cd45d02c0 add param to override carParams.dashcamOnly (#24857)
* add param to override carParams.dashcamOnly

* little cleaner
old-commit-hash: 7c826b4fa1
2022-06-17 11:56:04 +02:00
Gijs Koning
61dcb8729c Laikad: Cache orbit and nav data (#24831)
* Cache orbit and nav data

* Cleanup

* Cleanup

* Use ProcessPoolExecutor to fetch orbits

* update laika repo

* Minor

* Create json de/serializers
Save cache only 1 minute at max

* Update laika repo

* Speed up json by caching json in ephemeris class

* Update laika

* Fix test

* Use constant
old-commit-hash: c3fa9151f3
2022-06-15 02:32:07 -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: 0fce5d9045
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: 1139fe507b
2022-06-11 16:38:24 -07:00
ZwX1616
c73d4e5fc6 Revert fullframe DM model (#24812)
* Revert "fullframe DM: flip RHD yaw to use matching thresholds"

This reverts commit ce7daabc8847d18ba46e5d1879f5a6958d04ccc7.

* Revert "fullframe DM model (#24762)"

This reverts commit 817be81fb19004f4873881f6b29dcdfffbe7e3a8.

* revert cereal
old-commit-hash: c646eeee0a
2022-06-10 16:16:46 -07:00
ZwX1616
02f0f39b52 fullframe DM model (#24762)
* get log

* simplify two nonsense

* not needed

* libyuv is a joke

* clean up

* try small

* fast but not bad

* working

* clean up driverview

* simplified

* thats mirrored

* smol

* tweak

* ref is screen

* w/ ee

* update camera model

* no if TICI

* start

* update pose thresh

* less cpu more dsp

* new libyuv

* new snpe

* add files

* test

* should be fast

* update out len

* trigger test

* use master snpe

* add cereal

* update cereal

* refactor parsing

* missing ;

* get

* wrong type

* test model

* use driver data

* 10829278-72fe-4283-a118-2cef959ce174/1550

* no pf

* adapt driverview

* ;

* rhd learner

* update libyuv buildi x64

* ad4337ea

* remove blink slack

* test

* no

* use toggle

* b16

* fix for nv12

* 5b02cff5 both

* update test

* update cereal

* update cereal

* update cereal

* v2 packets

* revert libyuv

* no /

* update snpemodel

* ;

* memcpy

* fix test

* use toggle in driverview

* update power

* update replay

* Revert "update replay"

This reverts commit 1d0979ca59dbc89bc5890656e9501e83f0556d50.

* update model ref

* halve cpu

* fake 8bit onnx runner

* same thresh as report

* cereal master

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: d6c07a6b15
2022-06-08 20:13:46 -07:00
HaraldSchafer
08ad733229 Remove laneless toggle (#24738)
* Remove laneless toggle

* Update refs
old-commit-hash: 7f16e19f79
2022-06-03 14:04:14 -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: f49a9c9fd2
2022-06-02 15:20:51 +02:00
Adeeb Shihadeh
11b41511c9 remove unused visionimg
old-commit-hash: c677c6b164
2022-06-01 14:42:32 -07:00
Gijs Koning
6a53db981b Simulator: Speed up process by removing second camera (#24679)
* simulator: support running wide camera only

* proper frame id

* use param name that makes more sense

* do some cleanup

* Update tools/sim/bridge.py

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: b5aed2bf67
2022-05-30 15:25:07 +02:00