APM:Libraries
RCInput_UART.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <AP_Common/AP_Common.h>
4 
5 #include "AP_HAL_Linux.h"
6 #include "RCInput.h"
7 
8 #define CHANNELS 8
9 
10 namespace Linux {
11 
12 class RCInput_UART : public RCInput
13 {
14 public:
15  RCInput_UART(const char *path);
16  ~RCInput_UART();
17 
18  void init() override;
19  void _timer_tick(void) override;
20 
21 private:
22  int _fd;
23  uint8_t *_pdata;
24  ssize_t _remain;
25  struct PACKED {
26  uint16_t magic;
27  uint16_t values[CHANNELS];
28  } _data;
29 };
30 
31 }
void init() override
uint16_t values[CHANNELS]
Definition: RCInput_UART.h:27
struct Linux::RCInput_UART::PACKED _data
void _timer_tick(void) override
RCInput_UART(const char *path)
Common definitions and utility routines for the ArduPilot libraries.
#define CHANNELS
Definition: RCInput_UART.h:8