mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 02:23:33 +08:00
add pmw3901 optical flow support for fmu-v5 (#10750)
This commit is contained in:
committed by
Daniel Agar
parent
99294b2040
commit
d2e2b5e8ce
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user