AP_RCProtocol: correct compilation when crossfire not compiled in

This commit is contained in:
Peter Barker 2024-02-12 16:02:31 +11:00 committed by Peter Barker
parent 74e742f2c6
commit aaad98e898

View File

@ -435,10 +435,15 @@ void AP_RCProtocol_GHST::process_handshake(uint32_t baudrate)
|| baudrate != CRSF_BAUDRATE
|| baudrate == GHST_BAUDRATE
|| uart->get_baud_rate() == GHST_BAUDRATE
|| !protocol_enabled(AP_RCProtocol::GHST)
|| protocol_enabled(AP_RCProtocol::CRSF)) {
|| !protocol_enabled(AP_RCProtocol::GHST)) {
return;
}
#if AP_RCPROTOCOL_CRSF_ENABLED
if (protocol_enabled(AP_RCProtocol::CRSF)) {
// don't fight CRSF
return;
}
#endif
uart->begin(GHST_BAUDRATE);
}