From 9e86d5e93c48536a76922152791cf91b933c586a Mon Sep 17 00:00:00 2001 From: David Cutting Date: Tue, 14 Jul 2020 19:04:55 -0600 Subject: [PATCH] Update interrupt handling for better waveforms --- CommandStation.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CommandStation.cpp b/CommandStation.cpp index 6d7a079..ce75cb1 100644 --- a/CommandStation.cpp +++ b/CommandStation.cpp @@ -38,8 +38,10 @@ DCCService* progTrack = DCCService::Create_Pololu_MC33926Shield_Prog(); #endif void waveform_IrqHandler() { - mainTrack->interruptHandler(); - progTrack->interruptHandler(); + bool mainInterrupt = mainTrack->interrupt1(); + bool progInterrupt = progTrack->interrupt1(); + if(mainInterrupt) mainTrack->interrupt2(); + if(progInterrupt) progTrack->interrupt2(); } #if defined(ARDUINO_ARCH_SAMD)