diff --git a/libraries/AP_Vehicle/AP_Vehicle.cpp b/libraries/AP_Vehicle/AP_Vehicle.cpp index 7133e5639d..87d9311367 100644 --- a/libraries/AP_Vehicle/AP_Vehicle.cpp +++ b/libraries/AP_Vehicle/AP_Vehicle.cpp @@ -32,6 +32,12 @@ const AP_Param::GroupInfo AP_Vehicle::var_info[] = { // @Path: ../AP_RCTelemetry/AP_VideoTX.cpp AP_SUBGROUPINFO(vtx, "VTX_", 4, AP_Vehicle, AP_VideoTX), +#if HAL_MSP_ENABLED + // @Group: MSP + // @Path: ../AP_MSP/AP_MSP.cpp + AP_SUBGROUPINFO(msp, "MSP", 5, AP_Vehicle, AP_MSP), +#endif + AP_GROUPEND }; @@ -108,6 +114,9 @@ void AP_Vehicle::setup() visual_odom.init(); #endif vtx.init(); +#if HAL_MSP_ENABLED + msp.init(); +#endif #if AP_PARAM_KEY_DUMP AP_Param::show_all(hal.console, true); diff --git a/libraries/AP_Vehicle/AP_Vehicle.h b/libraries/AP_Vehicle/AP_Vehicle.h index 39b65d6376..4cc08ec554 100644 --- a/libraries/AP_Vehicle/AP_Vehicle.h +++ b/libraries/AP_Vehicle/AP_Vehicle.h @@ -42,6 +42,7 @@ #include #include #include +#include class AP_Vehicle : public AP_HAL::HAL::Callbacks { @@ -269,6 +270,10 @@ protected: AP_ESC_Telem esc_telem; +#if HAL_MSP_ENABLED + AP_MSP msp; +#endif + #if GENERATOR_ENABLED AP_Generator_RichenPower generator; #endif