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); }
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))); }
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))); }