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.
39 lines
705 B
39 lines
705 B
4 years ago
|
#pragma once
|
||
|
|
||
|
#include "AP_Frsky_Backend.h"
|
||
|
|
||
|
class AP_Frsky_SPort : public AP_Frsky_Backend {
|
||
|
|
||
|
public:
|
||
|
|
||
|
using AP_Frsky_Backend::AP_Frsky_Backend;
|
||
|
|
||
|
void send() override;
|
||
|
|
||
|
protected:
|
||
|
|
||
|
void send_sport_frame(uint8_t frame, uint16_t appid, uint32_t data);
|
||
|
|
||
|
struct PACKED
|
||
|
{
|
||
|
bool send_latitude; // sizeof(bool) = 4 ?
|
||
|
uint32_t gps_lng_sample;
|
||
|
uint8_t new_byte;
|
||
|
} _passthrough;
|
||
|
|
||
|
uint32_t calc_gps_latlng(bool *send_latitude);
|
||
|
|
||
|
private:
|
||
|
|
||
|
struct
|
||
|
{
|
||
|
bool sport_status;
|
||
|
bool gps_refresh;
|
||
|
bool vario_refresh;
|
||
|
uint8_t fas_call;
|
||
|
uint8_t gps_call;
|
||
|
uint8_t vario_call;
|
||
|
uint8_t various_call;
|
||
|
} _SPort;
|
||
|
};
|