Exemplo n.º 1
0
 private void connect()
 {
     if (_comClient == null)
     {
         _comClient = new COMClient(_port, BAUDRATE);
     }
     //if (_comClient.IsConnected) //why would we disconnect???
     //    _comClient.Disconnect();
     //else
     _comClient.Connect();
     if (_comClient.IsConnected)
     {
         _comClient.WriteMessage(string.Format(SolenoidDriverCommands.DebugMode, 0));
         _comClient.WriteMessage(string.Format(SolenoidDriverCommands.SwitchSpew, 1));
     }
 }
Exemplo n.º 2
0
 private void connect()
 {
     if (_comClient == null)
     {
         _comClient = new COMClient(_port, BAUDRATE);
     }
     //if (_comClient.IsConnected) //why would we disconnect???
     //    _comClient.Disconnect();
     //else
     _comClient.Connect();
     if (_comClient.IsConnected)
     {
         _comClient.WriteMessage(string.Format(SolenoidDriverCommands.DebugMode, 0));
         _comClient.WriteMessage(string.Format(SolenoidDriverCommands.SwitchSpew, 1));
     }
 }