2022-09-04 23:28:46 -07:00
|
|
|
/**
|
|
|
|
* @file rpm_calculator_api.h
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "rusefi_types.h"
|
|
|
|
|
2022-09-04 23:44:06 -07:00
|
|
|
#pragma once
|
|
|
|
|
2022-09-04 23:28:46 -07:00
|
|
|
class EngineRotationState {
|
|
|
|
public:
|
|
|
|
virtual floatus_t getOneDegreeUs() = 0;
|
2022-09-04 23:44:06 -07:00
|
|
|
virtual bool isCranking() const = 0;
|
2022-09-07 17:20:29 -07:00
|
|
|
/**
|
|
|
|
* Returns true if the engine is not spinning (RPM==0)
|
|
|
|
*/
|
|
|
|
virtual bool isStopped() const = 0;
|
|
|
|
|
2022-09-13 22:34:52 -07:00
|
|
|
// todo: move to triggerCentral/triggerShape since has nothing to do with rotation state!
|
2022-09-04 23:59:38 -07:00
|
|
|
virtual operation_mode_e getOperationMode() const = 0;
|
2022-09-04 23:28:46 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
EngineRotationState * getEngineRotationState();
|
2022-09-04 23:44:06 -07:00
|
|
|
|
|
|
|
injection_mode_e getCurrentInjectionMode();
|