Commit Graph

305 Commits

Author SHA1 Message Date
Adeeb Shihadeh
a30a0c4b69 bump to 0.9.3 2023-05-18 16:23:14 -07:00
Adeeb Shihadeh
c192c92a4e calibrationd: add offroad alert when remount detected (#28073)
* calibrationd: add offroad alert for recalibration

* Update common/params.cc
2023-05-15 13:10:36 -07:00
Shane Smiskol
b8fa7f58ea onroad transition: clear params and start safety setter thread (#28151)
* rename from ignition to onroad/offroad

* forgot one

* clear in manager

* don't clear in boardd anymore

fix

* params isn't used here

* add comment

* Revert "add comment"

This reverts commit 54fb6660501679e5a989c3f06c0a438bdb04dc7e.

* write params in manager

* first part is self explanatory

* remove these from thermald now

* start safety setter thread with IsOnroad

* drivesss

* more

* less

* come back

* makes sense here
2023-05-09 21:25:23 -07:00
Dean Lee
10a1b8b7b1 params: cleanup old params that aren't defined (#28017)
* delete files that are not defined in the keys

* assert after create file

* remove util::remove_files_in_dir

* cleanup

* fix up test

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-05-04 11:21:41 -07:00
Adeeb Shihadeh
2adab40565 pre-commit: add check-toml + update hooks (#27906)
* pre-commit: add check-toml

* update

* fix typo
2023-04-13 21:45:12 -07:00
ntegan1
0b6f7be993 fix missing include <cstdarg> (#27831) 2023-04-07 11:00:57 -07:00
Adeeb Shihadeh
038d34aa7f tizi: affine IRQ by action instead of number (#27811)
* tizi: affine IRQ by action instead of number

* do camera irqs

* debug script

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-04-05 16:35:27 -07:00
Shane Smiskol
42449b482d boardd: ability to switch between ELM safety params (#27656)
* indecisive

* rename to generic FW query

* remove code and update comment

* we need this to start off, unless we set multiplexing immediately

* draft

* draft 2

* try that

* can't do this either, boardd might read Enabled after removing, but before setting new Request param

* this should work

* use one less param

* fix params

* match behavior (set all pandas to safety param of 1, disabling multiplexing for fingerprinting

* clean up (some tests may temp break)

* fix param name and sort

* time it

* yes it does matter

* add to hyundai's bus 5 query

* remove hyundai for now

* this should work

* clean up

* clean up

* flip argument around, clean up

* fix test_startup

* some clean up

* rm line

* comment makes more sense

* required typing

* clean up common type

* comments

* Update selfdrive/car/car_helpers.py

* line

* whoops, need to set before vin!

* fix debug

* annoying

* more debugging

* bug fix (needs both keys always)

* debuGG

debuGG

* Revert "debuGG"

This reverts commit 55b2f429324c0b92d5cfb2cabf8b20db1e166248.

* Revert "more debugging"

This reverts commit 02934c3403ad5270f03093508b704c151d1ccb2a.

* Revert "annoying"

This reverts commit 8b4e5e09989f9a0217e3ec1c0ba68735929b7366.

* clean that up

* bumpback

* bumpback

* every second write param

* flip

* stuff

* move up?

* fix timing out in CI

* rm
2023-03-23 00:14:31 -07:00
Adeeb Shihadeh
be659c976c log current bootlog (#27645)
* log current bootlog

* rm path

* mv that

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-03-21 17:28:38 -07:00
Harald Schäfer
38cb42f76a LaikaD new cache version (#27596) 2023-03-15 20:26:19 -07:00
Shane Smiskol
e729f5b763 Remove dashcam override param (#27509)
* remove dashcam override

* sort

* remove ford from segments
2023-03-06 15:36:39 -08:00
Kurt Nistelberger
6b4ac801e7 laikad: use new cache param (#27404)
* add backward compatibility

* rename laikad cache file

* rm and update

---------

Co-authored-by: Kurt Nistelberger <kurt.nistelberger@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-02-22 14:11:04 -08:00
Adeeb Shihadeh
b9a01752fc bump version to 0.9.2 2023-02-17 14:13:22 -08:00
Shane Smiskol
c4b84783a0 Honda Bosch: gather available ECUs from camera (#27180)
* add flag

* actually use in fw_versions.py

* simpler

* not here

* Comment

* better name

* add param and block

* keys

keys

* block

* with a value

with a value

* add query for bosch PT bus

* different name

* fix

* .

* fix test

fix test

* add cloulogs

* mark as logging
2023-02-14 17:55:41 -08:00
Adeeb Shihadeh
24f4ada36d updated: fix brief notification of update for same version (#27182) 2023-02-02 10:25:20 -08:00
Adeeb Shihadeh
0eeb69a5d0 boardd: enable fingerprinting with both multiplexed modes (#27159)
Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-02-01 19:50:48 -08:00
martinl
fdc4a7f84c MacOS: build fixes (#27143)
* MacOS: exclude common/gpio.cc

* MacOS: no spi for boardd

* MacOS: loggerd: no v4l_encoder.cc

* MacOS: update libdbc path for cabana
2023-01-29 13:55:17 -08:00
Adeeb Shihadeh
c408b7e306 UI: show experimental long available to release users (#26910)
* UI: show experimental long available to release users

* more description

* cleanup

* hide toggle

* fix process replay

* clear param

* actually fix
2023-01-19 23:06:18 -08:00
Willem Melching
5cf1dd7f13 MacOS: mock gpio functions (#26971) 2023-01-16 10:36:06 -08:00
Adeeb Shihadeh
23bd5d6f5d clutil: use logging functions (#26950)
Co-authored-by: Comma Device <device@comma.ai>
2023-01-13 14:49:01 -08:00
Adeeb Shihadeh
be9a3fad37 nav: add setting for extra coordinates to specify route (#26803) 2022-12-14 18:48:39 -08:00
Dean Lee
0d8254e959 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>
2022-12-12 14:47:27 -08:00
Adeeb Shihadeh
c3822bddda bump to 0.9.1 2022-11-19 14:43:20 -08:00
Adeeb Shihadeh
f3efc8998c taco time 2022-11-15 18:49:52 -08:00
Shane Smiskol
2ad9a4f95a 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
2022-11-15 16:44:03 -08:00
Adeeb Shihadeh
9a3f468051 experimental mode (#26416)
* experimental mode

* rename param

* red lights
2022-11-08 14:45:01 -08:00
Adeeb Shihadeh
8ba9a5107b boardd: SPI support (#26374)
* spi handle

* put usb back

* handle eintr

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

* fix test case name
2022-10-07 11:28:09 -07:00
Adeeb Shihadeh
01d05f66fe 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>
2022-10-06 16:46:15 -07:00
Cameron Clough
f611960391 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
2022-10-01 14:47:06 -07:00
Lee Jong Mun
7df0e3efcf remove blank whitespace (#25921) 2022-09-29 13:52:41 -07:00
Cameron Clough
4e310b807f 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.
2022-09-27 20:43:05 -07:00
Vivek Aithal
4fa62f1464 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>
2022-09-19 15:19:26 -07:00
Dean Lee
583304fc7b params: cleanup constructor (#25834) 2022-09-18 14:01:33 -07:00
Dean Lee
85b433760a Params: add new method to get all keys (#25779)
* allKeys

* cleanup and test

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-09-15 15:43:27 -07:00
Adeeb Shihadeh
c4e63d14ab 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
2022-09-15 15:12:36 -07:00
Willem Melching
84a3c355e5 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>
2022-09-12 22:29:31 -07:00
Adeeb Shihadeh
655a64b603 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
2022-09-07 17:12:49 -07:00
HaraldSchafer
faff2b8950 Add e2e long toggle (#25638)
* Add toggle

* Misc fixes

* Update translations

* pre alpha not great
2022-09-02 00:24:53 -07:00
George Hotz
40d6f4b65c 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>
2022-09-01 10:31:14 -07:00
Adeeb Shihadeh
4bb399ba3c pigeond tests (#25630)
* start pigeond tests

* sm checks

* add some types

* little more

Co-authored-by: Comma Device <device@comma.ai>
2022-08-31 23:12:26 -07:00
ZwX1616
e9258cccbe 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>
2022-08-31 16:40:25 -07:00
Adeeb Shihadeh
6590fb2b93 pre-commit: add codespell (#25571) 2022-08-30 11:20:55 -07:00
Robbe Derks
13489d092e 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>
2022-08-26 23:11:46 -07:00
Adeeb Shihadeh
90a4565eb2 params: make python and c++ API match (#25573)
* params: make python and c++ API match

* few more
2022-08-26 20:46:19 -07:00
Adeeb Shihadeh
2f604d2f1a bump version to 0.8.17 2022-08-23 17:29:03 -07:00
Shane Smiskol
87ca42e993 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
2022-08-16 22:02:03 -07:00
HaraldSchafer
772b748689 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
2022-08-01 20:35:14 -07:00
ZwX1616
22408781f7 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>
2022-07-29 13:52:24 -07:00
ZwX1616
1f087bceb4 params: add put_bool_nonblocking (#25292)
* add bool flag

* cleanup

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2022-07-28 13:17:11 -07:00