cl boost control above baro should use logical and/or (#901)
This commit is contained in:
parent
76e024d3ae
commit
ff0296aaf2
|
@ -391,7 +391,7 @@ void boostControl()
|
|||
if ( (configPage9.boostByGearEnabled > 0) && (configPage2.vssMode > 1) ){ boostByGear(); }
|
||||
else{ currentStatus.boostTarget = get3DTableValue(&boostTable, (currentStatus.TPS * 2), currentStatus.RPM) << 1; } //Boost target table is in kpa and divided by 2
|
||||
}
|
||||
if(((configPage15.boostControlEnable == EN_BOOST_CONTROL_BARO) & (currentStatus.MAP >= currentStatus.baro)) | ((configPage15.boostControlEnable == EN_BOOST_CONTROL_FIXED) & (currentStatus.MAP >= configPage15.boostControlEnableThreshold))) //Only enables boost control above baro pressure or above user defined threshold (User defined level is usually set to boost with wastegate actuator only boost level)
|
||||
if(((configPage15.boostControlEnable == EN_BOOST_CONTROL_BARO) && (currentStatus.MAP >= currentStatus.baro)) || ((configPage15.boostControlEnable == EN_BOOST_CONTROL_FIXED) && (currentStatus.MAP >= configPage15.boostControlEnableThreshold))) //Only enables boost control above baro pressure or above user defined threshold (User defined level is usually set to boost with wastegate actuator only boost level)
|
||||
{
|
||||
//If flex fuel is enabled, there can be an adder to the boost target based on ethanol content
|
||||
if( configPage2.flexEnabled == 1 )
|
||||
|
@ -437,10 +437,7 @@ void boostControl()
|
|||
currentStatus.boostDuty = configPage15.boostDCWhenDisabled*100;
|
||||
boost_pwm_target_value = ((unsigned long)(currentStatus.boostDuty) * boost_pwm_max_count) / 10000; //Convert boost duty (Which is a % multiplied by 100) to a pwm count
|
||||
ENABLE_BOOST_TIMER(); //Turn on the compare unit (ie turn on the interrupt) if boost duty >0
|
||||
if(currentStatus.boostDuty==0){
|
||||
//If boost control does nothing disable PWM completely
|
||||
boostDisable();
|
||||
}
|
||||
if(currentStatus.boostDuty == 0) { boostDisable(); } //If boost control does nothing disable PWM completely
|
||||
} //MAP above boost + hyster
|
||||
} //Open / Cloosed loop
|
||||
|
||||
|
|
Loading…
Reference in New Issue