コード例 #1
0
ファイル: Form1.cs プロジェクト: kenssamson/PigpiodIfTest
        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();
        }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: kenssamson/PigpiodIfTest
        private void buttonClose_Click(object sender, EventArgs e)
        {
            pigpiodIf.pigpio_stop();

            buttonOpen.Enabled  = true;
            buttonClose.Enabled = false;
        }
コード例 #3
0
ファイル: Form1.cs プロジェクト: kenssamson/PigpiodIfTest
        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();
        }