mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
add pmw3901 optical flow support for fmu-v5 (#10750)
This commit is contained in:
parent
99294b2040
commit
d2e2b5e8ce
@ -345,6 +345,9 @@ then
|
||||
|
||||
# Possible internal compass
|
||||
ist8310 -C -b 5 start
|
||||
|
||||
# Possible pmw3901 optical flow sensor
|
||||
pmw3901 start
|
||||
fi
|
||||
|
||||
if ver hwcmp PX4_SAME70XPLAINED_V1
|
||||
|
||||
@ -32,6 +32,7 @@ set(config_module_list
|
||||
drivers/irlock
|
||||
drivers/mkblctrl
|
||||
drivers/oreoled
|
||||
drivers/pmw3901
|
||||
drivers/pwm_input
|
||||
drivers/pwm_out_sim
|
||||
drivers/px4flow
|
||||
|
||||
@ -79,16 +79,20 @@
|
||||
#include <board_config.h>
|
||||
|
||||
/* Configuration Constants */
|
||||
#ifdef PX4_SPI_BUS_EXPANSION
|
||||
#if defined PX4_SPI_BUS_EXPANSION // crazyflie
|
||||
#define PMW3901_BUS PX4_SPI_BUS_EXPANSION
|
||||
#elif defined PX4_SPI_BUS_EXTERNAL1 // fmu-v5
|
||||
#define PMW3901_BUS PX4_SPI_BUS_EXTERNAL1
|
||||
#else
|
||||
#define PMW3901_BUS 0
|
||||
#error "add the required spi bus from board_config.h here"
|
||||
#endif
|
||||
|
||||
#ifdef PX4_SPIDEV_EXPANSION_2
|
||||
#if defined PX4_SPIDEV_EXPANSION_2 // crazyflie flow deck
|
||||
#define PMW3901_SPIDEV PX4_SPIDEV_EXPANSION_2
|
||||
#elif defined PX4_SPIDEV_EXTERNAL1_1 // fmu-v5 ext CS1
|
||||
#define PMW3901_SPIDEV PX4_SPIDEV_EXTERNAL1_1
|
||||
#else
|
||||
#define PMW3901_SPIDEV 0
|
||||
#error "add the required spi dev from board_config.h here"
|
||||
#endif
|
||||
|
||||
#define PMW3901_SPI_BUS_SPEED (2000000L) // 2MHz
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user