mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-20 05:52:11 +01:00
altitude: add optional altitude module
This commit is contained in:
parent
717c1311e6
commit
53e9ef06b4
@ -50,7 +50,7 @@ ENABLE_AUX_UART ?= NO
|
||||
|
||||
USE_GPS ?= YES
|
||||
|
||||
USE_I2C ?= NO
|
||||
USE_I2C ?= YES
|
||||
|
||||
# Set to YES when using Code Sourcery toolchain
|
||||
CODE_SOURCERY ?= YES
|
||||
@ -65,7 +65,7 @@ endif
|
||||
FLASH_TOOL = OPENOCD
|
||||
|
||||
# List of modules to include
|
||||
OPTMODULES = CameraStab ComUsbBridge
|
||||
OPTMODULES = CameraStab ComUsbBridge Altitude
|
||||
ifeq ($(USE_GPS), YES)
|
||||
OPTMODULES += GPS
|
||||
endif
|
||||
@ -182,6 +182,7 @@ SRC += $(OPUAVSYNTHDIR)/receiveractivity.c
|
||||
SRC += $(OPUAVSYNTHDIR)/taskinfo.c
|
||||
SRC += $(OPUAVSYNTHDIR)/mixerstatus.c
|
||||
SRC += $(OPUAVSYNTHDIR)/ratedesired.c
|
||||
SRC += $(OPUAVSYNTHDIR)/baroaltitude.c
|
||||
|
||||
endif
|
||||
|
||||
@ -225,6 +226,7 @@ SRC += $(PIOSCOMMON)/pios_flash_w25x.c
|
||||
SRC += $(PIOSCOMMON)/pios_adxl345.c
|
||||
SRC += $(PIOSCOMMON)/pios_com.c
|
||||
SRC += $(PIOSCOMMON)/pios_i2c_esc.c
|
||||
SRC += $(PIOSCOMMON)/pios_bmp085.c
|
||||
SRC += $(PIOSCOMMON)/pios_iap.c
|
||||
SRC += $(PIOSCOMMON)/pios_bl_helper.c
|
||||
SRC += $(PIOSCOMMON)/pios_rcvr.c
|
||||
|
@ -76,6 +76,8 @@
|
||||
#define PIOS_INCLUDE_ADXL345
|
||||
#define PIOS_INCLUDE_FLASH
|
||||
|
||||
#define PIOS_INCLUDE_BMP085
|
||||
|
||||
/* A really shitty setting saving implementation */
|
||||
#define PIOS_INCLUDE_FLASH_SECTOR_SETTINGS
|
||||
|
||||
|
@ -1464,7 +1464,7 @@ void PIOS_Board_Init(void) {
|
||||
case HWSETTINGS_CC_FLEXIPORT_I2C:
|
||||
#if defined(PIOS_INCLUDE_I2C)
|
||||
{
|
||||
if (PIOS_I2C_Init(&pios_i2c_main_adapter_id, &pios_i2c_main_adapter_cfg)) {
|
||||
if (PIOS_I2C_Init(&pios_i2c_flexi_adapter_id, &pios_i2c_flexi_adapter_cfg)) {
|
||||
PIOS_Assert(0);
|
||||
}
|
||||
}
|
||||
|
@ -47,8 +47,7 @@
|
||||
// Private constants
|
||||
#define STACK_SIZE_BYTES 500
|
||||
#define TASK_PRIORITY (tskIDLE_PRIORITY+1)
|
||||
//#define UPDATE_PERIOD 100
|
||||
#define UPDATE_PERIOD 25
|
||||
#define UPDATE_PERIOD 50
|
||||
|
||||
// Private types
|
||||
|
||||
|
@ -113,6 +113,12 @@ TIM4 | RC In 1 | Servo 3 | Servo 2 | Servo 1
|
||||
extern uint32_t pios_i2c_flexi_adapter_id;
|
||||
#define PIOS_I2C_MAIN_ADAPTER (pios_i2c_flexi_adapter_id)
|
||||
#define PIOS_I2C_ESC_ADAPTER (pios_i2c_flexi_adapter_id)
|
||||
#define PIOS_I2C_BMP085_ADAPTER (pios_i2c_flexi_adapter_id)
|
||||
|
||||
//------------------------
|
||||
// PIOS_BMP085
|
||||
//------------------------
|
||||
#define PIOS_BMP085_OVERSAMPLING 3
|
||||
|
||||
//-------------------------
|
||||
// SPI
|
||||
|
Loading…
x
Reference in New Issue
Block a user