Exemplo n.º 1
0
 private void ComPortCb_SelectedIndexChanged(object sender, EventArgs e)
 {
     _selectedComPort   = (ComPortSelectionItem)ComPortCb.SelectedItem;
     ConnectBtn.Enabled = _selectedComPort != null;
     _logging.Info(MODUL_NAME, "ComPortCb_SelectedIndexChanged", $"{_selectedComPort?.ComPort} selected");
     SetButtonStatus();
 }
Exemplo n.º 2
0
        public bool CheckPort(ComPortSelectionItem portItem)
        {
            bool success = Init(portItem.ComPort, DEFAULT_BAUDRATE, 500, false);

            if (!success)
            {
                return(false);
            }
            int majorVersion;
            int minorVersion;
            int apiVersion;

            SketchVersion.ArduinoType arduinoType;
            success = GetArduinoSketchVersion(out majorVersion, out minorVersion, out apiVersion, out arduinoType);
            DeInit();
            return(success);
        }