mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-28 02:33:58 -04:00
AP_Mount: Make use of the new AP_Mount_Alexmos backend
This is adding AP_Mount_Alexmos as one of the available backend
This commit is contained in:
parent
dfc086f9e9
commit
6e5e438b0f
@ -7,6 +7,7 @@
|
|||||||
#include <AP_Mount_Backend.h>
|
#include <AP_Mount_Backend.h>
|
||||||
#include <AP_Mount_Servo.h>
|
#include <AP_Mount_Servo.h>
|
||||||
#include <AP_Mount_MAVLink.h>
|
#include <AP_Mount_MAVLink.h>
|
||||||
|
#include <AP_Mount_Alexmos.h>
|
||||||
|
|
||||||
const AP_Param::GroupInfo AP_Mount::var_info[] PROGMEM = {
|
const AP_Param::GroupInfo AP_Mount::var_info[] PROGMEM = {
|
||||||
// @Param: _DEFLT_MODE
|
// @Param: _DEFLT_MODE
|
||||||
@ -193,7 +194,7 @@ const AP_Param::GroupInfo AP_Mount::var_info[] PROGMEM = {
|
|||||||
// @Param: _TYPE
|
// @Param: _TYPE
|
||||||
// @DisplayName: Mount Type
|
// @DisplayName: Mount Type
|
||||||
// @Description: Mount Type (None, Servo or MAVLink)
|
// @Description: Mount Type (None, Servo or MAVLink)
|
||||||
// @Values: 0:None, 1:Servo, 2:MAVLink
|
// @Values: 0:None, 1:Servo, 2:MAVLink 3:Alexmos Serial
|
||||||
// @User: Standard
|
// @User: Standard
|
||||||
AP_GROUPINFO("_TYPE", 19, AP_Mount, state[0]._type, 0),
|
AP_GROUPINFO("_TYPE", 19, AP_Mount, state[0]._type, 0),
|
||||||
|
|
||||||
@ -420,6 +421,11 @@ void AP_Mount::init()
|
|||||||
} else if (mount_type == Mount_Type_MAVLink) {
|
} else if (mount_type == Mount_Type_MAVLink) {
|
||||||
_backends[instance] = new AP_Mount_MAVLink(*this, instance);
|
_backends[instance] = new AP_Mount_MAVLink(*this, instance);
|
||||||
_num_instances++;
|
_num_instances++;
|
||||||
|
|
||||||
|
// check for MAVLink mounts
|
||||||
|
} else if (mount_type == Mount_Type_Alexmos) {
|
||||||
|
_backends[instance] = new AP_Mount_Alexmos(*this, instance);
|
||||||
|
_num_instances++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// init new instance
|
// init new instance
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
class AP_Mount_Backend;
|
class AP_Mount_Backend;
|
||||||
class AP_Mount_Servo;
|
class AP_Mount_Servo;
|
||||||
class AP_Mount_MAVLink;
|
class AP_Mount_MAVLink;
|
||||||
|
class AP_Mount_Alexmos;
|
||||||
|
|
||||||
class AP_Mount
|
class AP_Mount
|
||||||
{
|
{
|
||||||
@ -43,6 +44,7 @@ class AP_Mount
|
|||||||
friend class AP_Mount_Backend;
|
friend class AP_Mount_Backend;
|
||||||
friend class AP_Mount_Servo;
|
friend class AP_Mount_Servo;
|
||||||
friend class AP_Mount_MAVLink;
|
friend class AP_Mount_MAVLink;
|
||||||
|
friend class AP_Mount_Alexmos;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -51,6 +53,7 @@ public:
|
|||||||
Mount_Type_None = 0, /// no mount
|
Mount_Type_None = 0, /// no mount
|
||||||
Mount_Type_Servo = 1, /// servo controlled mount
|
Mount_Type_Servo = 1, /// servo controlled mount
|
||||||
Mount_Type_MAVLink = 2, /// MAVLink controlled mount
|
Mount_Type_MAVLink = 2, /// MAVLink controlled mount
|
||||||
|
Mount_Type_Alexmos = 2, /// MAVLink controlled mount
|
||||||
};
|
};
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
|
Loading…
Reference in New Issue
Block a user