APM:Libraries
RC_DSM_parser.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RC_parser.h"
4 #include "RCInput.h"
5 
6 #include <AP_HAL/HAL.h>
7 
8 
9 enum DSM_STATE {
13 };
14 
16 public:
18 
19  void init(uint8_t ch);
20 
21  bool bind(int dsmMode) const override;
22 
23 private:
24 
26 
27  void add_dsm_uart_input(); // add some DSM input bytes, for RCInput over a serial port
28  void _io_completion();
29  uint8_t _ioc;
30 
31  struct DSM { // state of add_dsm_uart_input
32  uint8_t frame[16];
34  uint64_t last_input_ms;
35  } dsm;
36 
38 
39  static void _rc_bind(uint16_t dsmMode);
40 };
41 
enum DSM_STATE state
Definition: RC_DSM_parser.h:37
DSM_STATE
Definition: RC_DSM_parser.h:9
static void _rc_bind(uint16_t dsmMode)
static UARTDriver uartSDriver
Definition: RC_DSM_parser.h:25
void init(uint8_t ch)
struct F4Light::DSM_parser::DSM dsm
bool bind(int dsmMode) const override