AP_MSP: add rcmapper config

This commit is contained in:
Peter Barker 2024-02-06 23:28:21 +11:00 committed by Peter Barker
parent c71e3e973d
commit e358d1d237
1 changed files with 4 additions and 0 deletions

View File

@ -1051,6 +1051,7 @@ MSPCommandResult AP_MSP_Telem_Backend::msp_process_out_rtc(sbuf_t *dst)
#if AP_RC_CHANNEL_ENABLED
MSPCommandResult AP_MSP_Telem_Backend::msp_process_out_rc(sbuf_t *dst)
{
#if AP_RCMAPPER_ENABLED
const RCMapper* rcmap = AP::rcmap();
if (rcmap == nullptr) {
return MSP_RESULT_ERROR;
@ -1074,6 +1075,9 @@ MSPCommandResult AP_MSP_Telem_Backend::msp_process_out_rc(sbuf_t *dst)
sbuf_write_data(dst, &rc, sizeof(rc));
return MSP_RESULT_ACK;
#else
return MSP_RESULT_ERROR;
#endif
}
#endif // AP_RC_CHANNEL_ENABLED