예제 #1
0
        public static string TranslateCommand(int MotorAddress, QcCommand Command, List <string> Parameters = null)
        {
            string motorcommand = "@" + MotorAddress + " " + ((int)Command).ToString() + " ";

            if (Parameters != null && Parameters.Count > 0)
            {
                motorcommand += " " + string.Join(" ", Parameters.ToArray());
            }
            return(motorcommand);
        }
예제 #2
0
 public int AddMotionCommand(int MotorAddress, QcCommand Command, List <int> Parameters, UserCallBackParameters FlightParameters = null)
 {
     return(AddMotorCommand(MotorAddress,
                            new QcController.MotorCommands.MotionControlMotorCommand(
                                new QcController.MotorCommands.MessageCommands.MotionCommand(
                                    new QcMessage()
     {
         Command = Command,
         Data = Parameters
     }), FlightParameters)));
 }
예제 #3
0
 public int AddImmediateCommand(int MotorAddress, QcCommand Command, List <int> Parameters = null, UserCallBackParameters FlightParameters = null)
 {
     if (Parameters == null)
     {
         Parameters = new List <int>();
     }
     return(AddMotorCommand(MotorAddress,
                            new QcController.MotorCommands.ImmediateMotorCommand(
                                new QcController.MotorCommands.MessageCommands.ImmediateCommand(
                                    new QcMessage()
     {
         Command = Command,
         Data = Parameters
     }), FlightParameters)));
 }