 |
Paparazzi UAS
v6.1.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
33 #include "pprzlink/messages.h"
39 #if FLIGHTRECORDER_SDLOG
46 #define uADC_WAIT_START uADC_UNINIT
47 #define uADC_WAIT_COUNTER 1
48 #define uADC_WAIT_ANGLES 2
49 #define uADC_WAIT_ALTITUDE 3
50 #define uADC_WAIT_PRESSURES 4
51 #define uADC_WAIT_CHECKSUM 5
53 #define uADC_START 0x0A
54 #define uADC_LIMITER ','
69 static char uadc_inp[64];
83 if (isdigit((
int)c)) {
99 if (isdigit((
int)c) || (c ==
'-') || (c ==
'.')) {
110 }
else if ((c ==
' ') || (c ==
'+')) {
121 if (isdigit((
int)c) || (c ==
'-') || (c ==
'.')) {
129 }
else if ((c ==
' ') || (c ==
'+')) {
140 if (isdigit((
int)c) || (c ==
'-') || (c ==
'.')) {
151 }
else if ((c ==
' ') || (c ==
'+')) {
162 if (isxdigit((
int)c)) {
167 checksum = strtol(uadc_inp, NULL, 16);
170 #if FLIGHTRECORDER_SDLOG
171 if (flightRecorderLogFile != -1) {
172 DOWNLINK_SEND_AEROPROBE(
pprzlog_tp, flightrecorder_sdlog,
178 }
else if ((c ==
' ')) {
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
static int32_t pressures[2]
uint8_t uart_getch(struct uart_periph *p)
static uint8_t uadc_tab_idx
int uart_char_available(struct uart_periph *p)
Check UART for available chars in receive buffer.
Initialize pprzlog transport.
void airspeed_uADC_event(void)
#define uADC_WAIT_COUNTER
void airspeed_uADC_periodic(void)
short int16_t
Typedef defining 16 bit short type.
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
void airspeed_uadc_parse(char c)
static uint8_t uadc_status
Common code for AP and FBW telemetry.
#define uADC_WAIT_CHECKSUM
int int32_t
Typedef defining 32 bit int type.
void airspeed_uADC_init(void)
struct pprzlog_transport pprzlog_tp
PPRZLOG transport structure.
#define uADC_WAIT_ALTITUDE
#define uADC_WAIT_PRESSURES