mirror of https://github.com/ArduPilot/ardupilot
AP_RCProtocol: allow for fport without FRSky telem
This commit is contained in:
parent
ca549e1887
commit
24139d661a
|
@ -103,7 +103,7 @@ void AP_RCProtocol_FPort::decode_control(const FPort_Frame &frame)
|
||||||
*/
|
*/
|
||||||
void AP_RCProtocol_FPort::decode_downlink(const FPort_Frame &frame)
|
void AP_RCProtocol_FPort::decode_downlink(const FPort_Frame &frame)
|
||||||
{
|
{
|
||||||
#if !APM_BUILD_TYPE(APM_BUILD_iofirmware)
|
#if !APM_BUILD_TYPE(APM_BUILD_iofirmware) && AP_FRSKY_SPORT_TELEM_ENABLED
|
||||||
switch (frame.downlink.prim) {
|
switch (frame.downlink.prim) {
|
||||||
case FPORT_PRIM_DATA:
|
case FPORT_PRIM_DATA:
|
||||||
// we've seen at least one 0x10 frame
|
// we've seen at least one 0x10 frame
|
||||||
|
|
|
@ -53,10 +53,12 @@ private:
|
||||||
|
|
||||||
const bool inverted;
|
const bool inverted;
|
||||||
|
|
||||||
|
#if AP_FRSKY_SPORT_TELEM_ENABLED
|
||||||
struct {
|
struct {
|
||||||
bool available = false;
|
bool available = false;
|
||||||
AP_Frsky_SPort::sport_packet_t packet;
|
AP_Frsky_SPort::sport_packet_t packet;
|
||||||
} telem_data;
|
} telem_data;
|
||||||
|
#endif // AP_FRSKY_SPORT_TELEM_ENABLED
|
||||||
|
|
||||||
// receiver sends 0x10 when ready to receive telemetry frames (R-XSR)
|
// receiver sends 0x10 when ready to receive telemetry frames (R-XSR)
|
||||||
bool rx_driven_frame_rate = false;
|
bool rx_driven_frame_rate = false;
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef AP_RCPROTOCOL_FPORT_ENABLED
|
#ifndef AP_RCPROTOCOL_FPORT_ENABLED
|
||||||
#define AP_RCPROTOCOL_FPORT_ENABLED AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED && AP_FRSKY_SPORT_TELEM_ENABLED
|
#define AP_RCPROTOCOL_FPORT_ENABLED AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED
|
||||||
#endif
|
#endif
|
||||||
#ifndef AP_RCPROTOCOL_FPORT2_ENABLED
|
#ifndef AP_RCPROTOCOL_FPORT2_ENABLED
|
||||||
#define AP_RCPROTOCOL_FPORT2_ENABLED AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED && AP_FRSKY_SPORT_TELEM_ENABLED
|
#define AP_RCPROTOCOL_FPORT2_ENABLED AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED && AP_FRSKY_SPORT_TELEM_ENABLED
|
||||||
|
|
Loading…
Reference in New Issue