Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
baro_board.c File Reference

integrated barometer for Apogee boards (mpl3115) More...

#include "std.h"
#include "modules/sensors/baro.h"
#include "peripherals/mpl3115.h"
#include "boards/apogee/imu_apogee.h"
#include "modules/core/abi.h"
#include "led.h"
+ Include dependency graph for baro_board.c:

Go to the source code of this file.

Macros

#define BARO_BOARD_APOGEE_FREQ   5
 Normal frequency with the default settings. More...
 
#define MPL_PRESCALER   12
 Baro periodic prescaler. More...
 
#define BARO_STARTUP_COUNTER   (200/(MPL_PRESCALER))
 Counter to init ads1114 at startup. More...
 

Functions

void baro_init (void)
 
void baro_periodic (void)
 
void apogee_baro_event (void)
 

Variables

uint16_t startup_cnt
 
struct Mpl3115 apogee_baro
 

Detailed Description

integrated barometer for Apogee boards (mpl3115)

Definition in file baro_board.c.

Macro Definition Documentation

◆ BARO_BOARD_APOGEE_FREQ

#define BARO_BOARD_APOGEE_FREQ   5

Normal frequency with the default settings.

the baro read function should be called at 5 Hz

Definition at line 52 of file baro_board.c.

◆ BARO_STARTUP_COUNTER

#define BARO_STARTUP_COUNTER   (200/(MPL_PRESCALER))

Counter to init ads1114 at startup.

Definition at line 71 of file baro_board.c.

◆ MPL_PRESCALER

#define MPL_PRESCALER   12

Baro periodic prescaler.

different for fixedwing and rotorcraft...

Definition at line 66 of file baro_board.c.

Function Documentation

◆ apogee_baro_event()

◆ baro_init()

void baro_init ( void  )

Definition at line 76 of file baro_board.c.

References apogee_baro, BARO_STARTUP_COUNTER, LED_OFF, MPL3115_I2C_ADDR, mpl3115_init(), and startup_cnt.

Referenced by baro_board_init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ baro_periodic()

void baro_periodic ( void  )

Definition at line 90 of file baro_board.c.

References apogee_baro, Mpu60x0_I2c::config, Mpl3115::data_available, imu_apogee, Mpu60x0Config::initialized, LED_ON, LED_TOGGLE, mpl3115_periodic(), MPL_PRESCALER, ImuApogee::mpu, and startup_cnt.

Referenced by baro_board_periodic().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ apogee_baro

struct Mpl3115 apogee_baro

Definition at line 72 of file baro_board.c.

Referenced by apogee_baro_event(), baro_init(), and baro_periodic().

◆ startup_cnt

uint16_t startup_cnt

Definition at line 72 of file baro_board.c.

Referenced by apogee_baro_event(), baro_init(), and baro_periodic().