diff --git a/libraries/AP_Mount/AP_Mount.cpp b/libraries/AP_Mount/AP_Mount.cpp index b46a6819be..93533671c3 100644 --- a/libraries/AP_Mount/AP_Mount.cpp +++ b/libraries/AP_Mount/AP_Mount.cpp @@ -8,6 +8,7 @@ #include #include #include +#include const AP_Param::GroupInfo AP_Mount::var_info[] PROGMEM = { // @Param: _DEFLT_MODE @@ -194,7 +195,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, 3:Alexmos Serial + // @Values: 0:None, 1:Servo, 2:MAVLink, 3:Alexmos Serial, 4:SToRM32 // @User: Standard AP_GROUPINFO("_TYPE", 19, AP_Mount, state[0]._type, 0), @@ -377,7 +378,7 @@ const AP_Param::GroupInfo AP_Mount::var_info[] PROGMEM = { // @Param: 2_TYPE // @DisplayName: Mount2 Type // @Description: Mount Type (None, Servo or MAVLink) - // @Values: 0:None, 1:Servo, 2:MAVLink, 3:Alexmos Serial + // @Values: 0:None, 1:Servo, 2:MAVLink, 3:Alexmos Serial, 4:SToRM32 // @User: Standard AP_GROUPINFO("2_TYPE", 42, AP_Mount, state[1]._type, 0), #endif // AP_MOUNT_MAX_INSTANCES > 1 @@ -431,6 +432,11 @@ void AP_Mount::init(const AP_SerialManager& serial_manager) } else if (mount_type == Mount_Type_Alexmos) { _backends[instance] = new AP_Mount_Alexmos(*this, state[instance], instance); _num_instances++; + + // check for SToRM32 mounts + } else if (mount_type == Mount_Type_SToRM32) { + _backends[instance] = new AP_Mount_SToRM32(*this, state[instance], instance); + _num_instances++; } // init new instance diff --git a/libraries/AP_Mount/AP_Mount.h b/libraries/AP_Mount/AP_Mount.h index 4534f33e82..4656f301db 100644 --- a/libraries/AP_Mount/AP_Mount.h +++ b/libraries/AP_Mount/AP_Mount.h @@ -38,6 +38,7 @@ class AP_Mount_Backend; class AP_Mount_Servo; class AP_Mount_MAVLink; class AP_Mount_Alexmos; +class AP_Mount_SToRM32; /* This is a workaround to allow the MAVLink backend access to the @@ -56,6 +57,7 @@ class AP_Mount friend class AP_Mount_Servo; friend class AP_Mount_MAVLink; friend class AP_Mount_Alexmos; + friend class AP_Mount_SToRM32; public: @@ -64,7 +66,8 @@ public: Mount_Type_None = 0, /// no mount Mount_Type_Servo = 1, /// servo controlled mount Mount_Type_MAVLink = 2, /// MAVLink controlled mount - Mount_Type_Alexmos = 3 /// MAVLink controlled mount + Mount_Type_Alexmos = 3, /// Alexmos mount + Mount_Type_SToRM32 = 4 /// SToRM32 mount }; // Constructor