diff --git a/libraries/AP_Vehicle/AP_Vehicle.cpp b/libraries/AP_Vehicle/AP_Vehicle.cpp index a8df6aee92..a2618d3312 100644 --- a/libraries/AP_Vehicle/AP_Vehicle.cpp +++ b/libraries/AP_Vehicle/AP_Vehicle.cpp @@ -99,6 +99,11 @@ const AP_Param::GroupInfo AP_Vehicle::var_info[] = { AP_SUBGROUPINFO(fence, "FENCE_", 14, AP_Vehicle, AC_Fence), #endif +#if AP_OPENDRONEID_ENABLED + // @Group: DID_ + // @Path: ../AP_OpenDroneID/AP_OpenDroneID.cpp + AP_SUBGROUPINFO(opendroneid, "DID_", 15, AP_Vehicle, AP_OpenDroneID), +#endif AP_GROUPEND }; @@ -229,6 +234,10 @@ void AP_Vehicle::setup() generator.init(); #endif +#if AP_OPENDRONEID_ENABLED + opendroneid.init(); +#endif + // init EFI monitoring #if HAL_EFI_ENABLED efi.init(); @@ -329,6 +338,9 @@ const AP_Scheduler::Task AP_Vehicle::scheduler_tasks[] = { #if HAL_GENERATOR_ENABLED SCHED_TASK_CLASS(AP_Generator, &vehicle.generator, update, 10, 50, 235), #endif +#if AP_OPENDRONEID_ENABLED + SCHED_TASK_CLASS(AP_OpenDroneID, &vehicle.opendroneid, update, 10, 50, 236), +#endif #if OSD_ENABLED SCHED_TASK(publish_osd_info, 1, 10, 240), #endif diff --git a/libraries/AP_Vehicle/AP_Vehicle.h b/libraries/AP_Vehicle/AP_Vehicle.h index 3b5f6db4da..8ab1648874 100644 --- a/libraries/AP_Vehicle/AP_Vehicle.h +++ b/libraries/AP_Vehicle/AP_Vehicle.h @@ -40,6 +40,7 @@ #include // Serial manager library #include #include +#include #include #include #include @@ -364,6 +365,10 @@ protected: AP_ESC_Telem esc_telem; #endif +#if AP_OPENDRONEID_ENABLED + AP_OpenDroneID opendroneid; +#endif + #if HAL_MSP_ENABLED AP_MSP msp; #endif