forked from Archive/PX4-Autopilot
vmount: add to startup script, disable by default
vmount is now added to the startup script, however, it will only start if the param MNT_MODE_IN is set to anything but -1.
This commit is contained in:
parent
ed577f705d
commit
349a468f81
|
@ -1119,6 +1119,13 @@ then
|
|||
fi
|
||||
unset TEMP_CALIB_ARGS
|
||||
|
||||
# vmount to control mounts such as gimbals, disabled by default.
|
||||
if param compare MNT_MODE_IN -1
|
||||
then
|
||||
else
|
||||
vmount start
|
||||
fi
|
||||
|
||||
# End of autostart
|
||||
fi
|
||||
|
||||
|
|
|
@ -202,7 +202,7 @@ static int vmount_thread_main(int argc, char *argv[])
|
|||
|
||||
while (!thread_should_exit) {
|
||||
|
||||
if (!thread_data.input_objs[0] || test_input) { //need to initialize
|
||||
if (!thread_data.input_objs[0] && (params.mnt_mode_in >= 0 || test_input)) { //need to initialize
|
||||
|
||||
output_config.gimbal_normal_mode_value = params.mnt_ob_norm_mode;
|
||||
output_config.gimbal_retracted_mode_value = params.mnt_ob_lock_mode;
|
||||
|
|
|
@ -42,15 +42,17 @@
|
|||
* RC uses the AUX input channels (see MNT_MAN_* parameters),
|
||||
* MAVLINK_ROI uses the MAV_CMD_DO_SET_ROI Mavlink message, and MAVLINK_DO_MOUNT the
|
||||
* MAV_CMD_DO_MOUNT_CONFIGURE and MAV_CMD_DO_MOUNT_CONTROL messages to control a mount.
|
||||
* @value -1 DISABLED
|
||||
* @value 0 AUTO
|
||||
* @value 1 RC
|
||||
* @value 2 MAVLINK_ROI
|
||||
* @value 3 MAVLINK_DO_MOUNT
|
||||
* @min 0
|
||||
* @min -1
|
||||
* @max 3
|
||||
* @group Mount
|
||||
* @reboot_required true
|
||||
*/
|
||||
PARAM_DEFINE_INT32(MNT_MODE_IN, 0);
|
||||
PARAM_DEFINE_INT32(MNT_MODE_IN, -1);
|
||||
|
||||
/**
|
||||
* Mount output mode
|
||||
|
|
Loading…
Reference in New Issue