Copter: added OSD support

This commit is contained in:
Alexander Malishev 2018-06-23 17:11:05 +10:00 committed by Andrew Tridgell
parent c1d82a43c5
commit f63b3c044a
7 changed files with 25 additions and 0 deletions

View File

@ -152,6 +152,10 @@
#include <AP_Devo_Telem/AP_Devo_Telem.h>
#endif
#if OSD_ENABLED == ENABLED
#include <AP_OSD/AP_OSD.h>
#endif
#if ADVANCED_FAILSAFE == ENABLED
# include "afs_copter.h"
#endif

View File

@ -980,6 +980,12 @@ const AP_Param::GroupInfo ParametersG2::var_info[] = {
AP_SUBGROUPINFO(follow, "FOLL", 27, ParametersG2, AP_Follow),
#endif
#if OSD_ENABLED
// @Group: OSD
// @Path: ../libraries/AP_OSD/AP_OSD.cpp
AP_SUBGROUPINFO(osd, "OSD_", 28, ParametersG2, AP_OSD),
#endif
AP_GROUPEND
};

View File

@ -585,6 +585,11 @@ public:
// follow
AP_Follow follow;
#endif
#if OSD_ENABLED == ENABLED
AP_OSD osd;
#endif
};
extern const AP_Param::Info var_info[];

View File

@ -728,3 +728,7 @@
#define DEVO_TELEM_ENABLED ENABLED
#endif
#endif
#ifndef OSD_ENABLED
#define OSD_ENABLED DISABLED
#endif

View File

@ -65,3 +65,4 @@ LIBRARIES += AP_Winch
LIBRARIES += AP_WheelEncoder
LIBRARIES += AP_Follow
LIBRARIES += AP_Devo_Telem
LIBRARIES += AP_OSD

View File

@ -105,6 +105,10 @@ void Copter::init_ardupilot()
devo_telemetry.init(serial_manager);
#endif
#if OSD_ENABLED == ENABLED
g2.osd.init();
#endif
#if LOGGING_ENABLED == ENABLED
log_init();
#endif

View File

@ -34,6 +34,7 @@ def build(bld):
'AP_Winch',
'AP_Follow',
'AP_Devo_Telem',
'AP_OSD',
],
)