Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
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 "modules/datalink/downlink.h"
#include <ctype.h>
#include <stdlib.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

◆ uADC_END

#define uADC_END   0x0D

Definition at line 55 of file airspeed_uADC.c.

◆ uADC_LIMITER

#define uADC_LIMITER   ','

Definition at line 54 of file airspeed_uADC.c.

◆ uADC_START

#define uADC_START   0x0A

Definition at line 53 of file airspeed_uADC.c.

◆ uADC_UNINIT

#define uADC_UNINIT   0

Definition at line 45 of file airspeed_uADC.c.

◆ uADC_WAIT_ALTITUDE

#define uADC_WAIT_ALTITUDE   3

Definition at line 49 of file airspeed_uADC.c.

◆ uADC_WAIT_ANGLES

#define uADC_WAIT_ANGLES   2

Definition at line 48 of file airspeed_uADC.c.

◆ uADC_WAIT_CHECKSUM

#define uADC_WAIT_CHECKSUM   5

Definition at line 51 of file airspeed_uADC.c.

◆ uADC_WAIT_COUNTER

#define uADC_WAIT_COUNTER   1

Definition at line 47 of file airspeed_uADC.c.

◆ uADC_WAIT_PRESSURES

#define uADC_WAIT_PRESSURES   4

Definition at line 50 of file airspeed_uADC.c.

◆ uADC_WAIT_START

#define uADC_WAIT_START   uADC_UNINIT

Definition at line 46 of file airspeed_uADC.c.

Function Documentation

◆ airspeed_uADC_event()

void airspeed_uADC_event ( void  )

Definition at line 197 of file airspeed_uADC.c.

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

+ Here is the call graph for this function:

◆ airspeed_uADC_init()

void airspeed_uADC_init ( void  )

Definition at line 193 of file airspeed_uADC.c.

◆ airspeed_uadc_parse()

void airspeed_uadc_parse ( char  c)

◆ airspeed_uADC_periodic()

void airspeed_uADC_periodic ( void  )

Definition at line 205 of file airspeed_uADC.c.

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

Variable Documentation

◆ altitude

◆ checksum

◆ counter

uint32_t counter
static

Definition at line 57 of file airspeed_uADC.c.

Referenced by airspeed_uadc_parse(), and airspeed_uADC_periodic().

◆ course

◆ pressures

int32_t pressures[2]
static

Definition at line 60 of file airspeed_uADC.c.

Referenced by airspeed_uadc_parse(), and airspeed_uADC_periodic().

◆ uadc_idx

uint8_t uadc_idx = 0
static

Definition at line 63 of file airspeed_uADC.c.

Referenced by airspeed_uadc_parse().

◆ uadc_status

uint8_t uadc_status = uADC_UNINIT
static

Definition at line 62 of file airspeed_uADC.c.

Referenced by airspeed_uadc_parse().

◆ uadc_tab_idx

uint8_t uadc_tab_idx = 0
static

Definition at line 64 of file airspeed_uADC.c.

Referenced by airspeed_uadc_parse().