AP_Vehicle: instantiate and init hott telem for copter4.0

This commit is contained in:
Andrew Tridgell 2020-06-05 12:15:03 +10:00
parent 5f31c5d09f
commit f2bca400c4
2 changed files with 17 additions and 0 deletions

View File

@ -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()

View File

@ -33,6 +33,7 @@
#include <AP_RSSI/AP_RSSI.h> // RSSI Library
#include <AP_SerialManager/AP_SerialManager.h> // Serial manager library
#include <AP_ServoRelayEvents/AP_ServoRelayEvents.h>
#include <AP_Hott_Telem/AP_Hott_Telem.h>
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;