Paparazzi UAS  v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
airspeed_uADC.c File Reference

UART interface for Aeroprobe uADC air data computer. More...

#include "airspeed_uADC.h"
#include "mcu_periph/uart.h"
#include "pprzlink/messages.h"
#include "subsystems/datalink/downlink.h"
#include <ctype.h>
+ Include dependency graph for airspeed_uADC.c:

Go to the source code of this file.

Macros

#define uADC_UNINIT   0
 
#define uADC_WAIT_START   uADC_UNINIT
 
#define uADC_WAIT_COUNTER   1
 
#define uADC_WAIT_ANGLES   2
 
#define uADC_WAIT_ALTITUDE   3
 
#define uADC_WAIT_PRESSURES   4
 
#define uADC_WAIT_CHECKSUM   5
 
#define uADC_START   0x0A
 
#define uADC_LIMITER   ','
 
#define uADC_END   0x0D
 

Functions

void airspeed_uadc_parse (char c)
 
void airspeed_uADC_init (void)
 
void airspeed_uADC_event (void)
 
void airspeed_uADC_periodic (void)
 

Variables

static uint32_t counter
 
static int16_t course [3]
 
static int32_t altitude
 
static int32_t pressures [2]
 
static uint8_t checksum
 
static uint8_t uadc_status = uADC_UNINIT
 
static uint8_t uadc_idx = 0
 
static uint8_t uadc_tab_idx = 0
 

Detailed Description

UART interface for Aeroprobe uADC air data computer.

Definition in file airspeed_uADC.c.

Macro Definition Documentation

#define uADC_END   0x0D

Definition at line 54 of file airspeed_uADC.c.

Referenced by airspeed_uadc_parse().

#define uADC_LIMITER   ','

Definition at line 53 of file airspeed_uADC.c.

Referenced by airspeed_uadc_parse().

#define uADC_START   0x0A

Definition at line 52 of file airspeed_uADC.c.

Referenced by airspeed_uadc_parse().

#define uADC_UNINIT   0

Definition at line 44 of file airspeed_uADC.c.

Referenced by airspeed_uadc_parse().

#define uADC_WAIT_ALTITUDE   3

Definition at line 48 of file airspeed_uADC.c.

Referenced by airspeed_uadc_parse().

#define uADC_WAIT_ANGLES   2

Definition at line 47 of file airspeed_uADC.c.

Referenced by airspeed_uadc_parse().

#define uADC_WAIT_CHECKSUM   5

Definition at line 50 of file airspeed_uADC.c.

Referenced by airspeed_uadc_parse().

#define uADC_WAIT_COUNTER   1

Definition at line 46 of file airspeed_uADC.c.

Referenced by airspeed_uadc_parse().

#define uADC_WAIT_PRESSURES   4

Definition at line 49 of file airspeed_uADC.c.

Referenced by airspeed_uadc_parse().

#define uADC_WAIT_START   uADC_UNINIT

Definition at line 45 of file airspeed_uADC.c.

Referenced by airspeed_uadc_parse().

Function Documentation

void airspeed_uADC_event ( void  )

Definition at line 196 of file airspeed_uADC.c.

References airspeed_uadc_parse(), uart_char_available(), and uart_getch().

+ Here is the call graph for this function:

void airspeed_uADC_init ( void  )

Definition at line 192 of file airspeed_uADC.c.

void airspeed_uadc_parse ( char  c)
void airspeed_uADC_periodic ( void  )

Definition at line 204 of file airspeed_uADC.c.

References altitude, checksum, counter, course, DefaultChannel, DefaultDevice, and pressures.

Variable Documentation

uint32_t counter
static

Definition at line 56 of file airspeed_uADC.c.

Referenced by airspeed_uadc_parse(), and airspeed_uADC_periodic().

int32_t pressures[2]
static

Definition at line 59 of file airspeed_uADC.c.

Referenced by airspeed_uadc_parse(), and airspeed_uADC_periodic().

uint8_t uadc_idx = 0
static

Definition at line 62 of file airspeed_uADC.c.

Referenced by airspeed_uadc_parse().

uint8_t uadc_status = uADC_UNINIT
static

Definition at line 61 of file airspeed_uADC.c.

Referenced by airspeed_uadc_parse().

uint8_t uadc_tab_idx = 0
static

Definition at line 63 of file airspeed_uADC.c.

Referenced by airspeed_uadc_parse().