Пример #1
0
 /// <summary>
 /// Updates the PID gains for each PID control in the MAV. Parameters may be left null if those are not to be updated.
 /// </summary>
 /// <param name="roll">Roll PID gains,</param>
 /// <param name="pitch">Pitch PID gains</param>
 /// <param name="yaw">Yaw PID gains</param>
 public static void SetGains(TJPIDControlGains roll, TJPIDControlGains pitch, TJPIDControlGains yaw)
 {
     TJSetGainsCmd cmd = new TJSetGainsCmd(roll, pitch, yaw);
     EnqueueCommand(cmd);
 }
Пример #2
0
        /// <summary>
        /// Updates the PID gains for each PID control in the MAV. Parameters may be left null if those are not to be updated.
        /// </summary>
        /// <param name="control_index">Position 0, Angle 1, Angular Rate 2</param>
        /// <param name="direction_index">Roll 0, Pitch 1, Yaw 2</param>
        public static void SetGains(int control_index, int direction_index, TJPIDControlGains control)
        {
            int type = control_index * 3 + direction_index + 1;

            TJSetGainsCmd cmd = new TJSetGainsCmd(type, control);
            EnqueueCommand(cmd);
        }