mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 18:08:53 +08:00
vmount: Use MNT_DO_STAB parameter for defaults in InputMavlinkCmdMount as well.
This commit is contained in:
committed by
Beat Küng
parent
fdf4eb0bd6
commit
335c319b2e
@@ -173,7 +173,8 @@ void InputMavlinkROI::print_status()
|
||||
}
|
||||
|
||||
|
||||
InputMavlinkCmdMount::InputMavlinkCmdMount()
|
||||
InputMavlinkCmdMount::InputMavlinkCmdMount(bool stabilize)
|
||||
: _stabilize {stabilize, stabilize, stabilize}
|
||||
{
|
||||
param_t handle = param_find("MAV_SYS_ID");
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ private:
|
||||
class InputMavlinkCmdMount : public InputBase
|
||||
{
|
||||
public:
|
||||
InputMavlinkCmdMount();
|
||||
InputMavlinkCmdMount(bool stabilize);
|
||||
virtual ~InputMavlinkCmdMount();
|
||||
|
||||
virtual void print_status();
|
||||
|
||||
@@ -276,7 +276,7 @@ static int vmount_thread_main(int argc, char *argv[])
|
||||
case 0:
|
||||
|
||||
// Automatic
|
||||
thread_data.input_objs[0] = new InputMavlinkCmdMount();
|
||||
thread_data.input_objs[0] = new InputMavlinkCmdMount(params.mnt_do_stab);
|
||||
thread_data.input_objs[1] = new InputMavlinkROI();
|
||||
|
||||
// RC is on purpose last here so that if there are any mavlink
|
||||
@@ -296,7 +296,7 @@ static int vmount_thread_main(int argc, char *argv[])
|
||||
break;
|
||||
|
||||
case 3: //MAVLINK_DO_MOUNT
|
||||
thread_data.input_objs[0] = new InputMavlinkCmdMount();
|
||||
thread_data.input_objs[0] = new InputMavlinkCmdMount(params.mnt_do_stab);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -158,8 +158,8 @@ PARAM_DEFINE_INT32(MNT_MAN_PITCH, 0);
|
||||
PARAM_DEFINE_INT32(MNT_MAN_YAW, 0);
|
||||
|
||||
/**
|
||||
* Stabilize the mount (true for servo gimbal, false for passthrough).
|
||||
* Only affects RC input; Mavlink input can set this with the DO_MOUNT_CONFIGURE command.
|
||||
* Stabilize the mount (set to true for servo gimbal, false for passthrough).
|
||||
* Does not affect MAVLINK_ROI input.
|
||||
*
|
||||
* @boolean
|
||||
* @group Mount
|
||||
|
||||
Reference in New Issue
Block a user