Add safety check on boost and vvt pulses

This commit is contained in:
Josh Stewart 2015-10-02 15:51:27 +10:00
parent 57607b8ac0
commit 864d573ce4
1 changed files with 2 additions and 0 deletions

View File

@ -60,6 +60,7 @@ void vvtControl()
//The interrupt to control the Boost PWM
ISR(TIMER1_COMPA_vect)
{
if(!configPage3.boostEnabled) { return; }
if (boost_pwm_state)
{
*boost_pin_port &= ~(boost_pin_mask); // Switch pin to low
@ -78,6 +79,7 @@ ISR(TIMER1_COMPA_vect)
//The interrupt to control the VVT PWM
ISR(TIMER1_COMPB_vect)
{
if(!configPage3.vvtEnabled) { return; }
if (vvt_pwm_state)
{
*vvt_pin_port &= ~(vvt_pin_mask); // Switch pin to low