Commit Graph

27 Commits

Author SHA1 Message Date
Andrew Tridgell 7235c146fa AP_OpticalFlow: use NEW_NOTHROW for new(std::nothrow) 2024-06-04 09:20:21 +10:00
Peter Barker f4d51fd8f5 AP_OpticalFlow: cope if AP_AHRS_ENABLED is 0 2024-01-03 17:35:54 +11:00
Peter Barker 3e1388b7e6 AP_OpticalFlow: add and use AP_OpticalFlow_config.h 2023-05-09 10:56:13 +10:00
Peter Barker e45f938056 AP_OpticalFlow: rename OpticalFlow class to AP_OpticalFlow
Brings us in-line with other classes in ArduPilot.

Removes ambiguity with AP_HAL::OpticalFlow which can cause compilation errors as we start to make code more portable across targets
2022-08-18 14:24:01 +10:00
Peter Barker 170b8da2fa AP_OpticalFlow: tighten scope on variables 2022-01-24 21:11:56 +09:00
Peter Barker 99ccbee474 AP_OpticalFlow: create and use AP_OPTICALFLOW_ENABLED
Including a define for each backend.
2021-12-29 18:12:03 +11:00
Peter Barker 3030c0b4f8 AP_OpticalFlow: adjust for rename of OpticalFlow.h to AP_OpticalFlow.h 2021-12-28 10:16:20 +11:00
Peter Barker ed5303d1b8 AP_OpticalFlow: rename for AHRS restructuring 2021-07-21 21:01:39 +10:00
murata 9ed38eaf7b AP_OpticalFlow: Change to collected CRC header 2019-05-21 09:19:19 +10:00
Michael du Breuil b1bc4268a9 AP_OpticalFlow: Remove unused device ID tracking 2019-04-26 20:10:56 +09:00
Randy Mackay 18c3eba829 AP_OpticalFlow: minor format fix to Pixart driver 2018-11-26 12:29:37 +09:00
Peter Barker e88358ccc6 AP_OpticalFlow: use AHRS singleton 2018-11-13 10:40:23 +11:00
Andrew Tridgell a1f1e7e435 AP_OpticalFlow: use WITH_SEMAPHORE()
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00
Peter Barker 9b23b469cf AP_OpticalFlow: correct compiler warning
In file included from
../../libraries/AP_OpticalFlow/AP_OpticalFlow_Pixart.cpp:28:
../../libraries/AP_OpticalFlow/AP_OpticalFlow_Pixart.h:75:13: warning:
private field 'sum_x' is not used [-Wunused-private-field]
    int32_t sum_x;
            ^
../../libraries/AP_OpticalFlow/AP_OpticalFlow_Pixart.h:76:13: warning:
private field 'sum_y' is not used [-Wunused-private-field]
    int32_t sum_y;
            ^
../../libraries/AP_OpticalFlow/AP_OpticalFlow_Pixart.h:77:14: warning:
private field 'last_print_ms' is not used [-Wunused-private-field]
    uint32_t last_print_ms;
             ^
4 warnings generated.
2018-03-02 09:26:37 +09:00
Andrew Tridgell ead72214ac AP_OpticalFlow: support SP01 board 2018-02-14 18:27:00 +11:00
Andrew Tridgell 570a05e9d3 AP_OpticalFlow: fixed pixart SPI name 2018-02-08 17:36:33 +11:00
Andrew Tridgell 7c8cf0a39e AP_OpticalFlow: fixed SPI name for pixart flow sensor 2018-02-08 17:36:33 +11:00
Andrew Tridgell ddf8523c2b AP_OpticalFlow: prevent crash on bad device name 2018-01-15 11:46:02 +11:00
Andrew Tridgell 97e88501c6 AP_OpticalFlow: support pixart 3901 2017-06-16 17:14:10 +01:00
murata d9dbf6e1eb AP_OpticalFlow: Change from magic number 0 to definition name. 2017-02-18 14:12:36 +00:00
Lucas De Marchi 5472bc4de1 Global: change Device::PeriodicCb signature
Remove bool return as it's never being used and not supported on PX4.
2017-01-14 10:03:54 +11:00
Andrew Tridgell 06dfbc3e09 AP_OpticalFlow: added common driver for PX4Flow
used on Linux and NuttX boards
2016-11-28 08:26:57 +11:00
Andrew Tridgell 9b93e12bbb AP_OpticalFlow: retry config register write up to 5 times 2016-11-28 08:26:57 +11:00
Andrew Tridgell ea462d80e6 AP_OpticalFlow: added _applyYaw method to backend
for common handling of yaw correction
2016-11-28 08:26:57 +11:00
Andrew Tridgell abc42c737c AP_OpticalFlow: added update function for Pixart flow driver 2016-11-28 08:26:57 +11:00
Andrew Tridgell 0be1b1aac2 AP_OpticalFlow: give access to AHRS from all backends 2016-11-28 08:26:56 +11:00
Andrew Tridgell 0889b25afa AP_OpticalFlow: initial code for Pixart optical flow chip 2016-11-28 08:26:56 +11:00