AP_Vehicle: added support for the MSP protocol

This commit is contained in:
yaapu 2020-08-04 22:39:40 +02:00 committed by Andrew Tridgell
parent 80eca32604
commit 7f789fb443
2 changed files with 14 additions and 0 deletions

View File

@ -32,6 +32,12 @@ const AP_Param::GroupInfo AP_Vehicle::var_info[] = {
// @Path: ../AP_RCTelemetry/AP_VideoTX.cpp // @Path: ../AP_RCTelemetry/AP_VideoTX.cpp
AP_SUBGROUPINFO(vtx, "VTX_", 4, AP_Vehicle, AP_VideoTX), 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 AP_GROUPEND
}; };
@ -108,6 +114,9 @@ void AP_Vehicle::setup()
visual_odom.init(); visual_odom.init();
#endif #endif
vtx.init(); vtx.init();
#if HAL_MSP_ENABLED
msp.init();
#endif
#if AP_PARAM_KEY_DUMP #if AP_PARAM_KEY_DUMP
AP_Param::show_all(hal.console, true); AP_Param::show_all(hal.console, true);

View File

@ -42,6 +42,7 @@
#include <AP_GyroFFT/AP_GyroFFT.h> #include <AP_GyroFFT/AP_GyroFFT.h>
#include <AP_VisualOdom/AP_VisualOdom.h> #include <AP_VisualOdom/AP_VisualOdom.h>
#include <AP_RCTelemetry/AP_VideoTX.h> #include <AP_RCTelemetry/AP_VideoTX.h>
#include <AP_MSP/AP_MSP.h>
class AP_Vehicle : public AP_HAL::HAL::Callbacks { class AP_Vehicle : public AP_HAL::HAL::Callbacks {
@ -269,6 +270,10 @@ protected:
AP_ESC_Telem esc_telem; AP_ESC_Telem esc_telem;
#if HAL_MSP_ENABLED
AP_MSP msp;
#endif
#if GENERATOR_ENABLED #if GENERATOR_ENABLED
AP_Generator_RichenPower generator; AP_Generator_RichenPower generator;
#endif #endif