RPM refactoring
This commit is contained in:
parent
3e8785b060
commit
d20803e942
|
@ -208,7 +208,7 @@ static msg_t ivThread(int param) {
|
|||
|
||||
if (timeToStopBlip != 0) {
|
||||
iacPosition = blipIdlePosition;
|
||||
} else if (isCrankingOrInitialE(engine)) {
|
||||
} else if (!engine->rpmCalculator.isRunning(PASS_ENGINE_PARAMETER_SIGNATURE)) {
|
||||
// during cranking it's always manual mode, PID would make no sence during cranking
|
||||
iacPosition = cltCorrection * engineConfiguration->crankingIACposition;
|
||||
} else if (engineConfiguration->idleMode == IM_MANUAL) {
|
||||
|
|
|
@ -169,14 +169,6 @@ int RpmCalculator::getRpm(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
return rpmValue;
|
||||
}
|
||||
|
||||
#if (EFI_PROD_CODE || EFI_SIMULATOR) || defined(__DOXYGEN__)
|
||||
bool isCrankingOrInitialE(Engine *engine) {
|
||||
int rpm = getRpmE(engine);
|
||||
return ENGINE(rpmCalculator).isCranking(PASS_ENGINE_PARAMETER_SIGNATURE) || (rpm == 0);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Shaft position callback used by RPM calculation logic.
|
||||
*
|
||||
|
|
|
@ -65,10 +65,6 @@ public:
|
|||
/**
|
||||
* Returns true if the engine is running and not cranking
|
||||
*/
|
||||
// bool isRunning();
|
||||
/**
|
||||
* Please note that this is a relatively heavy method due to getTimeNowNt() usage
|
||||
*/
|
||||
bool isRunning(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
|
||||
/**
|
||||
|
@ -116,7 +112,6 @@ private:
|
|||
*/
|
||||
#define getRpmE(engine) (engine)->rpmCalculator.getRpm(PASS_ENGINE_PARAMETER_SIGNATURE)
|
||||
|
||||
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