Plane: added OSD support

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

View File

@ -1169,6 +1169,12 @@ const AP_Param::GroupInfo ParametersG2::var_info[] = {
AP_SUBGROUPINFO(gripper, "GRIP_", 12, ParametersG2, AP_Gripper), AP_SUBGROUPINFO(gripper, "GRIP_", 12, ParametersG2, AP_Gripper),
#endif #endif
#if OSD_ENABLED
// @Group: OSD
// @Path: ../libraries/AP_OSD/AP_OSD.cpp
AP_SUBGROUPINFO(osd, "OSD_", 13, ParametersG2, AP_OSD),
#endif
AP_GROUPEND AP_GROUPEND
}; };

View File

@ -542,6 +542,10 @@ public:
AP_Gripper gripper; AP_Gripper gripper;
#endif #endif
#if OSD_ENABLED == ENABLED
AP_OSD osd;
#endif
}; };
extern const AP_Param::Info var_info[]; extern const AP_Param::Info var_info[];

View File

@ -85,6 +85,7 @@
#include <AP_BoardConfig/AP_BoardConfig_CAN.h> #include <AP_BoardConfig/AP_BoardConfig_CAN.h>
#include <AP_Frsky_Telem/AP_Frsky_Telem.h> #include <AP_Frsky_Telem/AP_Frsky_Telem.h>
#include <AP_Devo_Telem/AP_Devo_Telem.h> #include <AP_Devo_Telem/AP_Devo_Telem.h>
#include <AP_OSD/AP_OSD.h>
#include <AP_ServoRelayEvents/AP_ServoRelayEvents.h> #include <AP_ServoRelayEvents/AP_ServoRelayEvents.h>
#include <AP_Rally/AP_Rally.h> #include <AP_Rally/AP_Rally.h>

View File

@ -373,3 +373,8 @@
#define DEVO_TELEM_ENABLED ENABLED #define DEVO_TELEM_ENABLED ENABLED
#endif #endif
#endif #endif
#ifndef OSD_ENABLED
#define OSD_ENABLED DISABLED
#endif

View File

@ -58,3 +58,4 @@ LIBRARIES += AP_Beacon
LIBRARIES += PID LIBRARIES += PID
LIBRARIES += AP_Soaring LIBRARIES += AP_Soaring
LIBRARIES += AP_Devo_Telem LIBRARIES += AP_Devo_Telem
LIBRARIES += AP_OSD

View File

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

View File

@ -32,6 +32,7 @@ def build(bld):
'PID', 'PID',
'AP_Soaring', 'AP_Soaring',
'AP_Devo_Telem', 'AP_Devo_Telem',
'AP_OSD',
], ],
) )