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(); }
private void buttonClose_Click(object sender, EventArgs e) { pigpiodIf.pigpio_stop(); buttonOpen.Enabled = true; buttonClose.Enabled = false; }
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(); }