From be50c00b7c57ff6714694e0862bdf910de7b8484 Mon Sep 17 00:00:00 2001 From: James Cotton Date: Tue, 24 Jan 2012 01:49:36 -0600 Subject: [PATCH] Make sure BMA180/L3GD20 can be disabled --- flight/CopterControl/System/pios_board.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flight/CopterControl/System/pios_board.c b/flight/CopterControl/System/pios_board.c index e72d27275..05d0a5dd3 100644 --- a/flight/CopterControl/System/pios_board.c +++ b/flight/CopterControl/System/pios_board.c @@ -1744,12 +1744,15 @@ void PIOS_Board_Init(void) { if (PIOS_SPI_Init(&pios_spi_gyro_id, &pios_spi_gyro_cfg)) { PIOS_Assert(0); } - +#if defined(PIOS_INCLUDE_L3GD20) PIOS_L3GD20_Attach(pios_spi_gyro_id); PIOS_L3GD20_Init(&pios_l3gd20_cfg); +#endif /* PIOS_INCLUDE_L3GD20 */ +#if defined(PIOS_INCLUDE_BMA180) PIOS_BMA180_Attach(pios_spi_flash_accel_id); PIOS_BMA180_Init(&pios_bma180_cfg); +#endif /* PIOS_INCLUDE_BMA180 */ break; default: