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