mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-05 06:54:49 +08:00
moved firmwares/rotorcraft/baro to subsystems/sensors/baro
This commit is contained in:
@@ -21,7 +21,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "firmwares/rotorcraft/baro.h"
|
#include "subsystems/sensors/baro.h"
|
||||||
|
|
||||||
#include "generated/airframe.h"
|
#include "generated/airframe.h"
|
||||||
#include "led.h"
|
#include "led.h"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.h"
|
||||||
|
|
||||||
#include "firmwares/rotorcraft/baro.h"
|
#include "subsystems/sensors/baro.h"
|
||||||
#include "booz/booz2_analog.h"
|
#include "booz/booz2_analog.h"
|
||||||
|
|
||||||
/* we don't need that on this board */
|
/* we don't need that on this board */
|
||||||
|
|||||||
@@ -29,12 +29,11 @@
|
|||||||
|
|
||||||
#include BOARD_CONFIG
|
#include BOARD_CONFIG
|
||||||
|
|
||||||
#include "init_hw.h"
|
#include "mcu.h"
|
||||||
#include "interrupt_hw.h"
|
|
||||||
|
|
||||||
#include "sys_time.h"
|
#include "sys_time.h"
|
||||||
#include "downlink.h"
|
#include "downlink.h"
|
||||||
#include "firmwares/rotorcraft/baro.h"
|
#include "subsystems/sensors/baro.h"
|
||||||
|
|
||||||
static inline void main_init( void );
|
static inline void main_init( void );
|
||||||
static inline void main_periodic_task( void );
|
static inline void main_periodic_task( void );
|
||||||
@@ -57,11 +56,11 @@ int main(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline void main_init( void ) {
|
static inline void main_init( void ) {
|
||||||
hw_init();
|
mcu_init();
|
||||||
sys_time_init();
|
sys_time_init();
|
||||||
booz2_analog_init();
|
booz2_analog_init();
|
||||||
baro_init();
|
baro_init();
|
||||||
int_enable();
|
mcu_int_enable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -93,6 +93,8 @@
|
|||||||
#define PWM1_PINSEL_BIT 14
|
#define PWM1_PINSEL_BIT 14
|
||||||
|
|
||||||
|
|
||||||
|
#define BOARD_HAS_BARO
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Modem
|
* Modem
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
#include "firmwares/rotorcraft/baro.h"
|
#include "subsystems/sensors/baro.h"
|
||||||
|
|
||||||
struct Baro baro;
|
struct Baro baro;
|
||||||
struct BaroBoard baro_board;
|
struct BaroBoard baro_board;
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
#include "downlink.h"
|
#include "downlink.h"
|
||||||
|
|
||||||
#include "firmwares/rotorcraft/baro.h"
|
#include "subsystems/sensors/baro.h"
|
||||||
//#include "my_debug_servo.h"
|
//#include "my_debug_servo.h"
|
||||||
|
|
||||||
static inline void main_init( void );
|
static inline void main_init( void );
|
||||||
|
|||||||
@@ -23,5 +23,6 @@
|
|||||||
#define ADC_CHANNEL_VSUPPLY 2
|
#define ADC_CHANNEL_VSUPPLY 2
|
||||||
#define DefaultVoltageOfAdc(adc) (0.0059*adc)
|
#define DefaultVoltageOfAdc(adc) (0.0059*adc)
|
||||||
|
|
||||||
|
#define BOARD_HAS_BARO
|
||||||
|
|
||||||
#endif /* CONFIG_LISA_V1_0_H */
|
#endif /* CONFIG_LISA_V1_0_H */
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "firmwares/rotorcraft/baro.h"
|
#include "subsystems/sensors/baro.h"
|
||||||
|
|
||||||
|
|
||||||
struct Baro baro;
|
struct Baro baro;
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#include "booz2_analog.h"
|
#include "booz2_analog.h"
|
||||||
|
|
||||||
/* analog_arch includes baro ??? naaaa we don't want double references */
|
/* analog_arch includes baro ??? naaaa we don't want double references */
|
||||||
#include "firmwares/rotorcraft/baro.h"
|
#include "subsystems/sensors/baro.h"
|
||||||
#include "firmwares/rotorcraft/battery.h"
|
#include "firmwares/rotorcraft/battery.h"
|
||||||
|
|
||||||
#ifndef USE_EXTRA_ADC
|
#ifndef USE_EXTRA_ADC
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
#include "booz_gps.h"
|
#include "booz_gps.h"
|
||||||
|
|
||||||
#include "booz/booz2_analog.h"
|
#include "booz/booz2_analog.h"
|
||||||
#include "firmwares/rotorcraft/baro.h"
|
#include "subsystems/sensors/baro.h"
|
||||||
|
|
||||||
#include "firmwares/rotorcraft/battery.h"
|
#include "firmwares/rotorcraft/battery.h"
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
#include "csc_msg_def.h"
|
#include "csc_msg_def.h"
|
||||||
#include "csc_protocol.h"
|
#include "csc_protocol.h"
|
||||||
|
|
||||||
#include "firmwares/rotorcraft/baro.h"
|
#include "subsystems/sensors/baro.h"
|
||||||
|
|
||||||
#include "mcu_periph/adc.h"
|
#include "mcu_periph/adc.h"
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#include "lisa/lisa_overo_link.h"
|
#include "lisa/lisa_overo_link.h"
|
||||||
#include "subsystems/imu.h"
|
#include "subsystems/imu.h"
|
||||||
#include <booz/booz_gps.h>
|
#include <booz/booz_gps.h>
|
||||||
#include "firmwares/rotorcraft/baro.h"
|
#include "subsystems/sensors/baro.h"
|
||||||
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
#include "subsystems/ins.h"
|
#include "subsystems/ins.h"
|
||||||
|
|
||||||
#include "subsystems/imu.h"
|
#include "subsystems/imu.h"
|
||||||
#include "firmwares/rotorcraft/baro.h"
|
#include "subsystems/sensors/baro.h"
|
||||||
#include "booz_gps.h"
|
#include "booz_gps.h"
|
||||||
|
|
||||||
#include "generated/airframe.h"
|
#include "generated/airframe.h"
|
||||||
|
|||||||
@@ -23,12 +23,12 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* Brief: common baro for a rotorcraft firmware
|
* Brief: common barometric sensor implementation
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef ROTORCRAFT_BARO_H
|
#ifndef SUBSYSTEMS_SENSORS_BARO_H
|
||||||
#define ROTORCRAFT_BARO_H
|
#define SUBSYSTEMS_SENSORS_BARO_H
|
||||||
|
|
||||||
#include <std.h>
|
#include <std.h>
|
||||||
|
|
||||||
@@ -37,6 +37,7 @@ enum BaroStatus {
|
|||||||
BS_RUNNING
|
BS_RUNNING
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* pressure in which units ? */
|
||||||
struct Baro {
|
struct Baro {
|
||||||
int32_t absolute;
|
int32_t absolute;
|
||||||
int32_t differential;
|
int32_t differential;
|
||||||
@@ -45,20 +46,12 @@ struct Baro {
|
|||||||
|
|
||||||
extern struct Baro baro;
|
extern struct Baro baro;
|
||||||
|
|
||||||
#if 0
|
|
||||||
#include BOARD_CONFIG
|
#include BOARD_CONFIG
|
||||||
#define BOARD_MODEL_BOOZ 0
|
#if defined BOARD_HAS_BARO
|
||||||
#define BOARD_MODEL_LISA_L 1
|
|
||||||
#if defined BOARD_MODEL && BOARD_MODEL==BOARD_MODEL_BOOZ
|
|
||||||
#include "boards/booz/baro_board.h"
|
|
||||||
#elsif defined BOARD_MODEL && BOARD_MODEL==BOARD_MODEL_LISA_L
|
|
||||||
#include "boards/lisa_l/baro_board.h"
|
|
||||||
#endif
|
|
||||||
#else /* 0 */
|
|
||||||
#include "baro_board.h"
|
#include "baro_board.h"
|
||||||
#endif /* 0 */
|
#endif
|
||||||
|
|
||||||
extern void baro_init(void);
|
extern void baro_init(void);
|
||||||
extern void baro_periodic(void);
|
extern void baro_periodic(void);
|
||||||
|
|
||||||
#endif /* ROTORCRAFT_BARO_H */
|
#endif /* SUBSYSTEMS_SENSORS_BARO_H */
|
||||||
Reference in New Issue
Block a user