refactoring
This commit is contained in:
parent
49541b027f
commit
90c19d7292
|
@ -67,9 +67,9 @@ RpmCalculator::RpmCalculator() {
|
||||||
*/
|
*/
|
||||||
bool RpmCalculator::isRunning(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
bool RpmCalculator::isRunning(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
efitick_t nowNt = getTimeNowNt();
|
efitick_t nowNt = getTimeNowNt();
|
||||||
if (engine->stopEngineRequestTimeNt != 0) {
|
if (ENGINE(stopEngineRequestTimeNt) != 0) {
|
||||||
if (nowNt
|
if (nowNt
|
||||||
- engine->stopEngineRequestTimeNt< 3 * US2NT(US_PER_SECOND_LL)) {
|
- ENGINE(stopEngineRequestTimeNt)< 3 * US2NT(US_PER_SECOND_LL)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -108,7 +108,7 @@ void RpmCalculator::setRpmValue(int value DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||||
* this would make sure that we have good numbers for first cranking revolution
|
* this would make sure that we have good numbers for first cranking revolution
|
||||||
* #275 cranking could be improved
|
* #275 cranking could be improved
|
||||||
*/
|
*/
|
||||||
engine->periodicFastCallback(PASS_ENGINE_PARAMETER_SIGNATURE);
|
ENGINE(periodicFastCallback(PASS_ENGINE_PARAMETER_SIGNATURE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ void RpmCalculator::onNewEngineCycle() {
|
||||||
revolutionCounterSinceStart++;
|
revolutionCounterSinceStart++;
|
||||||
#if EFI_UNIT_TEST
|
#if EFI_UNIT_TEST
|
||||||
revolutionCounterSinceBootForUnitTest = revolutionCounterSinceBoot;
|
revolutionCounterSinceBootForUnitTest = revolutionCounterSinceBoot;
|
||||||
#endif
|
#endif /* EFI_UNIT_TEST */
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t RpmCalculator::getRevolutionCounter(void) {
|
uint32_t RpmCalculator::getRevolutionCounter(void) {
|
||||||
|
@ -163,9 +163,6 @@ bool isCrankingE(Engine *engine) {
|
||||||
return isCrankingR(rpm);
|
return isCrankingR(rpm);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isCranking(void) {
|
|
||||||
return isCrankingE(engine);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue