AP_RCProtocol: add and use AP_RCPROTOCOL_CRSF_ENABLED
This commit is contained in:
parent
dd549ee625
commit
6535bfa546
@ -51,7 +51,9 @@ void AP_RCProtocol::init()
|
||||
#if AP_RCPROTOCOL_SRXL2_ENABLED
|
||||
backend[AP_RCProtocol::SRXL2] = new AP_RCProtocol_SRXL2(*this);
|
||||
#endif
|
||||
#if AP_RCPROTOCOL_CRSF_ENABLED
|
||||
backend[AP_RCProtocol::CRSF] = new AP_RCProtocol_CRSF(*this);
|
||||
#endif
|
||||
#if AP_RCPROTOCOL_FPORT2_ENABLED
|
||||
backend[AP_RCProtocol::FPORT2] = new AP_RCProtocol_FPort2(*this, true);
|
||||
#endif
|
||||
@ -430,8 +432,10 @@ const char *AP_RCProtocol::protocol_name_from_protocol(rcprotocol_t protocol)
|
||||
case SRXL2:
|
||||
return "SRXL2";
|
||||
#endif
|
||||
#if AP_RCPROTOCOL_CRSF_ENABLED
|
||||
case CRSF:
|
||||
return "CRSF";
|
||||
#endif
|
||||
case ST24:
|
||||
return "ST24";
|
||||
#if AP_RCPROTOCOL_FPORT_ENABLED
|
||||
|
@ -45,7 +45,9 @@ public:
|
||||
#if AP_RCPROTOCOL_SRXL2_ENABLED
|
||||
SRXL2 = 7,
|
||||
#endif
|
||||
#if AP_RCPROTOCOL_CRSF_ENABLED
|
||||
CRSF = 8,
|
||||
#endif
|
||||
ST24 = 9,
|
||||
#if AP_RCPROTOCOL_FPORT_ENABLED
|
||||
FPORT = 10,
|
||||
@ -97,7 +99,9 @@ public:
|
||||
#if AP_RCPROTOCOL_FPORT2_ENABLED
|
||||
case FPORT2:
|
||||
#endif
|
||||
#if AP_RCPROTOCOL_CRSF_ENABLED
|
||||
case CRSF:
|
||||
#endif
|
||||
return true;
|
||||
case IBUS:
|
||||
case SUMD:
|
||||
|
@ -17,8 +17,11 @@
|
||||
Code by Andy Piper
|
||||
*/
|
||||
|
||||
#include "AP_RCProtocol_config.h"
|
||||
|
||||
#if AP_RCPROTOCOL_CRSF_ENABLED
|
||||
|
||||
#include "AP_RCProtocol.h"
|
||||
#include "AP_RCProtocol_SRXL.h"
|
||||
#include "AP_RCProtocol_CRSF.h"
|
||||
#include <AP_HAL/AP_HAL.h>
|
||||
#include <AP_Math/AP_Math.h>
|
||||
@ -629,3 +632,5 @@ namespace AP {
|
||||
return AP_RCProtocol_CRSF::get_singleton();
|
||||
}
|
||||
};
|
||||
|
||||
#endif // AP_RCPROTOCOL_CRSF_ENABLED
|
||||
|
@ -18,6 +18,10 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "AP_RCProtocol_config.h"
|
||||
|
||||
#if AP_RCPROTOCOL_CRSF_ENABLED
|
||||
|
||||
#include "AP_RCProtocol.h"
|
||||
#include <AP_Math/AP_Math.h>
|
||||
#include <RC_Channel/RC_Channel.h>
|
||||
@ -332,3 +336,5 @@ private:
|
||||
namespace AP {
|
||||
AP_RCProtocol_CRSF* crsf();
|
||||
};
|
||||
|
||||
#endif // AP_RCPROTOCOL_CRSF_ENABLED
|
||||
|
@ -7,6 +7,10 @@
|
||||
#define AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED 1
|
||||
#endif
|
||||
|
||||
#ifndef AP_RCPROTOCOL_CRSF_ENABLED
|
||||
#define AP_RCPROTOCOL_CRSF_ENABLED AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED
|
||||
#endif
|
||||
|
||||
#ifndef AP_RCPROTOCOL_FASTSBUS_ENABLED
|
||||
#define AP_RCPROTOCOL_FASTSBUS_ENABLED AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user