From b0812889c08e0146eaf799c062dfca28da1348ff Mon Sep 17 00:00:00 2001 From: Josh Stewart Date: Wed, 3 Feb 2016 08:22:51 +1100 Subject: [PATCH] Disable idle PWM interrupt by default (Only use if needed) --- idle.ino | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/idle.ino b/idle.ino index 7683919..e248488 100644 --- a/idle.ino +++ b/idle.ino @@ -14,6 +14,11 @@ Currently limited to on/off control and open loop PWM and stepper drive */ void initialiseIdle() { +//By default, turn off the PWM interrupt (It gets turned on below if needed) +#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) + else { TIMSK1 &= ~(1 << OCIE1A); } // Disable timer channel +#endif + //Initialising comprises of setting the 2D tables with the relevant values from the config pages switch(configPage4.iacAlgorithm) {