|
Paparazzi UAS
v5.18.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 ==
' ')) {
VIC slots used for the LPC2148 define name e g gps UART1_VIC_SLOT e g modem SPI1_VIC_SLOT SPI1 in mcu_periph spi_arch c or spi_slave_hs_arch c(and some others not using the SPI peripheral yet..) I2C0_VIC_SLOT 8 mcu_periph/i2c_arch.c I2C1_VIC_SLOT 9 mcu_periph/i2c_arch.c USB_VIC_SLOT 10 usb
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)
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
void airspeed_uADC_init(void)
struct pprzlog_transport pprzlog_tp
PPRZLOG transport structure.
#define uADC_WAIT_ALTITUDE
#define uADC_WAIT_PRESSURES