mirror of https://github.com/ArduPilot/ardupilot
AP_RCProtocol: add separate define for AP_RCPROTOCOL_ST24_ENABLED
This commit is contained in:
parent
5c815e2c32
commit
1225d4c88f
|
@ -66,7 +66,9 @@ void AP_RCProtocol::init()
|
||||||
#if AP_RCPROTOCOL_FPORT2_ENABLED
|
#if AP_RCPROTOCOL_FPORT2_ENABLED
|
||||||
backend[AP_RCProtocol::FPORT2] = new AP_RCProtocol_FPort2(*this, true);
|
backend[AP_RCProtocol::FPORT2] = new AP_RCProtocol_FPort2(*this, true);
|
||||||
#endif
|
#endif
|
||||||
|
#if AP_RCPROTOCOL_ST24_ENABLED
|
||||||
backend[AP_RCProtocol::ST24] = new AP_RCProtocol_ST24(*this);
|
backend[AP_RCProtocol::ST24] = new AP_RCProtocol_ST24(*this);
|
||||||
|
#endif
|
||||||
#if AP_RCPROTOCOL_FPORT_ENABLED
|
#if AP_RCPROTOCOL_FPORT_ENABLED
|
||||||
backend[AP_RCProtocol::FPORT] = new AP_RCProtocol_FPort(*this, true);
|
backend[AP_RCProtocol::FPORT] = new AP_RCProtocol_FPort(*this, true);
|
||||||
#endif
|
#endif
|
||||||
|
@ -451,8 +453,10 @@ const char *AP_RCProtocol::protocol_name_from_protocol(rcprotocol_t protocol)
|
||||||
case CRSF:
|
case CRSF:
|
||||||
return "CRSF";
|
return "CRSF";
|
||||||
#endif
|
#endif
|
||||||
|
#if AP_RCPROTOCOL_ST24_ENABLED
|
||||||
case ST24:
|
case ST24:
|
||||||
return "ST24";
|
return "ST24";
|
||||||
|
#endif
|
||||||
#if AP_RCPROTOCOL_FPORT_ENABLED
|
#if AP_RCPROTOCOL_FPORT_ENABLED
|
||||||
case FPORT:
|
case FPORT:
|
||||||
return "FPORT";
|
return "FPORT";
|
||||||
|
|
|
@ -49,7 +49,9 @@ public:
|
||||||
#if AP_RCPROTOCOL_CRSF_ENABLED
|
#if AP_RCPROTOCOL_CRSF_ENABLED
|
||||||
CRSF = 8,
|
CRSF = 8,
|
||||||
#endif
|
#endif
|
||||||
|
#if AP_RCPROTOCOL_ST24_ENABLED
|
||||||
ST24 = 9,
|
ST24 = 9,
|
||||||
|
#endif
|
||||||
#if AP_RCPROTOCOL_FPORT_ENABLED
|
#if AP_RCPROTOCOL_FPORT_ENABLED
|
||||||
FPORT = 10,
|
FPORT = 10,
|
||||||
#endif
|
#endif
|
||||||
|
@ -126,7 +128,9 @@ public:
|
||||||
#if AP_RCPROTOCOL_SRXL2_ENABLED
|
#if AP_RCPROTOCOL_SRXL2_ENABLED
|
||||||
case SRXL2:
|
case SRXL2:
|
||||||
#endif
|
#endif
|
||||||
|
#if AP_RCPROTOCOL_ST24_ENABLED
|
||||||
case ST24:
|
case ST24:
|
||||||
|
#endif
|
||||||
case NONE:
|
case NONE:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
*/
|
*/
|
||||||
#include "AP_RCProtocol_config.h"
|
#include "AP_RCProtocol_config.h"
|
||||||
|
|
||||||
#if AP_RCPROTOCOL_ENABLED
|
#if AP_RCPROTOCOL_ST24_ENABLED
|
||||||
|
|
||||||
#include "AP_RCProtocol_ST24.h"
|
#include "AP_RCProtocol_ST24.h"
|
||||||
|
|
||||||
|
@ -238,4 +238,4 @@ void AP_RCProtocol_ST24::process_byte(uint8_t byte, uint32_t baudrate)
|
||||||
_process_byte(byte);
|
_process_byte(byte);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // AP_RCPROTOCOL_ENABLED
|
#endif // AP_RCPROTOCOL_ST24_ENABLED
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
#include "AP_RCProtocol_config.h"
|
#include "AP_RCProtocol_config.h"
|
||||||
|
|
||||||
#if AP_RCPROTOCOL_ENABLED
|
#if AP_RCPROTOCOL_ST24_ENABLED
|
||||||
|
|
||||||
#include "AP_RCProtocol_Backend.h"
|
#include "AP_RCProtocol_Backend.h"
|
||||||
#include "SoftSerial.h"
|
#include "SoftSerial.h"
|
||||||
|
@ -154,4 +154,4 @@ private:
|
||||||
SoftSerial ss{115200, SoftSerial::SERIAL_CONFIG_8N1};
|
SoftSerial ss{115200, SoftSerial::SERIAL_CONFIG_8N1};
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // AP_RCPROTOCOL_ENABLED
|
#endif // AP_RCPROTOCOL_ST24_ENABLED
|
||||||
|
|
|
@ -34,6 +34,10 @@
|
||||||
#define AP_RCPROTOCOL_SRXL2_ENABLED AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED
|
#define AP_RCPROTOCOL_SRXL2_ENABLED AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef AP_RCPROTOCOL_ST24_ENABLED
|
||||||
|
#define AP_RCPROTOCOL_ST24_ENABLED AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifndef AP_RCPROTOCOL_SBUS_NI_ENABLED
|
#ifndef AP_RCPROTOCOL_SBUS_NI_ENABLED
|
||||||
#define AP_RCPROTOCOL_SBUS_NI_ENABLED AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED && AP_RCPROTOCOL_SBUS_ENABLED
|
#define AP_RCPROTOCOL_SBUS_NI_ENABLED AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED && AP_RCPROTOCOL_SBUS_ENABLED
|
||||||
|
|
Loading…
Reference in New Issue