2020-09-28 01:31:38 -03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "AP_Frsky_Backend.h"
|
|
|
|
|
2020-09-28 18:53:17 -03:00
|
|
|
class AP_Frsky_D : public AP_Frsky_Backend
|
|
|
|
{
|
2020-09-28 01:31:38 -03:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
using AP_Frsky_Backend::AP_Frsky_Backend;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
void send() override;
|
2020-09-28 18:53:17 -03:00
|
|
|
uint32_t initial_baud() const override
|
|
|
|
{
|
|
|
|
return 9600;
|
|
|
|
}
|
2020-09-28 01:31:38 -03:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
2020-09-28 07:34:33 -03:00
|
|
|
// methods related to the nuts-and-bolts of sending data
|
|
|
|
void send_byte(uint8_t value);
|
|
|
|
void send_uint16(uint16_t id, uint16_t data);
|
|
|
|
|
2020-09-28 01:31:38 -03:00
|
|
|
struct {
|
|
|
|
uint32_t last_200ms_frame;
|
|
|
|
uint32_t last_1000ms_frame;
|
|
|
|
} _D;
|
|
|
|
|
|
|
|
};
|