diff --git a/libraries/AP_Mount/AP_Mount.cpp b/libraries/AP_Mount/AP_Mount.cpp index 93e7b422e9..0b0055ffa5 100644 --- a/libraries/AP_Mount/AP_Mount.cpp +++ b/libraries/AP_Mount/AP_Mount.cpp @@ -7,6 +7,7 @@ #include #include #include +#include const AP_Param::GroupInfo AP_Mount::var_info[] PROGMEM = { // @Param: _DEFLT_MODE @@ -193,7 +194,7 @@ const AP_Param::GroupInfo AP_Mount::var_info[] PROGMEM = { // @Param: _TYPE // @DisplayName: Mount Type // @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 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) { _backends[instance] = new AP_Mount_MAVLink(*this, instance); _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 diff --git a/libraries/AP_Mount/AP_Mount.h b/libraries/AP_Mount/AP_Mount.h index e6bbd93acf..ff0e90534a 100644 --- a/libraries/AP_Mount/AP_Mount.h +++ b/libraries/AP_Mount/AP_Mount.h @@ -36,6 +36,7 @@ class AP_Mount_Backend; class AP_Mount_Servo; class AP_Mount_MAVLink; +class AP_Mount_Alexmos; class AP_Mount { @@ -43,6 +44,7 @@ class AP_Mount friend class AP_Mount_Backend; friend class AP_Mount_Servo; friend class AP_Mount_MAVLink; + friend class AP_Mount_Alexmos; public: @@ -51,6 +53,7 @@ public: Mount_Type_None = 0, /// no mount Mount_Type_Servo = 1, /// servo controlled mount Mount_Type_MAVLink = 2, /// MAVLink controlled mount + Mount_Type_Alexmos = 2, /// MAVLink controlled mount }; // Constructor