AP_Baro_MS5611_test: Add HAL specific code.

This commit is contained in:
Víctor Mayoral Vilches 2014-06-05 10:18:33 +02:00 committed by Andrew Tridgell
parent d2b5a1cfac
commit 8a85f8d6d2
1 changed files with 7 additions and 1 deletions

View File

@ -7,6 +7,7 @@
#include <AP_Buffer.h> #include <AP_Buffer.h>
#include <Filter.h> #include <Filter.h>
#include <AP_Baro.h> #include <AP_Baro.h>
#include <../../../AP_HAL_Linux/GPIO.h>
#include <AP_HAL_AVR.h> #include <AP_HAL_AVR.h>
#include <AP_HAL_Linux.h> #include <AP_HAL_Linux.h>
@ -24,9 +25,14 @@ void setup()
hal.scheduler->delay(1000); hal.scheduler->delay(1000);
#if CONFIG_HAL_BOARD == HAL_BOARD_APM2 #if CONFIG_HAL_BOARD == HAL_BOARD_APM2
hal.gpio->pinMode(63, GPIO_OUTPUT); hal.gpio->pinMode(63, HAL_GPIO_OUTPUT);
hal.gpio->write(63, 1); hal.gpio->write(63, 1);
#endif #endif
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX || CONFIG_HAL_BOARD == HAL_BOARD_ERLE
hal.gpio->pinMode(BBB_P9_28, HAL_GPIO_OUTPUT);
hal.gpio->write(BBB_P9_28, 1);
#endif
baro.init(); baro.init();
baro.calibrate(); baro.calibrate();