rpm refactoring

This commit is contained in:
rusefi 2017-07-06 08:35:09 -04:00
parent f13b0a5698
commit 889642af97
2 changed files with 24 additions and 0 deletions

View File

@ -62,6 +62,18 @@ RpmCalculator::RpmCalculator() {
oneDegreeUs = NAN;
}
bool RpmCalculator::isStopped() {
return false;
}
bool RpmCalculator::isCranking() {
return false;
}
//bool RpmCalculator::isRunning() {
// return false;
//}
/**
* @return true if there was a full shaft revolution within the last second
*/

View File

@ -54,6 +54,18 @@ public:
int mockRpm;
#endif
RpmCalculator();
/**
* Returns true if the engine is not spinning (RPM==0)
*/
bool isStopped();
/**
* Returns true if the engine is cranking
*/
bool isCranking();
/**
* 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
*/