mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-04 22:17:01 +08:00
[baro] print information about which baro_board sensor is used
This commit is contained in:
@@ -27,6 +27,7 @@ else ifeq ($(BOARD), lisa_m)
|
|||||||
# defaults to i2c baro bmp085 on the board
|
# defaults to i2c baro bmp085 on the board
|
||||||
LISA_M_BARO ?= BARO_BOARD_BMP085
|
LISA_M_BARO ?= BARO_BOARD_BMP085
|
||||||
ifeq ($(LISA_M_BARO), BARO_MS5611_SPI)
|
ifeq ($(LISA_M_BARO), BARO_MS5611_SPI)
|
||||||
|
ap.CFLAGS += -DBARO_BOARD=BARO_MS5611_SPI
|
||||||
include $(CFG_SHARED)/spi_master.makefile
|
include $(CFG_SHARED)/spi_master.makefile
|
||||||
ap.CFLAGS += -DUSE_SPI2 -DUSE_SPI_SLAVE3
|
ap.CFLAGS += -DUSE_SPI2 -DUSE_SPI_SLAVE3
|
||||||
ap.CFLAGS += -DBB_MS5611_SPI_DEV=spi2
|
ap.CFLAGS += -DBB_MS5611_SPI_DEV=spi2
|
||||||
@@ -35,12 +36,14 @@ LISA_M_BARO ?= BARO_BOARD_BMP085
|
|||||||
ap.srcs += peripherals/ms5611_spi.c
|
ap.srcs += peripherals/ms5611_spi.c
|
||||||
ap.srcs += boards/baro_board_ms5611_spi.c
|
ap.srcs += boards/baro_board_ms5611_spi.c
|
||||||
else ifeq ($(LISA_M_BARO), BARO_MS5611_I2C)
|
else ifeq ($(LISA_M_BARO), BARO_MS5611_I2C)
|
||||||
|
ap.CFLAGS += -DBARO_BOARD=BARO_MS5611_I2C
|
||||||
ap.CFLAGS += -DUSE_I2C2
|
ap.CFLAGS += -DUSE_I2C2
|
||||||
ap.CFLAGS += -DBB_MS5611_I2C_DEV=i2c2
|
ap.CFLAGS += -DBB_MS5611_I2C_DEV=i2c2
|
||||||
ap.srcs += peripherals/ms5611.c
|
ap.srcs += peripherals/ms5611.c
|
||||||
ap.srcs += peripherals/ms5611_i2c.c
|
ap.srcs += peripherals/ms5611_i2c.c
|
||||||
ap.srcs += boards/baro_board_ms5611_i2c.c
|
ap.srcs += boards/baro_board_ms5611_i2c.c
|
||||||
else ifeq ($(LISA_M_BARO), BARO_BOARD_BMP085)
|
else ifeq ($(LISA_M_BARO), BARO_BOARD_BMP085)
|
||||||
|
ap.CFLAGS += -DBARO_BOARD=BARO_BOARD_BMP085
|
||||||
ap.CFLAGS += -DUSE_I2C2
|
ap.CFLAGS += -DUSE_I2C2
|
||||||
ap.srcs += peripherals/bmp085.c
|
ap.srcs += peripherals/bmp085.c
|
||||||
ap.srcs += $(SRC_BOARD)/baro_board.c
|
ap.srcs += $(SRC_BOARD)/baro_board.c
|
||||||
@@ -50,6 +53,7 @@ else ifeq ($(BOARD), lisa_mx)
|
|||||||
# defaults to MS5611 via SPI on Aspirin
|
# defaults to MS5611 via SPI on Aspirin
|
||||||
LISA_MX_BARO ?= BARO_MS5611_SPI
|
LISA_MX_BARO ?= BARO_MS5611_SPI
|
||||||
ifeq ($(LISA_MX_BARO), BARO_MS5611_SPI)
|
ifeq ($(LISA_MX_BARO), BARO_MS5611_SPI)
|
||||||
|
ap.CFLAGS += -DBARO_BOARD=BARO_MS5611_SPI
|
||||||
include $(CFG_SHARED)/spi_master.makefile
|
include $(CFG_SHARED)/spi_master.makefile
|
||||||
ap.CFLAGS += -DUSE_SPI2 -DUSE_SPI_SLAVE3
|
ap.CFLAGS += -DUSE_SPI2 -DUSE_SPI_SLAVE3
|
||||||
ap.CFLAGS += -DBB_MS5611_SPI_DEV=spi2
|
ap.CFLAGS += -DBB_MS5611_SPI_DEV=spi2
|
||||||
@@ -58,12 +62,14 @@ LISA_MX_BARO ?= BARO_MS5611_SPI
|
|||||||
ap.srcs += peripherals/ms5611_spi.c
|
ap.srcs += peripherals/ms5611_spi.c
|
||||||
ap.srcs += boards/baro_board_ms5611_spi.c
|
ap.srcs += boards/baro_board_ms5611_spi.c
|
||||||
else ifeq ($(LISA_MX_BARO), BARO_MS5611_I2C)
|
else ifeq ($(LISA_MX_BARO), BARO_MS5611_I2C)
|
||||||
|
ap.CFLAGS += -DBARO_BOARD=BARO_MS5611_I2C
|
||||||
ap.CFLAGS += -DUSE_I2C2
|
ap.CFLAGS += -DUSE_I2C2
|
||||||
ap.CFLAGS += -DBB_MS5611_I2C_DEV=i2c2
|
ap.CFLAGS += -DBB_MS5611_I2C_DEV=i2c2
|
||||||
ap.srcs += peripherals/ms5611.c
|
ap.srcs += peripherals/ms5611.c
|
||||||
ap.srcs += peripherals/ms5611_i2c.c
|
ap.srcs += peripherals/ms5611_i2c.c
|
||||||
ap.srcs += boards/baro_board_ms5611_i2c.c
|
ap.srcs += boards/baro_board_ms5611_i2c.c
|
||||||
else ifeq ($(LISA_MX_BARO), BARO_BOARD_BMP085)
|
else ifeq ($(LISA_MX_BARO), BARO_BOARD_BMP085)
|
||||||
|
ap.CFLAGS += -DBARO_BOARD=BARO_BOARD_BMP085
|
||||||
ap.CFLAGS += -DUSE_I2C2
|
ap.CFLAGS += -DUSE_I2C2
|
||||||
ap.srcs += peripherals/bmp085.c
|
ap.srcs += peripherals/bmp085.c
|
||||||
ap.srcs += $(SRC_BOARD)/baro_board.c
|
ap.srcs += $(SRC_BOARD)/baro_board.c
|
||||||
@@ -85,6 +91,7 @@ else ifeq ($(BOARD), lia)
|
|||||||
# fixme, reuse the baro drivers in lisa_m dir
|
# fixme, reuse the baro drivers in lisa_m dir
|
||||||
LIA_BARO ?= BARO_MS5611_SPI
|
LIA_BARO ?= BARO_MS5611_SPI
|
||||||
ifeq ($(LIA_BARO), BARO_MS5611_SPI)
|
ifeq ($(LIA_BARO), BARO_MS5611_SPI)
|
||||||
|
ap.CFLAGS += -DBARO_BOARD=BARO_MS5611_SPI
|
||||||
include $(CFG_SHARED)/spi_master.makefile
|
include $(CFG_SHARED)/spi_master.makefile
|
||||||
ap.CFLAGS += -DUSE_SPI2 -DUSE_SPI_SLAVE3
|
ap.CFLAGS += -DUSE_SPI2 -DUSE_SPI_SLAVE3
|
||||||
ap.CFLAGS += -DBB_MS5611_SPI_DEV=spi2
|
ap.CFLAGS += -DBB_MS5611_SPI_DEV=spi2
|
||||||
@@ -93,6 +100,7 @@ LIA_BARO ?= BARO_MS5611_SPI
|
|||||||
ap.srcs += peripherals/ms5611_spi.c
|
ap.srcs += peripherals/ms5611_spi.c
|
||||||
ap.srcs += boards/baro_board_ms5611_spi.c
|
ap.srcs += boards/baro_board_ms5611_spi.c
|
||||||
else ifeq ($(LIA_BARO), BARO_MS5611_I2C)
|
else ifeq ($(LIA_BARO), BARO_MS5611_I2C)
|
||||||
|
ap.CFLAGS += -DBARO_BOARD=BARO_MS5611_I2C
|
||||||
ap.CFLAGS += -DUSE_I2C2
|
ap.CFLAGS += -DUSE_I2C2
|
||||||
ap.CFLAGS += -DBB_MS5611_I2C_DEV=i2c2
|
ap.CFLAGS += -DBB_MS5611_I2C_DEV=i2c2
|
||||||
ap.srcs += peripherals/ms5611.c
|
ap.srcs += peripherals/ms5611.c
|
||||||
|
|||||||
@@ -29,6 +29,9 @@
|
|||||||
#ifndef BOARDS_APOGEE_BARO_H
|
#ifndef BOARDS_APOGEE_BARO_H
|
||||||
#define BOARDS_APOGEE_BARO_H
|
#define BOARDS_APOGEE_BARO_H
|
||||||
|
|
||||||
|
// only for printing the baro type during compilation
|
||||||
|
#define BARO_BOARD BARO_BOARD_MPL3115
|
||||||
|
|
||||||
extern void apogee_baro_event(void);
|
extern void apogee_baro_event(void);
|
||||||
#define BaroEvent apogee_baro_event
|
#define BaroEvent apogee_baro_event
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,9 @@
|
|||||||
#ifndef BOARDS_KROOZ_BARO_H
|
#ifndef BOARDS_KROOZ_BARO_H
|
||||||
#define BOARDS_KROOZ_BARO_H
|
#define BOARDS_KROOZ_BARO_H
|
||||||
|
|
||||||
|
// only for printing the baro type during compilation
|
||||||
|
#define BARO_BOARD BARO_BOARD_MS5611_I2C
|
||||||
|
|
||||||
extern void baro_event(void);
|
extern void baro_event(void);
|
||||||
#define BaroEvent baro_event
|
#define BaroEvent baro_event
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,11 @@
|
|||||||
#ifndef BOARDS_LISA_M_BARO_H
|
#ifndef BOARDS_LISA_M_BARO_H
|
||||||
#define BOARDS_LISA_M_BARO_H
|
#define BOARDS_LISA_M_BARO_H
|
||||||
|
|
||||||
|
// only for printing the baro type during compilation
|
||||||
|
#ifndef BARO_BOARD
|
||||||
|
#define BARO_BOARD BARO_BOARD_BMP085
|
||||||
|
#endif
|
||||||
|
|
||||||
// for right now we abuse this file for the ms5611 baro on aspirin as well
|
// for right now we abuse this file for the ms5611 baro on aspirin as well
|
||||||
|
|
||||||
extern void baro_event(void);
|
extern void baro_event(void);
|
||||||
|
|||||||
@@ -7,6 +7,11 @@
|
|||||||
#ifndef BOARDS_LISA_MX_BARO_H
|
#ifndef BOARDS_LISA_MX_BARO_H
|
||||||
#define BOARDS_LISA_MX_BARO_H
|
#define BOARDS_LISA_MX_BARO_H
|
||||||
|
|
||||||
|
// only for printing the baro type during compilation
|
||||||
|
#ifndef BARO_BOARD
|
||||||
|
#define BARO_BOARD BARO_MS5611_SPI
|
||||||
|
#endif
|
||||||
|
|
||||||
extern void baro_event(void);
|
extern void baro_event(void);
|
||||||
#define BaroEvent baro_event
|
#define BaroEvent baro_event
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* board specific functions for the lisa_m board
|
* board specific functions for the lisa_s board
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -9,6 +9,9 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.h"
|
||||||
|
|
||||||
|
// only for printing the baro type during compilation
|
||||||
|
#define BARO_BOARD BARO_MS5611_SPI
|
||||||
|
|
||||||
extern void baro_event(void);
|
extern void baro_event(void);
|
||||||
|
|
||||||
#define BaroEvent baro_event
|
#define BaroEvent baro_event
|
||||||
|
|||||||
@@ -29,6 +29,9 @@
|
|||||||
#ifndef BOARDS_NAVGO_BARO_H
|
#ifndef BOARDS_NAVGO_BARO_H
|
||||||
#define BOARDS_NAVGO_BARO_H
|
#define BOARDS_NAVGO_BARO_H
|
||||||
|
|
||||||
|
// only for printing the baro type during compilation
|
||||||
|
#define BARO_BOARD BARO_BOARD_MPC355X
|
||||||
|
|
||||||
extern void navgo_baro_event(void);
|
extern void navgo_baro_event(void);
|
||||||
|
|
||||||
// define BaroEvent macro
|
// define BaroEvent macro
|
||||||
|
|||||||
@@ -7,6 +7,9 @@
|
|||||||
#ifndef BOARDS_PX4FMU_BARO_H
|
#ifndef BOARDS_PX4FMU_BARO_H
|
||||||
#define BOARDS_PX4FMU_BARO_H
|
#define BOARDS_PX4FMU_BARO_H
|
||||||
|
|
||||||
|
// only for printing the baro type during compilation
|
||||||
|
#define BARO_BOARD BARO_BOARD_MS5611_I2C
|
||||||
|
|
||||||
extern void baro_event(void);
|
extern void baro_event(void);
|
||||||
|
|
||||||
#define BaroEvent baro_event
|
#define BaroEvent baro_event
|
||||||
|
|||||||
@@ -29,6 +29,9 @@
|
|||||||
#ifndef BOARDS_UMARIM_BARO_H
|
#ifndef BOARDS_UMARIM_BARO_H
|
||||||
#define BOARDS_UMARIM_BARO_H
|
#define BOARDS_UMARIM_BARO_H
|
||||||
|
|
||||||
|
// only for printing the baro type during compilation
|
||||||
|
#define BARO_BOARD BARO_BOARD_MPXA6115
|
||||||
|
|
||||||
extern void umarim_baro_event(void);
|
extern void umarim_baro_event(void);
|
||||||
#define BaroEvent umarim_baro_event
|
#define BaroEvent umarim_baro_event
|
||||||
|
|
||||||
|
|||||||
@@ -55,8 +55,8 @@
|
|||||||
#endif
|
#endif
|
||||||
#include "subsystems/air_data.h"
|
#include "subsystems/air_data.h"
|
||||||
#if USE_BARO_BOARD
|
#if USE_BARO_BOARD
|
||||||
PRINT_CONFIG_MSG("USE_BARO_BOARD is TRUE: Reading onboard baro.")
|
|
||||||
#include "subsystems/sensors/baro.h"
|
#include "subsystems/sensors/baro.h"
|
||||||
|
PRINT_CONFIG_MSG_VALUE("USE_BARO_BOARD is TRUE, reading onboard baro: ", BARO_BOARD)
|
||||||
#endif
|
#endif
|
||||||
#include "subsystems/ins.h"
|
#include "subsystems/ins.h"
|
||||||
|
|
||||||
|
|||||||
@@ -55,8 +55,8 @@
|
|||||||
#include "subsystems/air_data.h"
|
#include "subsystems/air_data.h"
|
||||||
|
|
||||||
#if USE_BARO_BOARD
|
#if USE_BARO_BOARD
|
||||||
PRINT_CONFIG_MSG("USE_BARO_BOARD is TRUE: Reading onboard baro.")
|
|
||||||
#include "subsystems/sensors/baro.h"
|
#include "subsystems/sensors/baro.h"
|
||||||
|
PRINT_CONFIG_MSG_VALUE("USE_BARO_BOARD is TRUE, reading onboard baro: ", BARO_BOARD)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "subsystems/electrical.h"
|
#include "subsystems/electrical.h"
|
||||||
|
|||||||
@@ -32,8 +32,12 @@
|
|||||||
#define SUBSYSTEMS_SENSORS_BARO_H
|
#define SUBSYSTEMS_SENSORS_BARO_H
|
||||||
|
|
||||||
#include BOARD_CONFIG
|
#include BOARD_CONFIG
|
||||||
|
|
||||||
#if USE_BARO_BOARD
|
#if USE_BARO_BOARD
|
||||||
#include "baro_board.h"
|
#include "baro_board.h"
|
||||||
|
#ifndef BARO_BOARD
|
||||||
|
#define BARO_BOARD BARO_BOARD_DEFAULT
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern void baro_init(void);
|
extern void baro_init(void);
|
||||||
|
|||||||
Reference in New Issue
Block a user