33 #include "pprzlink/messages.h"
38 #if FLIGHTRECORDER_SDLOG
45 #define uADC_WAIT_START uADC_UNINIT
46 #define uADC_WAIT_COUNTER 1
47 #define uADC_WAIT_ANGLES 2
48 #define uADC_WAIT_ALTITUDE 3
49 #define uADC_WAIT_PRESSURES 4
50 #define uADC_WAIT_CHECKSUM 5
52 #define uADC_START 0x0A
53 #define uADC_LIMITER ','
68 static char uadc_inp[64];
82 if (isdigit((
int)c)) {
98 if (isdigit((
int)c) || (c ==
'-') || (c ==
'.')) {
109 }
else if ((c ==
' ') || (c ==
'+')) {
120 if (isdigit((
int)c) || (c ==
'-') || (c ==
'.')) {
128 }
else if ((c ==
' ') || (c ==
'+')) {
139 if (isdigit((
int)c) || (c ==
'-') || (c ==
'.')) {
150 }
else if ((c ==
' ') || (c ==
'+')) {
161 if (isxdigit((
int)c)) {
166 checksum = strtol(uadc_inp, NULL, 16);
169 #if FLIGHTRECORDER_SDLOG
170 if (flightRecorderLogFile != -1) {
171 DOWNLINK_SEND_AEROPROBE(
pprzlog_tp, flightrecorder_sdlog,
177 }
else if ((c ==
' ')) {
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
Periodic telemetry system header (includes downlink utility and generated code).
uint8_t uart_getch(struct uart_periph *p)
uint16_t uart_char_available(struct uart_periph *p)
Check UART for available chars in receive buffer.
#define uADC_WAIT_COUNTER
Initialize pprzlog transport.
#define uADC_WAIT_ALTITUDE
void airspeed_uADC_periodic(void)
#define uADC_WAIT_PRESSURES
UART interface for Aeroprobe uADC air data computer.
static uint8_t uadc_tab_idx
static int32_t pressures[2]
#define uADC_WAIT_CHECKSUM
void airspeed_uADC_event(void)
Common code for AP and FBW telemetry.
struct pprzlog_transport pprzlog_tp
PPRZLOG transport structure.
void airspeed_uADC_init(void)
void airspeed_uadc_parse(char c)
static uint8_t uadc_status