Skip to content

Commit

Permalink
Merge pull request betaflight#8771 from etracer65/target_furyf4osd_ad…
Browse files Browse the repository at this point in the history
…d_baro

Add missing baro support for target FURYF4OSD
  • Loading branch information
hydra authored and mikeller committed Aug 31, 2019
1 parent 2c8c14e commit f581b5b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 27 deletions.
49 changes: 25 additions & 24 deletions src/main/target/FURYF4/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
#pragma once

#ifdef FURYF4OSD
#define TARGET_BOARD_IDENTIFIER "FY4O"
#define USBD_PRODUCT_STRING "FuryF4OSD"
#define TARGET_BOARD_IDENTIFIER "FY4O"
#define USBD_PRODUCT_STRING "FuryF4OSD"
#else
#define TARGET_BOARD_IDENTIFIER "FYF4"
#define USBD_PRODUCT_STRING "FuryF4"
#define TARGET_BOARD_IDENTIFIER "FYF4"
#define USBD_PRODUCT_STRING "FuryF4"
#endif

#define LED0_PIN PB5
Expand Down Expand Up @@ -58,32 +58,33 @@
#define USE_ACC_SPI_ICM20689
#define ACC_1_ALIGN CW180_DEG

#define USE_BARO
#define USE_BARO_MS5611
#define USE_BARO_BMP280
#define MS5611_I2C_INSTANCE I2CDEV_1

#ifdef FURYF4OSD
#define USE_MAX7456
#define MAX7456_SPI_INSTANCE SPI2
#define MAX7456_SPI_CS_PIN PB12
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
#define USE_MAX7456
#define MAX7456_SPI_INSTANCE SPI2
#define MAX7456_SPI_CS_PIN PB12
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)

#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT

#define DEFAULT_FEATURES FEATURE_OSD
#define DEFAULT_FEATURES FEATURE_OSD

#else

#define USE_BARO
#define USE_BARO_MS5611
#define MS5611_I2C_INSTANCE I2CDEV_1

#define USE_SDCARD
#define USE_SDCARD_SPI
#define SDCARD_DETECT_INVERTED
#define SDCARD_DETECT_PIN PD2
#define SDCARD_SPI_INSTANCE SPI2
#define SDCARD_SPI_CS_PIN PB12
#define SPI2_TX_DMA_OPT 0 // DMA 1 Stream 4 Channel 0
#define SPI2_TX_DMA_OPT 0 // DMA 1 Stream 4 Channel 0
#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
#define USE_SDCARD
#define USE_SDCARD_SPI
#define SDCARD_DETECT_INVERTED
#define SDCARD_DETECT_PIN PD2
#define SDCARD_SPI_INSTANCE SPI2
#define SDCARD_SPI_CS_PIN PB12
#define SPI2_TX_DMA_OPT 0 // DMA 1 Stream 4 Channel 0
#define SPI2_TX_DMA_OPT 0 // DMA 1 Stream 4 Channel 0
#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT

#endif

Expand Down
6 changes: 3 additions & 3 deletions src/main/target/FURYF4/target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ TARGET_SRC = \
ifeq ($(TARGET), FURYF4OSD)
TARGET_SRC += \
drivers/max7456.c
else
TARGET_SRC += \
drivers/barometer/barometer_ms5611.c
endif
TARGET_SRC += \
drivers/barometer/barometer_ms5611.c \
drivers/barometer/barometer_bmp280.c

0 comments on commit f581b5b

Please sign in to comment.