Exemplo n.º 1
0
        private void ReConnectRx()
        {
            if (enabled && (!rx1164.IsConnected || !rx2164.IsConnected))
            {
                lock (rxLock)
                {
                    if (!rx1164.IsConnected)
                    {
                        Logger.Info("try to connect rx1164 adapter");

                        if (!rx1164.OpenDevice())
                        {
                            Logger.Warn("rx1164: connection failed");
                        }
                    }

                    if (!rx2164.IsConnected)
                    {
                        Logger.Info("try to connect rx2164 adapter");

                        if (!rx2164.OpenDevice())
                        {
                            Logger.Warn("rx2164: connection failed");
                        }
                    }
                }
            }
        }
Exemplo n.º 2
0
        public void Run()
        {
            var ad = new RX2164Adapter();

            if (!ad.OpenDevice())
            {
                throw new Exception("unable to open");
            }

            ad.CommandReceived += Ad_CommandReceived;

            while (true)
            {
                Thread.Sleep(100);
            }
        }
Exemplo n.º 3
0
 public override void StartPlugin()
 {
     rx1164.OpenDevice();
     rx2164.OpenDevice();
 }