fix crankingIACposition on RPM=0 (#451)
This commit is contained in:
parent
51619fa176
commit
b7af346470
|
@ -208,7 +208,7 @@ static msg_t ivThread(int param) {
|
|||
|
||||
if (timeToStopBlip != 0) {
|
||||
iacPosition = blipIdlePosition;
|
||||
} else if (isCrankingE(engine)) {
|
||||
} else if (isCrankingOrInitialE(engine)) {
|
||||
// during cranking it's always manual mode, PID would make no sence during cranking
|
||||
iacPosition = cltCorrection * engineConfiguration->crankingIACposition;
|
||||
} else if (engineConfiguration->idleMode == IM_MANUAL) {
|
||||
|
|
|
@ -158,9 +158,9 @@ int RpmCalculator::getRpm(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
}
|
||||
|
||||
#if (EFI_PROD_CODE || EFI_SIMULATOR) || defined(__DOXYGEN__)
|
||||
bool isCrankingE(Engine *engine) {
|
||||
bool isCrankingOrInitialE(Engine *engine) {
|
||||
int rpm = getRpmE(engine);
|
||||
return isCrankingR(rpm);
|
||||
return isCrankingR(rpm) || (rpm == 0);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -81,7 +81,7 @@ private:
|
|||
*/
|
||||
#define getRpmE(engine) (engine)->rpmCalculator.getRpm(PASS_ENGINE_PARAMETER_SIGNATURE)
|
||||
|
||||
bool isCrankingE(Engine *engine);
|
||||
bool isCrankingOrInitialE(Engine *engine);
|
||||
void rpmShaftPositionCallback(trigger_event_e ckpSignalType, uint32_t index DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
/**
|
||||
* @brief Initialize RPM calculator
|
||||
|
|
Loading…
Reference in New Issue