Commit Graph

92 Commits

Author SHA1 Message Date
Adeeb Shihadeh d7bcbfd54b rawgpsd: enable gps power (#27034) 2023-01-21 17:28:56 -08:00
Adeeb Shihadeh 6861c99991 don't run ublox procs without ublox (#26965)
* pigeond: don't run if ublox missing

* same for ubloxd

Co-authored-by: Comma Device <device@comma.ai>
2023-01-14 23:06:09 -08:00
Adeeb Shihadeh c91679c2d4 remove dead libdiag.h (#26951) 2023-01-13 15:23:58 -08:00
Dean Lee 6acf4e26b8 sensord: add helper function verify_chip_id to I2CSensor (#25830) 2022-12-12 15:00:07 -08:00
Dean Lee f84b1f2d9f Sensord: remove unused pm_mutex (#26705)
remove unused mutex
2022-12-05 13:05:41 -08:00
Kurt Nistelberger e4cd8a15db sensord: lsm self test (#25855)
* lsm self test v1

* add lsm6ds3 accel self test

* add self test for lsm6ds3 gyro

* add c variant self test

* code CleanUp

* address PR comments

Co-authored-by: Kurt Nistelberger <kurt.nistelberger@gmail.com>
2022-11-04 20:36:44 -07:00
Kurt Nistelberger 8f70a84a41 QuectelGPS: add supl server (#26259)
add supl server

Co-authored-by: Kurt Nistelberger <kurt.nistelberger@gmail.com>
2022-10-28 14:43:12 -07:00
Kurt Nistelberger 16b7d726b3 quectel no sim GPS support (#26227)
* add no sim gps support

* address comments

* remove xtra assistance enabling

Co-authored-by: Kurt Nistelberger <kurt.nistelberger@gmail.com>
2022-10-26 13:33:12 -07:00
Kurt Nistelberger 8809116a26 remove null effect assert 2022-10-12 18:55:35 -07:00
Kurt Nistelberger 549452f84d rawgpsd: log + skip unknown responses (#26043)
* skip DIAG_EVENT_REPORT_F events

* .

Co-authored-by: Kurt Nistelberger <kurt.nistelberger@gmail.com>
2022-10-12 15:14:45 -07:00
Kurt Nistelberger 54d667aa15 GPS test station first unittests (#25950)
* init gps test

* gps test v1

* add static signal gen script

* update readme

* remove LD_PRELOAD by using rpath, update values after testing

* remove LD_PRELOAD

* update fuzzy testing

* address comments

* cleanup

Co-authored-by: Kurt Nistelberger <kurt.nistelberger@gmail.com>
2022-10-11 18:55:10 -07:00
Kurt Nistelberger 182c5c4810 add extra logging for rawgpsd opcode crash 2022-10-11 17:41:20 -07:00
HaraldSchafer 57a82ced28 rawgpsd: publish ephemerides (#25931)
* add svpoly parsing

* Publish poly

* add source check

* add safety check for invalid gpsWeek values

* address PR comments

* add qcom ephemeris source type

* bump cereal and laika

Co-authored-by: Kurt Nistelberger <kurt.nistelberger@gmail.com>
2022-10-07 17:27:09 -07:00
Adeeb Shihadeh 1f5187892f safer modem manager commands (#25999)
Co-authored-by: Comma Device <device@comma.ai>
2022-10-07 10:39:11 -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
Adeeb Shihadeh e59008bf93 rawgpsd: more robust + simple test (#25977)
* rawgps cleanup

* wait for modem manager

* cleanup

Co-authored-by: Comma Device <device@comma.ai>
2022-10-05 20:59:04 -07:00
Adeeb Shihadeh 6a8a38b1a1 pigeond: prevent locking up a CPU core (#25979) 2022-10-05 17:13:48 -07:00
Adeeb Shihadeh ef24c0b2ce agnos 6.1 (#25973)
* agnos 6.1

* staging manifest

* no casync

* prod manifest
2022-10-05 16:40:39 -07:00
Adeeb Shihadeh 80c40048cb sensord: test fixups (#25935)
* sensord: test fixups

* fix linter

* check freq

* fp seems reliable

* clean that up

* update refs

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Bruce Wayne <batman@z840-provisioning.internal>
2022-09-30 12:25:11 -07:00
Kurt Nistelberger 29d3ed2ce6 Sensor events splitup (#25714)
* PoC of reading sensors via interrupts instead of polling

* add Gyro and draft for magn

* add more functionality to gpio.cc

* change LSM gyro to interrupt

* resolve rebase conflict

* update BMX accel interrupt impl

* add interrupt collector thread to fetch in parallel

* change get_event interface to return true on successful read

* update BMX gyro interrupt impl

* update gpio.h/.cc according to comments

* address comments, rename Edgetype enum

* Edgetype to EdgeType

* update sensor interrupt interface

* add error handling, and read fd on trigger

* avoid sending empty messages

* fix build

* use gpiochip

* less diff

* gpiochip on both edges, but skip falling edge if rising edge is detected

* init last_ts with 0

* update sensord testcases

* update sensord testsweet

* test for pipeline

* readd with_process

* add null check

* move tests update to seperate PR

* sensord: improve test coverage (#25683)

* update sensord-interrupt testsweet

* address review comments

* inc stddev threshold

* fix format string

* add version 0 check again

* relax strictness after c3 with bmx tests

* relax strictness after tests

Co-authored-by: Kurt Nistelberger <kurt.nistelberger@gmail.com>

* address PR comments

* fix typo

* remove 4ms limit, and skip first 0.5sec of data

* revert disable_interuppt change to destructor

* fix and remove timing skip

* make gpiochip generic

* sensord port

* change from sensorEvents to separated events

* fix gyro usage

* add splitted sensor tests

* modify debug script sensor_data_to_hist.py

* refactor get_event interface to remove sensorEvent message type

* update locationd to non sensorEvent usage

* tmp commit

* fix replay

* fix accelerometer type

* fix sensor to hist debug script

* update sensord tests to split events

* remove rebase artifacts

* port test_sensord.py

* small clean up

* change cereal to sensorEvents-splitup branch

* upate sensorEvents in regen

* fix route generation for splitted sensor events

* regen cleanUp from sensorEvents change

* .

* remove light and temp from locationd

* add generic init delay per sensor

* .

* update routes

* move bmx gyro/accel to its own channel

* adopt sensor tests to bmx channel

* remove rebase artifacts

* fix sensord test

* handle bmx not present

* add bmx sockets to regen

* .

* .

* code cleanUp

* .

* address PR comments

* address PR comments

* address PR comments

* lsm clean up

* readd sensorEvents

* rever regen.py

* .

* update replay refs

* move channels

* fix artifact

* bump cereal

* update refs

* fix timing issue

Co-authored-by: Bruce Wayne <batman@workstation-eu-intern2.eu.local>
Co-authored-by: gast04 <kurt.nistelberger@gmail.com>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-09-29 14:31:54 -07:00
Adeeb Shihadeh 51e296733d test_sensord: get 10s of events 2022-09-28 20:19:47 -07:00
Adeeb Shihadeh 2a30da6698 sensor tests: bump light sensor threshold 2022-09-27 14:23:32 -07:00
Lee Jong Mun d997d40f17 update system.hardware import path (#25889) 2022-09-25 19:33:35 -07:00
Kurt Nistelberger 755f24885a pin sensord and lsm interrupt to core 1, for better timing (#25867)
Co-authored-by: Kurt Nistelberger <kurt.nistelberger@gmail.com>
2022-09-23 18:51:07 -07:00
Kurt Nistelberger bcf31aea07 sensord: move sensors in lowest power mode on exit/kill (#25787)
* add low power modes

* add sleep to lsm gyro init

* bmx055 gyro has a 30ms wakeup time from deep suspend

* Sensord skip init values, first 500ms (#25775)

* remove lsm gyro sleep, handled by general cut

Co-authored-by: Kurt Nistelberger <kurt.nistelberger@gmail.com>
2022-09-19 21:01:32 -07:00
Dean Lee 1a7d6665de sensord: remove unnecessary brace pair (#25816)
Remove unnecessary brace pair
2022-09-16 19:45:51 -07:00
Adeeb Shihadeh 10f08a94dd sensor test fixups (#25818)
* sensor test fixups

* fix that

* little more

* seems reliable now

* kill old instances

* unused

* cleanup

Co-authored-by: Bruce Wayne <batman@z840-provisioning.internal>
2022-09-16 15:35:38 -07:00
Kurt Nistelberger 03314b3ddf sensord test: stop sensord if interrupts not enabled (#25792)
* stop sensord if interrupts not enabled

* move to tearDown

Co-authored-by: Kurt Nistelberger <kurt.nistelberger@gmail.com>
2022-09-14 20:57:23 -07:00
Kurt Nistelberger 3058437dd1 Sensor tests speedup (#25776)
* speed up sensor test

* remove sensord dependency

* address comments

Co-authored-by: Kurt Nistelberger <kurt.nistelberger@gmail.com>
2022-09-13 22:29:55 -07:00
Kurt Nistelberger 467bbffa0f add hardware init to sensor tests 2022-09-13 16:45:12 -07:00
Kurt Nistelberger c64230c4a8 make test_sensord executeable 2022-09-13 16:15:33 -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 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
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
HaraldSchafer 54e54fb585 Qcom use laika timestamp (#25344)
* Qcom location: use laika to generate unix timestamp

* bump laika

Co-authored-by: Comma Device <device@comma.ai>
2022-08-02 15:53:55 -07:00
HaraldSchafer 32201bbbbd Quectel unix timestamp (#25329)
* Use laika

* Fix bug

* Better timestamp name

* Better name

* bump cereal
2022-08-01 22:06:58 -07:00
HaraldSchafer 98146f5858 Gather quectel GPS data (#25300)
* bump cereal

* Use old name

* back to default
2022-07-27 16:35:37 -07:00
Adeeb Shihadeh 0fce5d9045 Move a bunch of stuff to system/ part 3 (#24829)
* move swaglog.py

* timezoned

* logmessaged

* version.py

* fix linter
2022-06-11 23:19:27 -07:00
Adeeb Shihadeh 1139fe507b Move selfdrive/hardware/ to system/ (#24725)
* move hardware to system/

* fix mypy
2022-06-11 16:38:24 -07:00
Adeeb Shihadeh cb8885cffb Merge common/ and selfdrive/common (#24556)
* Merge common/ and selfdrive/common

* fix that

* fix version

* fix unit tests
2022-05-18 14:11:57 -07:00
Willem Melching 822ea1fbd9 Add sensord test to Jenkins (#24524)
* Add sensord test to Jenkins

* add second configuration

* add other configs too

* rename

* move into existing HW tests
2022-05-13 15:48:38 +02:00
Dylan Herman d2eef1955c add mypy check for return-any (#24379)
* add mypy check for return-any

* remove unused import

* typing

* remove unnecessary variable typing

* cleanup

* cleanup

* bump submodules

* small fixes

* only a problem on mac

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2022-05-12 14:59:00 +02:00
Adeeb Shihadeh 5c48e7bc86 remove comma two support (#24248)
* remove comma two support

* cleanup release files

* little more

* more libs

* no more gralloc

* add snpe back
2022-04-18 17:55:23 -07:00
George Hotz 5af52627de rawgps: add oemdre support (#24059)
* oemdre works

* fast receive

* parse oemdre

* parsing dre

* parsing oemdre

* unused import

* remove unparsed msgs

* import, don't redefine

Co-authored-by: Comma Device <device@comma.ai>
2022-03-30 16:12:24 -07:00
Comma Device c095e7b153 rawgps: add comments to satelite struct 2022-03-28 15:21:49 -07:00
Comma Device 98cde5848e rawgps: fix crash, disable DPO 2022-03-28 14:41:21 -07:00
George Hotz 1df3c86999 sensord: add support for Quectel raw gps (#24027)
* connecting to rawgps

* dumping rawfps packets

* this works, but it might be useless

* fix parsing

* parsing 0x1476

* compare

* compare better

* refactoring

* parsing and broadcasting GPS packet

* glonass support

* compare using submaster

* fix compare for glonass

* update cereal

* make linter happy

* other linter issue

* last mypy complaints

* add support for publishing gpsLocationExternal

* set flags to 1 to match ubloxd

* ready to ship

* qcomdiag

* use unused variables

* last one

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-03-24 23:07:26 -07:00
Willem Melching b078d8e425 Make BMX055 optional if MMC5603NJ present (#22698) 2021-10-26 17:43:33 +02:00
Greg Hogan 3a578cb5b5 fix cd in process scripts (#21806)
* ui: fix cd in launch script

* do the rest

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-08-11 11:20:17 -07:00