56 Commits

Author SHA1 Message Date
Hamish Willee
30e2490d5b
Docs are now in user guide and main (#19977)
* Fix links to docs in source to point to docs on main not master

* More docs and scripts that need to point to main
2022-08-01 11:39:39 +10:00
Daniel Agar
ab4e10dc26 paa3905: update scaling from datasheet 2022-06-21 16:59:14 -04:00
Daniel Agar
07e28fda7a paw3902: update scaling from datasheet 2022-06-21 16:59:14 -04:00
Daniel Agar
e5f081d9ac drivers/optical_flow/paa3905: cleanup/overhaul
- remove internal accumulation and publish every valid raw sample synchronized with sensor
 - store timestamp_sample from motion interrupt
 - improve timing requirements from datasheet (minimum delays after register read/write)
2022-06-20 20:56:56 -04:00
Daniel Agar
1fbe3c4ab3 drivers/optical_flow/paw3902: cleanup/overhaul
- remove internal accumulation and publish every valid raw sample synchronized with sensor
 - store timestamp_sample from motion interrupt
 - improve timing requirements from datasheet (minimum delays after register read/write)
2022-06-20 20:56:56 -04:00
Daniel Agar
d5839e2dd5 optical flow sensor pipeline overhaul
- all sources of optical flow publish sensor_optical_flow
 - sensor_optical_flow is aggregated by the sensors module, aligned with integrated gyro, and published as vehicle_optical_flow

Co-authored-by: alexklimaj <alex@arkelectron.com>
2022-06-20 20:56:56 -04:00
Daniel Agar
9073f3ccdf px4flow allow delayed background startup 2022-04-22 21:11:02 -04:00
alexklimaj
6e0ac66c3c drivers/optical_flow: new PixArt PAA3905 optical flow driver 2022-04-14 16:47:53 -04:00
Peter van der Perk
6af0477733 [Kconfig] Gnerate px4board from old cmake
Added make updateconfig to update all config when default's have changed
Added cmake to px4board conversion script
2021-10-07 10:09:01 -04:00
Peter van der Perk
d5e3e9a7bc [Kconfig] Decompose Kconfig, now each module has its own Kconfig
Which is better for versioning and decomposability
2021-10-07 10:09:01 -04:00
Peter van der Perk
7a747b43f6 Initial boardconfig working with FMUK66 2021-10-07 10:09:01 -04:00
Daniel Agar
62144c6b6b optical_flow/paw3902: minor improvements
- configure a backup schedule when using motion interrupt otherwise the
sensor will stop publishing entirely in the dark
 - as a precaution issue full reset if sensor is stuck in a bad state
(no vaid data for an extended period)
 - update light mode change criteria to match datasheet exactly
2021-07-10 09:46:56 -04:00
Beat Küng
e644036325 drivers: use updated I2C SPI driver interface 2021-07-08 12:59:35 -04:00
Hamish Willee
74cc1d901d Thoneflow - fix up links to docs 2021-06-22 13:43:53 -04:00
David Sidrane
84dd8839a2 i2c_spi_buses:Track NuttX change to getopts avoid name collision
NuttX #defined optarg and getopt to move to TLS. This fixes the
  name collision.
2021-06-16 17:07:47 +02:00
Daniel Agar
3a3cc33d69 drivers/optical_flow/paw3902: require >= 10 valid consecutive readings before deciding mode changes
- improve mode change requirements comments
 - reduce verified read/write retries (these are mostly wasting time)
2021-05-16 20:29:06 -04:00
Daniel Agar
177ee4cbca drivers/optical_flow/paw3902: properly discard samples after mode change
- respect mode 2 shutter requirements from datasheet (should not operate with Shutter < 0x01F4 in Mode 2)
 - sensor reset is handled by mode change
2021-05-05 21:48:01 -04:00
Alex Mikhalev
cbf34109d1 paw3902: Default to using SENS_FLOW_ROT rotation
This restores the behavior to what it was previous to #16338 (74083d6).

Signed-off-by: Alex Mikhalev <alex@corvus-robotics.com>
2021-04-26 15:14:17 -04:00
Daniel Agar
4092f87390 paw3902: fixes and improvements
- fully respect datasheet quality and shutter metrics for mode changes
 - use MOTION pin for scheduling if available
 - log light mode
 - refactor common enable LED code
 - respect read and write time delays
2021-03-16 15:52:03 -04:00
斯东Stone
b0a5d431d3
optical_flow/thoneflow: update the data timespan 2021-02-24 21:28:29 -05:00
JacobCrabill
85796fbd84 Drivers: Distance Sensors: Add proper device IDs
Add new DeviceBusType_SERIAL to Device::DeviceId union
Add DRV_DIST_DEVTYPE's for all distance sensors
Change distance_sensor_s.id to distance_sensor_s.device_id
Modify all distance_sensor drivers to apply 'proper' device_id
2021-01-27 17:02:20 -05:00
Daniel Agar
a57b9f9381 delete drv_baro.h, drv_mag.h, drv_range_finder.h, drv_device.h and purge UAVCAN CDev usage 2021-01-12 22:04:52 -05:00
Daniel Agar
74083d6bd1
optical_flow/paw3902: minor improvements
- verify register writes
 - cleanly reset on lighting mode changes as per the datasheet
 - perf counters for mode switches and other errors
 - cleanly reset on false motion detection
 - minimize sleep on reset
 - allowing setting custom rotation yaw angle directly on command line with -Y (ignoring SENS_FLOW_ROT)
 - enable LED output
2020-12-16 20:04:46 -05:00
Daniel Agar
3f9e5a6934 drivers/device/ringbuffer: move into crazyflie syslink (only remaining user) 2020-11-17 19:47:06 -05:00
bresch
142724748a pmw3901: Adjust scale factor to match gyro data 2020-10-26 14:10:25 -04:00
Matthias Grob
d4296dbd3f
thoneflow: remove unsupported parameter from getopt optsting 2020-08-26 20:25:31 -04:00
Kabir Mohammed
c319bbd6f7
drivers/optical_flow: Thoneflow 3901U Driver
* srcparser.py: Add optical flow subcategory for module docs
* thoneflow : Initial support
2020-08-26 13:10:38 -04:00
Koby Aizer
60d767406a PAW3902: document that the driver is also compatible with PAW3903 module 2020-07-30 10:05:49 -04:00
Daniel Agar
f7415c3354 optical_flow/paw3902: silence info output (info -> debug) 2020-07-29 11:58:54 -04:00
pengl-aee09
18eccb0cbd PAW3902: align mode change logic with the spec
1. The spec specifies that the mode change condition should be met for 10
   consecutive frames before changing to the next mode.
2. The spec (and comment) says that "PAW3902JF should not operate with Shutter < 0x01F4 in Mode 2" -
   however the if condition checked the reverse condition

Signed-off-by: Koby Aizer <koby.aizer@tg-17.com>
2020-07-28 21:29:43 -04:00
Daniel Agar
02f4ad61ec
I2C/SPI require device type in constructor 2020-04-01 12:24:22 -04:00
Daniel Agar
28dc225015 add SENS_EN_PAW3902 to start paw3902 optical flow sensor 2020-03-26 13:08:59 -04:00
Beat Küng
1710cd9648 refactor px4flow: use driver base class 2020-03-17 23:31:17 -04:00
Beat Küng
b6119c71df refactor paw3902: use driver base class 2020-03-17 23:31:17 -04:00
Beat Küng
58f386a81c refactor pmw3910: use driver base class 2020-03-17 23:31:17 -04:00
joevn
04ba05f5a0 PAW3902: fix mode change shutter thresholds
According to PixArt datasheet
2020-01-13 14:05:26 -05:00
Daniel Agar
aaf5670e7d
deprecate df_bmp280_wrapper and replace with in tree bmp280
- deprecate DriverFramework bmp280 driver (df_bmp280_wrapper)
 - update beaglebone blue and snapdragon flight eagle boards to use in tree bmp280
 - update posix (really just linux) and qurt I2C wrappers
 - tested on beaglebone blue
2020-01-05 13:33:12 -05:00
Daniel Agar
92933d988b px4flow update orb_publish usage to uORB::PublicationMulti<> 2019-11-30 15:52:53 -05:00
Beat Küng
3198610f85 src/platforms: move all headers to platforms/common/include/px4_platform_common
and remove the px4_ prefix, except for px4_config.h.

command to update includes:
for k in app.h atomic.h cli.h console_buffer.h defines.h getopt.h i2c.h init.h log.h micro_hal.h module.h module_params.h param.h param_macros.h posix.h sem.h sem.hpp shmem.h shutdown.h tasks.h time.h workqueue.h; do for i in $(grep -rl 'include <px4_'$k src platforms boards); do sed -i 's/#include <px4_'$k'/#include <px4_platform_common\/'$k/ $i; done; done
for in $(grep -rl 'include <px4_config.h' src platforms boards); do sed -i 's/#include <px4_config.h/#include <px4_platform_common\/px4_config.h'/ $i; done

Transitional headers for submodules are added (px4_{defines,log,time}.h)
2019-10-30 11:48:47 +01:00
Daniel Agar
26364d44c9
px4_work_queue: command line status output and shutdown empty queues
* adds a work_queue systemcmd that will bring a tree view of all active work queues and work items
 * WorkQueues now track attached WorkItems and will shutdown when the last WorkItem is detached
2019-10-02 12:23:17 -04:00
Nico van Duijn
18eaeb564d PMW3901 improvements (#12977)
* PMW3901: use frame count and quality metric

* PMW3901: set qual to 0 for unsuccessful SPI reads

* PMW3901: improve comment for collect_time

* PMW3901: set qual to zero for huge flow values
2019-09-17 10:54:56 -04:00
Nico van Duijn
b4709d229a PMW3901: use quality metric 2019-09-04 08:03:04 -07:00
BazookaJoe1900
8a45c6145b add new parameter SENS_EN_PMW3901 to start pmw3901 optical flow 2019-09-02 11:08:51 -04:00
Daniel Agar
9aad996b04 PMW3901 add register write delay (TIME_us_TSWW) 2019-09-01 14:19:46 -04:00
Daniel Agar
ab92f3ab7d pmw3901 split out header and main 2019-09-01 14:19:46 -04:00
Daniel Agar
41e544727c pmw3901 cleanup and updates
- includes updates from PixArt
2019-09-01 14:19:46 -04:00
Daniel Agar
78ef8aab2d STACK_MAIN increase default 1024 -> 2048 2019-08-30 19:11:51 -07:00
Beat Küng
f8e0441e7b src/platforms/common: move to platforms/common
Script to update include paths:
for i in $(grep -rl 'include <px4_work_queue' src platforms); do sed -i 's/#include <px4_work_queue/#include <px4_platform_common\/px4_work_queue/' $i; done
2019-08-30 07:59:44 +02:00
Daniel Agar
5d813224c8 PX4 SPI default to thread locking mode 2019-08-20 21:36:21 -04:00
Daniel Agar
e8a11086eb create uORB::PublicationMulti for multi publications 2019-08-08 21:01:56 -04:00