|
|
@ -15,6 +15,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
#include <AP_AHRS/AP_AHRS.h> |
|
|
|
#include <AP_AHRS/AP_AHRS.h> |
|
|
|
#include <AP_Baro/AP_Baro.h> |
|
|
|
#include <AP_Baro/AP_Baro.h> |
|
|
|
|
|
|
|
#include <AP_Airspeed/AP_Airspeed.h> |
|
|
|
#include <AP_BattMonitor/AP_BattMonitor.h> |
|
|
|
#include <AP_BattMonitor/AP_BattMonitor.h> |
|
|
|
#include <AP_BLHeli/AP_BLHeli.h> |
|
|
|
#include <AP_BLHeli/AP_BLHeli.h> |
|
|
|
#include <RC_Channel/RC_Channel.h> |
|
|
|
#include <RC_Channel/RC_Channel.h> |
|
|
@ -492,6 +493,11 @@ MSPCommandResult AP_MSP_Telem_Backend::msp_process_sensor_command(uint16_t cmd_m |
|
|
|
msp_handle_baro(*pkt); |
|
|
|
msp_handle_baro(*pkt); |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
case MSP2_SENSOR_AIRSPEED: { |
|
|
|
|
|
|
|
const MSP::msp_airspeed_data_message_t *pkt = (const MSP::msp_airspeed_data_message_t *)src->ptr; |
|
|
|
|
|
|
|
msp_handle_airspeed(*pkt); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return MSP_RESULT_NO_REPLY; |
|
|
|
return MSP_RESULT_NO_REPLY; |
|
|
@ -540,6 +546,16 @@ void AP_MSP_Telem_Backend::msp_handle_baro(const MSP::msp_baro_data_message_t &p |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void AP_MSP_Telem_Backend::msp_handle_airspeed(const MSP::msp_airspeed_data_message_t &pkt) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
#if HAL_MSP_AIRSPEED_ENABLED |
|
|
|
|
|
|
|
auto *airspeed = AP::airspeed(); |
|
|
|
|
|
|
|
if (airspeed) { |
|
|
|
|
|
|
|
airspeed->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) |
|
|
|
{ |
|
|
|
{ |
|
|
|
#if OSD_ENABLED |
|
|
|
#if OSD_ENABLED |
|
|
|