AP_MSP: check for MSP rangefinder enable
This commit is contained in:
parent
84f7589f2d
commit
8319b7b6b7
@ -489,11 +489,13 @@ void AP_MSP_Telem_Backend::msp_handle_opflow(const msp_opflow_sensor_t &pkt)
|
|||||||
|
|
||||||
void AP_MSP_Telem_Backend::msp_handle_rangefinder(const msp_rangefinder_sensor_t &pkt)
|
void AP_MSP_Telem_Backend::msp_handle_rangefinder(const msp_rangefinder_sensor_t &pkt)
|
||||||
{
|
{
|
||||||
|
#if HAL_MSP_RANGEFINDER_ENABLED
|
||||||
RangeFinder *rangefinder = AP::rangefinder();
|
RangeFinder *rangefinder = AP::rangefinder();
|
||||||
if (rangefinder == nullptr) {
|
if (rangefinder == nullptr) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
rangefinder->handle_msp(pkt);
|
rangefinder->handle_msp(pkt);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
MSPCommandResult AP_MSP_Telem_Backend::msp_process_out_raw_gps(sbuf_t *dst)
|
MSPCommandResult AP_MSP_Telem_Backend::msp_process_out_raw_gps(sbuf_t *dst)
|
||||||
|
Loading…
Reference in New Issue
Block a user