示例#1
0
 public void Paste(string data)
 {
     if (serial.IsOpen)
     {
         serial.WriteLine(data);
     }
 }
示例#2
0
 //Send a single command
 public void SendCommand(string Command, bool ExpectReply)
 {
     commType = CommType.SINGLE;
     if (checkPort())
     {
         return;
     }
     singleCommand    = Command;
     dataName         = Command;
     sentCommandIndex = 0;
     comAttempts      = 0;
     OnComStarted(commType);
     OnProgressChanged(commType, 0, "Configuration: Sent " + dataName + ".");
     mavPixReply = "";
     serial.WriteLine(Command);
     if (ExpectReply)
     {
         startTimer(ref sendingCommands);
     }
 }