Commit Graph

130 Commits

Author SHA1 Message Date
Kurt Nistelberger 6817dc2abe 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>
old-commit-hash: e4cd8a15db6b0e16e06485924395d725ecdc23df
2022-11-04 20:36:44 -07:00
Kurt Nistelberger c2225a4943 QuectelGPS: add supl server (#26259)
add supl server

Co-authored-by: Kurt Nistelberger <kurt.nistelberger@gmail.com>
old-commit-hash: 8f70a84a417f848793f87d6c79c25f3ce15d5d38
2022-10-28 14:43:12 -07:00
Kurt Nistelberger 5b90a8ce15 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>
old-commit-hash: 16b7d726b3ff404e4c8df8a3045ff75bbaf63719
2022-10-26 13:33:12 -07:00
Kurt Nistelberger 31c9cdd5a0 remove null effect assert
old-commit-hash: 8809116a2674be71de45996b9f88bda46468694b
2022-10-12 18:55:35 -07:00
Kurt Nistelberger cadd6be7a1 rawgpsd: log + skip unknown responses (#26043)
* skip DIAG_EVENT_REPORT_F events

* .

Co-authored-by: Kurt Nistelberger <kurt.nistelberger@gmail.com>
old-commit-hash: 549452f84d0f06a92d5c03b710a300acefe8673d
2022-10-12 15:14:45 -07:00
Kurt Nistelberger 76f9a1487c 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>
old-commit-hash: 54d667aa155a795ff3ee4953ce508d64945fdac3
2022-10-11 18:55:10 -07:00
Kurt Nistelberger 52e592ddc1 add extra logging for rawgpsd opcode crash
old-commit-hash: 182c5c48102a8d719402eece658c16f36f3d7046
2022-10-11 17:41:20 -07:00
HaraldSchafer 549a65d51e 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>
old-commit-hash: 57a82ced285518cad129ec61814aab48bf51910e
2022-10-07 17:27:09 -07:00
Adeeb Shihadeh c31c77668f safer modem manager commands (#25999)
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 1f5187892f0854bbc6a7d7799fa0d9ca2284714a
2022-10-07 10:39:11 -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: 01d05f66fe5a189209538650dce319b2f7e192ee
2022-10-06 16:46:15 -07:00
Adeeb Shihadeh 946a603f32 rawgpsd: more robust + simple test (#25977)
* rawgps cleanup

* wait for modem manager

* cleanup

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

* staging manifest

* no casync

* prod manifest
old-commit-hash: ef24c0b2ce8a4cf1dbc82886b806079889adf97b
2022-10-05 16:40:39 -07:00
Adeeb Shihadeh 1ade0ce47d 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>
old-commit-hash: 80c40048cb62fff15a8e884cb05fba8ddfb11809
2022-09-30 12:25:11 -07:00
Kurt Nistelberger fb06d2769f 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>
old-commit-hash: 29d3ed2ce63a65f793dc0ecb553180a0d0fba03e
2022-09-29 14:31:54 -07:00
Adeeb Shihadeh ca3d5d61e2 test_sensord: get 10s of events
old-commit-hash: 51e296733d196dcc504607571460e671cc2861e8
2022-09-28 20:19:47 -07:00
Adeeb Shihadeh 6731c6b61c sensor tests: bump light sensor threshold
old-commit-hash: 2a30da6698d92a3729bc5478a3c53996b8077152
2022-09-27 14:23:32 -07:00
Lee Jong Mun 5020d45b57 update system.hardware import path (#25889)
old-commit-hash: d997d40f17406d079c2f343bcde446be44094021
2022-09-25 19:33:35 -07:00
Kurt Nistelberger eaca9b10b7 pin sensord and lsm interrupt to core 1, for better timing (#25867)
Co-authored-by: Kurt Nistelberger <kurt.nistelberger@gmail.com>
old-commit-hash: 755f24885aa3e89933cc8ad9784cdaf480156239
2022-09-23 18:51:07 -07:00
Kurt Nistelberger 29d15e1f3b 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>
old-commit-hash: bcf31aea07c26099aa861ab93c5586e645a25928
2022-09-19 21:01:32 -07:00
Dean Lee b750859d52 sensord: remove unnecessary brace pair (#25816)
Remove unnecessary brace pair
old-commit-hash: 1a7d6665deafc1e35e5f8d56106a81a4686a6e44
2022-09-16 19:45:51 -07:00
Adeeb Shihadeh 4deed0c449 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>
old-commit-hash: 10f08a94dd1cb4ebc803b208697b4dc70795132a
2022-09-16 15:35:38 -07:00
Kurt Nistelberger 2f8c53ff87 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>
old-commit-hash: 03314b3ddf48fff9b5bfc82e5f6a65fc32dea78f
2022-09-14 20:57:23 -07:00
Kurt Nistelberger 2b335169b2 Sensor tests speedup (#25776)
* speed up sensor test

* remove sensord dependency

* address comments

Co-authored-by: Kurt Nistelberger <kurt.nistelberger@gmail.com>
old-commit-hash: 3058437dd15896e328f8ddf8386683479a1f9493
2022-09-13 22:29:55 -07:00
Kurt Nistelberger 94e586ccf7 add hardware init to sensor tests
old-commit-hash: 467bbffa0fe50587eb8fb8d98cfe2df93461ef1d
2022-09-13 16:45:12 -07:00
Kurt Nistelberger c3d7152d38 make test_sensord executeable
old-commit-hash: c64230c4a8681d0ba2d8b18128f42cbd76d85091
2022-09-13 16:15:33 -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: 84a3c355e5fdb7bb2f50847f925e894eecfa8918
2022-09-12 22:29:31 -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: 4bb399ba3c13953680522707bba662527fa771b7
2022-08-31 23:12:26 -07:00
Adeeb Shihadeh 35ff65121e pre-commit: add codespell (#25571)
old-commit-hash: 6590fb2b93baedb2e1c5267b4f191f8e20fcd1d2
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: 13489d092e2c09119e880022507d7331cf54c615
2022-08-26 23:11:46 -07:00
HaraldSchafer b3dd79b720 Qcom use laika timestamp (#25344)
* Qcom location: use laika to generate unix timestamp

* bump laika

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 54e54fb585fe0612f3f80382f4ce36077f400dfd
2022-08-02 15:53:55 -07:00
HaraldSchafer 21ccf4a6fd Quectel unix timestamp (#25329)
* Use laika

* Fix bug

* Better timestamp name

* Better name

* bump cereal
old-commit-hash: 32201bbbbda0ce4c2ff8cad81ecfe45ca15e4f81
2022-08-01 22:06:58 -07:00
HaraldSchafer 0fcd3d4e51 Gather quectel GPS data (#25300)
* bump cereal

* Use old name

* back to default
old-commit-hash: 98146f5858241fedfe2b16c26afc20396665f884
2022-07-27 16:35:37 -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: 0fce5d90459b77bf2cfa70f55f322f0e1fb8d01c
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: 1139fe507b01f34de9714c99228f411558b44231
2022-06-11 16:38:24 -07:00
Adeeb Shihadeh f4675fc260 Merge common/ and selfdrive/common (#24556)
* Merge common/ and selfdrive/common

* fix that

* fix version

* fix unit tests
old-commit-hash: cb8885cffb313bea258c012c3026461a22bf8135
2022-05-18 14:11:57 -07:00
Willem Melching 95bbb74c81 Add sensord test to Jenkins (#24524)
* Add sensord test to Jenkins

* add second configuration

* add other configs too

* rename

* move into existing HW tests
old-commit-hash: 822ea1fbd9ee761c8dce59d727eebe943e640502
2022-05-13 15:48:38 +02:00
Dylan Herman 2dfba97175 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>
old-commit-hash: d2eef1955c777ef6110c7a74d2a9ca9e4e1d958c
2022-05-12 14:59:00 +02:00
Adeeb Shihadeh 5a9644261f remove comma two support (#24248)
* remove comma two support

* cleanup release files

* little more

* more libs

* no more gralloc

* add snpe back
old-commit-hash: 5c48e7bc86a621dd35f4ff25da7a26ee506bac76
2022-04-18 17:55:23 -07:00
George Hotz 1dc3805193 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>
old-commit-hash: 5af52627de05ab62594abb703eb076765bc045c2
2022-03-30 16:12:24 -07:00
Comma Device 071c9f585d rawgps: add comments to satelite struct
old-commit-hash: c095e7b153a7e8c2af02ee15afc5d914f9fa3fff
2022-03-28 15:21:49 -07:00
Comma Device a014a4b18e rawgps: fix crash, disable DPO
old-commit-hash: 98cde5848ef71f4f933768589f64854c3d993cb3
2022-03-28 14:41:21 -07:00
George Hotz e929e32bc7 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>
old-commit-hash: 1df3c869994f733579be4ff6df7e8bddf8c46c56
2022-03-24 23:07:26 -07:00
Willem Melching efa265a720 Make BMX055 optional if MMC5603NJ present (#22698)
old-commit-hash: b078d8e4251e84f22e57d681d8a0fd927e633c2f
2021-10-26 17:43:33 +02:00
Greg Hogan a61f2a8362 fix cd in process scripts (#21806)
* ui: fix cd in launch script

* do the rest

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 3a578cb5b5370cec19b10e96bf6273698e3a9a08
2021-08-11 11:20:17 -07:00
arfy slowy 63b3d6024b fix: spelling typos (#21861)
* fix: typo spelling grammar

* revert

* Update selfdrive/locationd/calibrationd.py

* more revert

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: d74def61f88937302f7423eea67895d5f4c596b5
2021-08-05 12:05:49 -07:00
Willem Melching caabc8cb0b MMC5603NJ support (#21564)
* read chip id

* set source

* untested driver

* periodic set

* optional
old-commit-hash: 8eba02e119a9d63bcc99ce945b48ed8316cb68c4
2021-07-13 15:38:06 +02:00
Willem Melching ec6bcbdbce LSM6DS3TR-C support (#21563)
* add chip id

* fix temp scale

* cleanup source
old-commit-hash: fd472392745c91854032fe648a683e25b5271358
2021-07-12 19:37:30 +02:00
Dean Lee 147b355dde add space after function name and if statement (#21225)
old-commit-hash: e4e669bb0fc1a919dfb38800099f8e3ad52346f1
2021-06-11 10:17:52 +02:00
Dean Lee f70a79b838 Use C++ header files instead of C header files. (#21192)
* use cstring instead of string.h

* use cstdio instead of stdio.h

* remove inttypes.h

* use cstdlib instead of stdlib.h

* use cstdint instead of stdint.h

* #include <cstddef>

* cstdlib

* use cmath

* remove stddef.h

* use cassert

* use csignal

* use ctime

* use cerror

* rebase master
old-commit-hash: c53cb5d570adb82bc454fcabab458d7e7f09738c
2021-06-08 13:46:22 -07:00