Exemplo n.º 1
0
 /// <summary>
 /// Arms / Disarms a component
 /// </summary>
 /// <param name="src"></param>
 /// <param name="state">true to arm, false to disarm</param>
 /// <param name="cancel"></param>
 /// <returns></returns>
 public static Task <CommandAckPayload> ArmDisarm(this IVehicleCommandProtocol src, bool state, CancellationToken cancel)
 {
     return(src.CommandLong(MavCmd.MavCmdComponentArmDisarm, state ? 1 : 0, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN, 3, cancel));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Takeoff from ground / hand
 /// </summary>
 /// <param name="src"></param>
 /// <param name="minimumPitch">Minimum pitch (if airspeed sensor present), desired pitch without sensor</param>
 /// <param name="yawAngle">Yaw angle (if magnetometer present), ignored without magnetometer. NaN for unchanged.</param>
 /// <param name="latitude">Latitude</param>
 /// <param name="longitude">Longitude</param>
 /// <param name="altitude">Altitude</param>
 /// <param name="cancel"></param>
 /// <returns></returns>
 public static Task <CommandAckPayload> TakeOff(this IVehicleCommandProtocol src, float minimumPitch, float yawAngle, float latitude, float longitude, float altitude, CancellationToken cancel)
 {
     return(src.CommandLong(MavCmd.MavCmdNavTakeoff, minimumPitch, float.NaN, float.NaN, yawAngle, latitude, longitude, altitude, 3, cancel));
 }