1
0
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:
Stacey Sheldon 2012-01-14 15:17:24 -05:00
parent 717c1311e6
commit 53e9ef06b4
5 changed files with 14 additions and 5 deletions

View File

@ -50,7 +50,7 @@ ENABLE_AUX_UART ?= NO
USE_GPS ?= YES USE_GPS ?= YES
USE_I2C ?= NO USE_I2C ?= YES
# Set to YES when using Code Sourcery toolchain # Set to YES when using Code Sourcery toolchain
CODE_SOURCERY ?= YES CODE_SOURCERY ?= YES
@ -65,7 +65,7 @@ endif
FLASH_TOOL = OPENOCD FLASH_TOOL = OPENOCD
# List of modules to include # List of modules to include
OPTMODULES = CameraStab ComUsbBridge OPTMODULES = CameraStab ComUsbBridge Altitude
ifeq ($(USE_GPS), YES) ifeq ($(USE_GPS), YES)
OPTMODULES += GPS OPTMODULES += GPS
endif endif
@ -182,6 +182,7 @@ SRC += $(OPUAVSYNTHDIR)/receiveractivity.c
SRC += $(OPUAVSYNTHDIR)/taskinfo.c SRC += $(OPUAVSYNTHDIR)/taskinfo.c
SRC += $(OPUAVSYNTHDIR)/mixerstatus.c SRC += $(OPUAVSYNTHDIR)/mixerstatus.c
SRC += $(OPUAVSYNTHDIR)/ratedesired.c SRC += $(OPUAVSYNTHDIR)/ratedesired.c
SRC += $(OPUAVSYNTHDIR)/baroaltitude.c
endif endif
@ -225,6 +226,7 @@ SRC += $(PIOSCOMMON)/pios_flash_w25x.c
SRC += $(PIOSCOMMON)/pios_adxl345.c SRC += $(PIOSCOMMON)/pios_adxl345.c
SRC += $(PIOSCOMMON)/pios_com.c SRC += $(PIOSCOMMON)/pios_com.c
SRC += $(PIOSCOMMON)/pios_i2c_esc.c SRC += $(PIOSCOMMON)/pios_i2c_esc.c
SRC += $(PIOSCOMMON)/pios_bmp085.c
SRC += $(PIOSCOMMON)/pios_iap.c SRC += $(PIOSCOMMON)/pios_iap.c
SRC += $(PIOSCOMMON)/pios_bl_helper.c SRC += $(PIOSCOMMON)/pios_bl_helper.c
SRC += $(PIOSCOMMON)/pios_rcvr.c SRC += $(PIOSCOMMON)/pios_rcvr.c

View File

@ -76,6 +76,8 @@
#define PIOS_INCLUDE_ADXL345 #define PIOS_INCLUDE_ADXL345
#define PIOS_INCLUDE_FLASH #define PIOS_INCLUDE_FLASH
#define PIOS_INCLUDE_BMP085
/* A really shitty setting saving implementation */ /* A really shitty setting saving implementation */
#define PIOS_INCLUDE_FLASH_SECTOR_SETTINGS #define PIOS_INCLUDE_FLASH_SECTOR_SETTINGS

View File

@ -1464,7 +1464,7 @@ void PIOS_Board_Init(void) {
case HWSETTINGS_CC_FLEXIPORT_I2C: case HWSETTINGS_CC_FLEXIPORT_I2C:
#if defined(PIOS_INCLUDE_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); PIOS_Assert(0);
} }
} }

View File

@ -47,8 +47,7 @@
// Private constants // Private constants
#define STACK_SIZE_BYTES 500 #define STACK_SIZE_BYTES 500
#define TASK_PRIORITY (tskIDLE_PRIORITY+1) #define TASK_PRIORITY (tskIDLE_PRIORITY+1)
//#define UPDATE_PERIOD 100 #define UPDATE_PERIOD 50
#define UPDATE_PERIOD 25
// Private types // Private types

View File

@ -113,6 +113,12 @@ TIM4 | RC In 1 | Servo 3 | Servo 2 | Servo 1
extern uint32_t pios_i2c_flexi_adapter_id; extern uint32_t pios_i2c_flexi_adapter_id;
#define PIOS_I2C_MAIN_ADAPTER (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_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 // SPI