Ejemplo n.º 1
0
        private void CloseConnection()
        {
            if (ledCts != null)
            {
                ledCts.Cancel();
                while (ledCts != null)
                {
                    Application.DoEvents();
                }
            }
            if (rollCts != null)
            {
                rollCts.Cancel();
                while (rollCts != null)
                {
                    Application.DoEvents();
                }
            }
            if (fastCts != null)
            {
                fastCts.Cancel();
                while (fastCts != null)
                {
                    Application.DoEvents();
                }
            }

            pigpiodIf.pigpio_stop();
        }
Ejemplo n.º 2
0
        private void buttonClose_Click(object sender, EventArgs e)
        {
            pigpiodIf.pigpio_stop();

            buttonOpen.Enabled  = true;
            buttonClose.Enabled = false;
        }
Ejemplo n.º 3
0
        private void CloseConnection()
        {
            if (cts != null)
            {
                cts.Cancel();
                while (cts != null)
                {
                    Application.DoEvents();
                }
            }

            if (avalonMM.Stream != null)
            {
                avalonMM.WriteUInt32Packet(0x10, 0);                  // Stop sequencer

                avalonMM.Stream.Dispose();
                avalonMM.Stream = null;
            }

            pigpiodIf.pigpio_stop();
        }