mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-06 19:00:27 +08:00
AP_Mount: add viewpro cpp driver
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include "AP_Mount_Siyi.h"
|
||||
#include "AP_Mount_Scripting.h"
|
||||
#include "AP_Mount_Xacti.h"
|
||||
#include "AP_Mount_Viewpro.h"
|
||||
#include <stdio.h>
|
||||
#include <AP_Math/location.h>
|
||||
#include <SRV_Channel/SRV_Channel.h>
|
||||
@@ -140,6 +141,14 @@ void AP_Mount::init()
|
||||
_num_instances++;
|
||||
break;
|
||||
#endif // HAL_MOUNT_XACTI_ENABLED
|
||||
|
||||
#if HAL_MOUNT_VIEWPRO_ENABLED
|
||||
// check for Xacti gimbal
|
||||
case Type::Viewpro:
|
||||
_backends[instance] = new AP_Mount_Viewpro(*this, _params[instance], instance);
|
||||
_num_instances++;
|
||||
break;
|
||||
#endif // HAL_MOUNT_VIEWPRO_ENABLED
|
||||
}
|
||||
|
||||
// init new instance
|
||||
|
||||
@@ -45,6 +45,7 @@ class AP_Mount_Gremsy;
|
||||
class AP_Mount_Siyi;
|
||||
class AP_Mount_Scripting;
|
||||
class AP_Mount_Xacti;
|
||||
class AP_Mount_Viewpro;
|
||||
|
||||
/*
|
||||
This is a workaround to allow the MAVLink backend access to the
|
||||
@@ -64,6 +65,7 @@ class AP_Mount
|
||||
friend class AP_Mount_Siyi;
|
||||
friend class AP_Mount_Scripting;
|
||||
friend class AP_Mount_Xacti;
|
||||
friend class AP_Mount_Viewpro;
|
||||
|
||||
public:
|
||||
AP_Mount();
|
||||
@@ -108,6 +110,9 @@ public:
|
||||
#endif
|
||||
#if HAL_MOUNT_XACTI_ENABLED
|
||||
Xacti = 10, /// Xacti DroneCAN gimbal driver
|
||||
#endif
|
||||
#if HAL_MOUNT_VIEWPRO_ENABLED
|
||||
Viewpro = 11, /// Viewpro gimbal using a custom serial protocol
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -44,3 +44,7 @@
|
||||
#ifndef HAL_MOUNT_XACTI_ENABLED
|
||||
#define HAL_MOUNT_XACTI_ENABLED AP_MOUNT_BACKEND_DEFAULT_ENABLED && HAL_ENABLE_DRONECAN_DRIVERS
|
||||
#endif
|
||||
|
||||
#ifndef HAL_MOUNT_VIEWPRO_ENABLED
|
||||
#define HAL_MOUNT_VIEWPRO_ENABLED AP_MOUNT_BACKEND_DEFAULT_ENABLED
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user