You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
576 B
33 lines
576 B
#pragma once |
|
|
|
|
|
#include <AP_HAL/HAL.h> |
|
|
|
#include "RC_parser.h" |
|
#include "RCInput.h" |
|
|
|
|
|
class F4Light::SBUS_parser : public F4Light::_parser { |
|
public: |
|
SBUS_parser() {} |
|
|
|
void init(uint8_t ch); |
|
void late_init(uint8_t ch); |
|
|
|
private: |
|
|
|
static UARTDriver *uartSDriver; |
|
|
|
void add_uart_input(); // add some input bytes, for SBUS over a serial port |
|
void _io_completion(); |
|
|
|
uint8_t _ioc; |
|
|
|
// state of add_sbus_input |
|
struct SBUS { |
|
uint8_t frame[26]; |
|
uint8_t partial_frame_count; |
|
uint32_t last_input_uS; |
|
} sbus; |
|
}; |
|
|
|
|