diff --git a/libraries/AP_Vehicle/AP_Vehicle.cpp b/libraries/AP_Vehicle/AP_Vehicle.cpp index eb5b474184..b903f56ba3 100644 --- a/libraries/AP_Vehicle/AP_Vehicle.cpp +++ b/libraries/AP_Vehicle/AP_Vehicle.cpp @@ -7,6 +7,15 @@ AP_Vehicle *AP_Vehicle::get_singleton() return _singleton; } + +void AP_Vehicle::vehicle_setup(void) +{ +#if HAL_HOTT_TELEM_ENABLED + hott_telem.init(); +#endif +} + + namespace AP { AP_Vehicle *vehicle() diff --git a/libraries/AP_Vehicle/AP_Vehicle.h b/libraries/AP_Vehicle/AP_Vehicle.h index 6097ec5d17..6344973977 100644 --- a/libraries/AP_Vehicle/AP_Vehicle.h +++ b/libraries/AP_Vehicle/AP_Vehicle.h @@ -33,6 +33,7 @@ #include // RSSI Library #include // Serial manager library #include +#include class AP_Vehicle : public AP_HAL::HAL::Callbacks { @@ -136,6 +137,13 @@ protected: // false disables external leds) AP_Notify notify; +#if HAL_HOTT_TELEM_ENABLED + AP_Hott_Telem hott_telem; +#endif + + // called from each vehicle + void vehicle_setup(void); + private: static AP_Vehicle *_singleton;