mirror of https://github.com/ArduPilot/ardupilot
Mount: add SToRM32 serial to front end
This commit is contained in:
parent
c133511431
commit
72eb25b166
|
@ -9,6 +9,7 @@
|
|||
#include <AP_Mount_MAVLink.h>
|
||||
#include <AP_Mount_Alexmos.h>
|
||||
#include <AP_Mount_SToRM32.h>
|
||||
#include <AP_Mount_SToRM32_serial.h>
|
||||
|
||||
const AP_Param::GroupInfo AP_Mount::var_info[] PROGMEM = {
|
||||
// @Param: _DEFLT_MODE
|
||||
|
@ -195,7 +196,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, 4:SToRM32
|
||||
// @Values: 0:None, 1:Servo, 2:MAVLink, 3:Alexmos Serial, 4:SToRM32 MAVLink, 5:SToRM32 Serial
|
||||
// @User: Standard
|
||||
AP_GROUPINFO("_TYPE", 19, AP_Mount, state[0]._type, 0),
|
||||
|
||||
|
@ -451,7 +452,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, 4:SToRM32
|
||||
// @Values: 0:None, 1:Servo, 2:MAVLink, 3:Alexmos Serial, 4:SToRM32 MAVLink, 5:SToRM32 Serial
|
||||
// @User: Standard
|
||||
AP_GROUPINFO("2_TYPE", 42, AP_Mount, state[1]._type, 0),
|
||||
#endif // AP_MOUNT_MAX_INSTANCES > 1
|
||||
|
@ -506,10 +507,15 @@ void AP_Mount::init(const AP_SerialManager& serial_manager)
|
|||
_backends[instance] = new AP_Mount_Alexmos(*this, state[instance], instance);
|
||||
_num_instances++;
|
||||
|
||||
// check for SToRM32 mounts
|
||||
// check for SToRM32 mounts using MAVLink protocol
|
||||
} else if (mount_type == Mount_Type_SToRM32) {
|
||||
_backends[instance] = new AP_Mount_SToRM32(*this, state[instance], instance);
|
||||
_num_instances++;
|
||||
|
||||
// check for SToRM32 mounts using serial protocol
|
||||
} else if (mount_type == Mount_Type_SToRM32_serial) {
|
||||
_backends[instance] = new AP_Mount_SToRM32_serial(*this, state[instance], instance);
|
||||
_num_instances++;
|
||||
}
|
||||
|
||||
// init new instance
|
||||
|
|
|
@ -39,6 +39,7 @@ class AP_Mount_Servo;
|
|||
class AP_Mount_MAVLink;
|
||||
class AP_Mount_Alexmos;
|
||||
class AP_Mount_SToRM32;
|
||||
class AP_Mount_SToRM32_serial;
|
||||
|
||||
/*
|
||||
This is a workaround to allow the MAVLink backend access to the
|
||||
|
@ -53,6 +54,7 @@ class AP_Mount
|
|||
friend class AP_Mount_MAVLink;
|
||||
friend class AP_Mount_Alexmos;
|
||||
friend class AP_Mount_SToRM32;
|
||||
friend class AP_Mount_SToRM32_serial;
|
||||
|
||||
public:
|
||||
|
||||
|
@ -62,7 +64,8 @@ public:
|
|||
Mount_Type_Servo = 1, /// servo controlled mount
|
||||
Mount_Type_MAVLink = 2, /// MAVLink controlled mount
|
||||
Mount_Type_Alexmos = 3, /// Alexmos mount
|
||||
Mount_Type_SToRM32 = 4 /// SToRM32 mount
|
||||
Mount_Type_SToRM32 = 4, /// SToRM32 mount using MAVLink protocol
|
||||
Mount_Type_SToRM32_serial = 5 /// SToRM32 mount using custom serial protocol
|
||||
};
|
||||
|
||||
struct gimbal_params {
|
||||
|
|
Loading…
Reference in New Issue