Flight stop after SET_POSITION_TARGET_GLOBAL_INT

Hi All

https://ardupilot.org/dev/docs/copter-commands-in-guided-mode.html#copter-commands-in-guided-mode-set-position-target-global-int

I was flying with the SET_POSITION_TARGET_GLOBAL_INT command.

And I want to stop flying.

So, I used DO_PAUSE_CONTINUE. (All parameters are 0)

However, the flight does not stop.


SET_POSITION_TARGET_GLOBAL_INT Code

        MAVLink.mavlink_set_position_target_global_int_t setPosition = new MAVLink.mavlink_set_position_target_global_int_t();

        setPosition.target_system = (byte)sysid;
        setPosition.target_component = (byte)compid;
        setPosition.time_boot_ms = 0;
        setPosition.lat_int = (int)(x * 10000000L); //lat
        setPosition.lon_int = (int)(y * 10000000L); //lon
        setPosition.alt = z; //high m
        setPosition.vx = 0;
        setPosition.vy = 0;
        setPosition.vz = 0;
        setPosition.afx = 0;
        setPosition.afy = 0;
        setPosition.afz = 0;
        setPosition.yaw = 0;
        setPosition.yaw_rate = 0;

        setPosition.type_mask = 0b0000111111111000;// (ushort)(MAVLink.POSITION_TARGET_TYPEMASK.X_IGNORE| MAVLink.POSITION_TARGET_TYPEMASK.Y_IGNORE| MAVLink.POSITION_TARGET_TYPEMASK.VX_IGNORE | MAVLink.POSITION_TARGET_TYPEMASK.VY_IGNORE);
        setPosition.coordinate_frame = (byte)MAVLink.MAV_FRAME.GLOBAL;

DO_PAUSE_CONTINUE Code

        MAVLink.mavlink_command_long_t req = new MAVLink.mavlink_command_long_t();

        req.target_system = sysid;
        req.target_component = compid;

        req.command = (ushort)MAVLink.MAV_CMD.DO_PAUSE_CONTINUE;
        req.param1 = 0;
        req.param2 = 0;
        req.param3 = 0;
        req.param4 = 0;
        req.param5 = 0;
        req.param6 = 0;
        req.param7 = 0;

I want to stop flying.
Please tell me how.

Thank you all.

Change flight mode to loiter.

If the remote controller switch is in the wrong position,
Drones Would not go to other places?

The flight mode change is done programaticaly using a mavlink command.
Yes the RC sticks need to be centered, but the person holding the RC controller should not play with it. :slight_smile: It is not a toy.

Tried without RC Control connected. And, drone crashed.
Our goal is to fly in the absence of RC Control. :face_with_thermometer:
I’m very disappointed. :disappointed_relieved:

You need to set RC3 to 1500 via mavlink.