Fix wrong timer disable on idle setup
This commit is contained in:
parent
03968f61cf
commit
6cc62cf8dc
|
@ -35,7 +35,7 @@ void initialiseAuxPWM()
|
|||
|
||||
boost_pwm_max_count = 1000000L / (16 * configPage3.boostFreq * 2); //Converts the frequency in Hz to the number of ticks (at 16uS) it takes to complete 1 cycle. The x2 is there because the frequency is stored at half value (in a byte)
|
||||
vvt_pwm_max_count = 1000000L / (16 * configPage3.vvtFreq * 2); //Converts the frequency in Hz to the number of ticks (at 16uS) it takes to complete 1 cycle
|
||||
TIMSK1 |= (1 << OCIE1A); //Turn on the A compare unit (ie turn on the interrupt)
|
||||
TIMSK1 |= (1 << OCIE1A); //Turn on the A compare unit (ie turn on the interrupt)
|
||||
TIMSK1 |= (1 << OCIE1B); //Turn on the B compare unit (ie turn on the interrupt)
|
||||
}
|
||||
|
||||
|
|
2
idle.ino
2
idle.ino
|
@ -16,7 +16,7 @@ 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
|
||||
TIMSK4 &= ~(1 << OCIE4C); // Disable timer channel for idle
|
||||
#endif
|
||||
|
||||
//Initialising comprises of setting the 2D tables with the relevant values from the config pages
|
||||
|
|
Loading…
Reference in New Issue