diff --git a/libraries/AP_Vehicle/AP_Vehicle.cpp b/libraries/AP_Vehicle/AP_Vehicle.cpp index d06ce5e40f..e9e297dc15 100644 --- a/libraries/AP_Vehicle/AP_Vehicle.cpp +++ b/libraries/AP_Vehicle/AP_Vehicle.cpp @@ -144,8 +144,13 @@ void AP_Vehicle::setup() // init library used for visual position estimation visual_odom.init(); #endif + vtx.init(); +#if HAL_SMARTAUDIO_ENABLED + smartaudio.init(); +#endif + #if AP_PARAM_KEY_DUMP AP_Param::show_all(hal.console, true); #endif diff --git a/libraries/AP_Vehicle/AP_Vehicle.h b/libraries/AP_Vehicle/AP_Vehicle.h index 460b2ec63d..45135b5bb0 100644 --- a/libraries/AP_Vehicle/AP_Vehicle.h +++ b/libraries/AP_Vehicle/AP_Vehicle.h @@ -45,6 +45,7 @@ #include #include #include +#include class AP_Vehicle : public AP_HAL::HAL::Callbacks { @@ -318,6 +319,10 @@ protected: #if HAL_EXTERNAL_AHRS_ENABLED AP_ExternalAHRS externalAHRS; #endif + +#if HAL_SMARTAUDIO_ENABLED + AP_SmartAudio smartaudio; +#endif static const struct AP_Param::GroupInfo var_info[]; static const struct AP_Scheduler::Task scheduler_tasks[];