mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-07 08:28:30 -04:00
AP_Mount: integrate topotek gimbal driver
Co-authored-by: Randy Mackay <rmackay9@yahoo.com>
This commit is contained in:
parent
d5d1b9885c
commit
611fb94660
@ -15,6 +15,7 @@
|
|||||||
#include "AP_Mount_Scripting.h"
|
#include "AP_Mount_Scripting.h"
|
||||||
#include "AP_Mount_Xacti.h"
|
#include "AP_Mount_Xacti.h"
|
||||||
#include "AP_Mount_Viewpro.h"
|
#include "AP_Mount_Viewpro.h"
|
||||||
|
#include "AP_Mount_Topotek.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <AP_Math/location.h>
|
#include <AP_Math/location.h>
|
||||||
#include <SRV_Channel/SRV_Channel.h>
|
#include <SRV_Channel/SRV_Channel.h>
|
||||||
@ -156,6 +157,14 @@ void AP_Mount::init()
|
|||||||
serial_instance++;
|
serial_instance++;
|
||||||
break;
|
break;
|
||||||
#endif // HAL_MOUNT_VIEWPRO_ENABLED
|
#endif // HAL_MOUNT_VIEWPRO_ENABLED
|
||||||
|
|
||||||
|
#if HAL_MOUNT_TOPOTEK_ENABLED
|
||||||
|
// check for Topotek gimbal
|
||||||
|
case Type::Topotek:
|
||||||
|
_backends[instance] = NEW_NOTHROW AP_Mount_Topotek(*this, _params[instance], instance, serial_instance);
|
||||||
|
_num_instances++;
|
||||||
|
break;
|
||||||
|
#endif // HAL_MOUNT_TOPOTEK_ENABLED
|
||||||
}
|
}
|
||||||
|
|
||||||
// init new instance
|
// init new instance
|
||||||
|
@ -47,6 +47,7 @@ class AP_Mount_Siyi;
|
|||||||
class AP_Mount_Scripting;
|
class AP_Mount_Scripting;
|
||||||
class AP_Mount_Xacti;
|
class AP_Mount_Xacti;
|
||||||
class AP_Mount_Viewpro;
|
class AP_Mount_Viewpro;
|
||||||
|
class AP_Mount_Topotek;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
This is a workaround to allow the MAVLink backend access to the
|
This is a workaround to allow the MAVLink backend access to the
|
||||||
@ -67,6 +68,7 @@ class AP_Mount
|
|||||||
friend class AP_Mount_Scripting;
|
friend class AP_Mount_Scripting;
|
||||||
friend class AP_Mount_Xacti;
|
friend class AP_Mount_Xacti;
|
||||||
friend class AP_Mount_Viewpro;
|
friend class AP_Mount_Viewpro;
|
||||||
|
friend class AP_Mount_Topotek;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AP_Mount();
|
AP_Mount();
|
||||||
@ -114,6 +116,9 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
#if HAL_MOUNT_VIEWPRO_ENABLED
|
#if HAL_MOUNT_VIEWPRO_ENABLED
|
||||||
Viewpro = 11, /// Viewpro gimbal using a custom serial protocol
|
Viewpro = 11, /// Viewpro gimbal using a custom serial protocol
|
||||||
|
#endif
|
||||||
|
#if HAL_MOUNT_TOPOTEK_ENABLED
|
||||||
|
Topotek = 12, /// Topotek gimbal using a custom serial protocol
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ const AP_Param::GroupInfo AP_Mount_Params::var_info[] = {
|
|||||||
// @Param: _TYPE
|
// @Param: _TYPE
|
||||||
// @DisplayName: Mount Type
|
// @DisplayName: Mount Type
|
||||||
// @Description: Mount Type
|
// @Description: Mount Type
|
||||||
// @Values: 0:None, 1:Servo, 2:3DR Solo, 3:Alexmos Serial, 4:SToRM32 MAVLink, 5:SToRM32 Serial, 6:Gremsy, 7:BrushlessPWM, 8:Siyi, 9:Scripting, 10:Xacti, 11:Viewpro
|
// @Values: 0:None, 1:Servo, 2:3DR Solo, 3:Alexmos Serial, 4:SToRM32 MAVLink, 5:SToRM32 Serial, 6:Gremsy, 7:BrushlessPWM, 8:Siyi, 9:Scripting, 10:Xacti, 11:Viewpro, 12:Topotek
|
||||||
// @RebootRequired: True
|
// @RebootRequired: True
|
||||||
// @User: Standard
|
// @User: Standard
|
||||||
AP_GROUPINFO_FLAGS("_TYPE", 1, AP_Mount_Params, type, 0, AP_PARAM_FLAG_ENABLE),
|
AP_GROUPINFO_FLAGS("_TYPE", 1, AP_Mount_Params, type, 0, AP_PARAM_FLAG_ENABLE),
|
||||||
|
@ -54,6 +54,10 @@
|
|||||||
#define AP_MOUNT_POI_TO_LATLONALT_ENABLED HAL_MOUNT_ENABLED && AP_TERRAIN_AVAILABLE && BOARD_FLASH_SIZE > 1024
|
#define AP_MOUNT_POI_TO_LATLONALT_ENABLED HAL_MOUNT_ENABLED && AP_TERRAIN_AVAILABLE && BOARD_FLASH_SIZE > 1024
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAL_MOUNT_TOPOTEK_ENABLED
|
||||||
|
#define HAL_MOUNT_TOPOTEK_ENABLED AP_MOUNT_BACKEND_DEFAULT_ENABLED
|
||||||
|
#endif
|
||||||
|
|
||||||
// set camera source is supported on gimbals that may have more than one lens
|
// set camera source is supported on gimbals that may have more than one lens
|
||||||
#ifndef HAL_MOUNT_SET_CAMERA_SOURCE_ENABLED
|
#ifndef HAL_MOUNT_SET_CAMERA_SOURCE_ENABLED
|
||||||
#define HAL_MOUNT_SET_CAMERA_SOURCE_ENABLED HAL_MOUNT_SIYI_ENABLED || HAL_MOUNT_XACTI_ENABLED || HAL_MOUNT_VIEWPRO_ENABLED
|
#define HAL_MOUNT_SET_CAMERA_SOURCE_ENABLED HAL_MOUNT_SIYI_ENABLED || HAL_MOUNT_XACTI_ENABLED || HAL_MOUNT_VIEWPRO_ENABLED
|
||||||
|
Loading…
Reference in New Issue
Block a user