Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
baro_board.c File Reference
#include "std.h"
#include "baro_board.h"
#include "subsystems/sensors/baro.h"
#include "peripherals/mcp355x.h"
#include "subsystems/abi.h"
#include "led.h"
+ Include dependency graph for baro_board.c:

Go to the source code of this file.

Macros

#define NAVGO_BARO_SENS   0.05298
 scale factor to convert raw ADC measurement to pressure in Pascal. More...
 
#define NAVGO_BARO_OFFSET   199229
 
#define BARO_STARTUP_COUNTER   200
 

Functions

void baro_init (void)
 
void baro_periodic (void)
 
void navgo_baro_event (void)
 

Variables

uint16_t startup_cnt
 

Macro Definition Documentation

#define BARO_STARTUP_COUNTER   200

Definition at line 54 of file baro_board.c.

Referenced by baro_init().

#define NAVGO_BARO_OFFSET   199229

Definition at line 50 of file baro_board.c.

Referenced by navgo_baro_event().

#define NAVGO_BARO_SENS   0.05298

scale factor to convert raw ADC measurement to pressure in Pascal.

supply voltage Vs = 5V real sensor sensitivity Vout = Vs * (0.009 P - 0.095) with P in kPa 22 bit signed ADC -> only 21 useful bits ADC = 5/2^21 = 2.384e-6 V / LSB

offset = 5*0.095/2.384e-6 = 199229 (LSB) sensitivity = (1000/0.009)*2.384e-6/5 = 0.05298 Pa/LSB

Definition at line 46 of file baro_board.c.

Referenced by navgo_baro_event().

Function Documentation

void baro_init ( void  )

Definition at line 57 of file baro_board.c.

References BARO_STARTUP_COUNTER, LED_OFF, mcp355x_init(), and startup_cnt.

+ Here is the call graph for this function:

void baro_periodic ( void  )

Definition at line 66 of file baro_board.c.

References LED_ON, LED_TOGGLE, mcp355x_read(), and startup_cnt.

+ Here is the call graph for this function:

void navgo_baro_event ( void  )

Definition at line 82 of file baro_board.c.

References BARO_BOARD_SENDER_ID, FALSE, mcp355x_data, mcp355x_data_available, mcp355x_event(), NAVGO_BARO_OFFSET, NAVGO_BARO_SENS, Bmp085::pressure, and startup_cnt.

+ Here is the call graph for this function:

Variable Documentation

uint16_t startup_cnt

Definition at line 55 of file baro_board.c.