mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-30 03:27:33 +08:00
wrapper module to use a board specific barometer
This commit is contained in:
@@ -0,0 +1,17 @@
|
|||||||
|
<!DOCTYPE module SYSTEM "module.dtd">
|
||||||
|
|
||||||
|
<module name="baro_board" dir="sensors">
|
||||||
|
<header>
|
||||||
|
<file name="baro_board_module.h"/>
|
||||||
|
</header>
|
||||||
|
<init fun="baro_init()"/>
|
||||||
|
<periodic fun="baro_periodic()" freq="60."/>
|
||||||
|
<event fun="BaroEvent(baro_abs,baro_diff)"/>
|
||||||
|
<makefile target="ap">
|
||||||
|
<define name="USE_BARO_AS_ALTIMETER"/>
|
||||||
|
<file name="baro_board.c" dir="boards/$(BOARD)"/>
|
||||||
|
<define name="ADS1114_I2C_DEVICE" value="i2c1"/>
|
||||||
|
<file name="ads1114.c" dir="peripherals"/>
|
||||||
|
</makefile>
|
||||||
|
</module>
|
||||||
|
|
||||||
@@ -66,5 +66,6 @@ void baro_periodic( void ) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
// Read the ADC
|
// Read the ADC
|
||||||
//ads1114_read();
|
ads1114_read();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -68,3 +68,4 @@ void baro_periodic( void ) {
|
|||||||
// Read the ADC
|
// Read the ADC
|
||||||
ads1114_read();
|
ads1114_read();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2011 Gautier Hattenberger
|
||||||
|
*
|
||||||
|
* This file is part of paparazzi.
|
||||||
|
*
|
||||||
|
* paparazzi is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
* any later version.
|
||||||
|
*
|
||||||
|
* paparazzi is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with paparazzi; see the file COPYING. If not, write to
|
||||||
|
* the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||||
|
* Boston, MA 02111-1307, USA.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Wrapper for the board specific barometer
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BARO_BOARD_MODULE_H
|
||||||
|
#define BARO_BOARD_MODULE_H
|
||||||
|
|
||||||
|
#include "subsystems/sensors/baro.h"
|
||||||
|
|
||||||
|
static inline void baro_abs(void) {}
|
||||||
|
static inline void baro_diff(void) {}
|
||||||
|
#endif
|
||||||
Reference in New Issue
Block a user