Exemplo n.º 1
0
        public bool initDevice(int device, int port, int baud, int protocol)
        {
            m_commLog.AddItem(string.Format("Attempting initialization on port {0}", port.ToString()));
            bool flag = false;

            setDevice(device);
            if (m_obdDevice.initialize(port, baud, protocol) && initOBD())
            {
                flag = true;
                OnConnect();
            }
            return(flag);
        }
Exemplo n.º 2
0
 public void setPort(int iPort)
 {
     m_strPort = "COM" + iPort.ToString() + ":";
     m_commLog.AddItem(string.Format("Port set to {0}", m_strPort));
 }
Exemplo n.º 3
0
        public bool initDevice(HardwareType device, int port, int baud, ProtocolType protocol)
        {
            m_commLog.AddItem(string.Format("Attempting initialization on port {0}", port.ToString()));

            setDevice(device);
            if (m_obdDevice.Initialize(port, baud, protocol) && InitOBD())
            {
                OnConnect();
                return(true);
            }
            return(false);
        }