Dean Lee
6acf4e26b8
sensord: add helper function verify_chip_id to I2CSensor ( #25830 )
2 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
Adeeb Shihadeh
6590fb2b93
pre-commit: add codespell ( #25571 )
3 years ago
Adeeb Shihadeh
cb8885cffb
Merge common/ and selfdrive/common ( #24556 )
...
* Merge common/ and selfdrive/common
* fix that
* fix version
* fix unit tests
3 years ago
arfy slowy
d74def61f8
fix: spelling typos ( #21861 )
...
* fix: typo spelling grammar
* revert
* Update selfdrive/locationd/calibrationd.py
* more revert
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
4 years ago
Willem Melching
8eba02e119
MMC5603NJ support ( #21564 )
...
* read chip id
* set source
* untested driver
* periodic set
* optional
4 years ago
Willem Melching
fd47239274
LSM6DS3TR-C support ( #21563 )
...
* add chip id
* fix temp scale
* cleanup source
4 years ago
Dean Lee
e4e669bb0f
add space after function name and if statement ( #21225 )
4 years ago
Willem Melching
79a2f06760
LSM6DS3 fix gyro scale ( #21040 )
4 years ago
Willem Melching
6340c2a996
bmx055 magnetometer fix reference frame ( #21026 )
4 years ago
Dean Lee
0495426535
Cleanup includes ( #20925 )
...
* remove #include <pthread.h>
* remove #include<stdbool.h> for cc files
* remove #include<iostream>
4 years ago
Dean Lee
7222d0f20d
Cleanup selfdrive/ includes ( #20822 )
...
* cleanup include path
* continue
* format includes
* fix testraw.cc
* remove include path from SConstruct
* regroup
* rebase master
* almost done
* apply review
* rename FileReader.xx to filereader.xx
* rename Unlogger.x->unlogger.x
* rename FrameReader.xx -> framereader.xx
* apply reviews
* ui.h
* continue
* fix framebuffer.cc build error:mv util.h up
* full path to msm_media_info
* fix qcom2 camerad
Co-authored-by: Comma Device <device@comma.ai>
4 years ago
Dean Lee
81491dc57f
c++ cleanup: standardize file extensions to .cc and .h ( #20800 )
...
* c++ cleanup: standardize file extensions to .cc and .h
* cleanup files_common
4 years ago
Willem Melching
1c83ae8722
BMX055 dont use FIFO registers ( #20374 )
4 years ago
Willem Melching
17f3683228
BMX055 magnetometer fixes and advanced self-test ( #20118 )
...
* bmx055 magnetometer selftest
* try this
* cleanup trim data reading
* parsing fixed now?
* make self test work and increase numreps
4 years ago
Willem Melching
fd01c89491
BMX055 magnetometer calibration ( #19992 )
4 years ago
Dean Lee
595830135b
merge utilpp.h into util.h ( #19710 )
4 years ago
Dean Lee
c1cf0882bd
Replace usleep with util::sleep_for ( #19643 )
...
* replace usleep with sleep_for
* sleep microseconds
* sleep nanoseconds
* Trigger Build
4 years ago
Adeeb Shihadeh
4096f86e21
lgtm fixes ( #19610 )
...
* pass matrices by reference
* suppress that
* destructor
* that's wrong, suppress it
4 years ago
Dean Lee
bd4f6650fa
simplify building capnp messages with arrays ( #2617 )
4 years ago
Willem Melching
2e739aa77c
Fix gyro field name
5 years ago
Willem Melching
e51da619c1
LSM6DS3 ( #2268 )
...
* add initial lsm6ds3 setup
* accel works
* ignore lsm6ds3 in locationd
* add gyro
* add temp
Co-authored-by: Comma Device <device@comma.ai>
5 years ago
Willem Melching
f55e79e46a
tici: BMX055 magnetometer& temperature sensor ( #2212 )
...
* BMX055 Magnetometer support
* add temp sensor
5 years ago
Willem Melching
7cc5710974
Tici light sensor ( #2150 )
...
* more generic sensor base class
* add file sensor
* light sensor working
* correct sensor type
5 years ago
robbederks
622e42d504
Tici sensord ( #2072 )
...
* tici sensord: WIP
* add sensor constants
* rename files
* base class
* init sensors
* publish something
* dont leak memory
* try reading from accel
* Accel works
* add time and sensor source
* Update release files
* If we want low BW we want 125hz
* this should run gyro as well
* add filter on gyro
* also filter accel data
* Add i2c files
* cast makes macos unhappy
* Same outputs as android sensord
Co-authored-by: Tici <robbe@comma.ai>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
5 years ago