From aab02c80663f1a0b04b31df3f95b0e7c1c2ab450 Mon Sep 17 00:00:00 2001 From: Cynopolis Date: Mon, 8 Nov 2021 21:07:10 -0600 Subject: [PATCH] Added demagnetization pulses Added some demag pulses to demag the HV transformer whenever the single pulse is armed. --- src/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 3a9bcbe..e98c877 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -316,6 +316,10 @@ void loop() { lcd.setCursor(7,1); if(is_armed){ lcd.print("Yes"); + // send a bunch of pulses to demagnetize the HV transformer before arming + for(int i = 0; i < 10; i++){ + generate_waveform(sample_resolution); + } } else lcd.print("No "); //Output the armed state to the arm pin and isolate pin