refactoring
This commit is contained in:
parent
ca21d5b4c2
commit
eb46386c36
|
@ -101,11 +101,6 @@ public:
|
|||
* see also SC_RPM_ACCEL
|
||||
*/
|
||||
float getRpmAcceleration() const;
|
||||
/**
|
||||
* This is public because sometimes we cannot afford to call isRunning() and the value is good enough
|
||||
* Zero if engine is not running
|
||||
*/
|
||||
volatile int rpmValue = 0;
|
||||
/**
|
||||
* this is RPM on previous engine cycle.
|
||||
*/
|
||||
|
@ -117,6 +112,11 @@ public:
|
|||
volatile floatus_t oneDegreeUs = NAN;
|
||||
volatile efitick_t lastRpmEventTimeNt = 0;
|
||||
private:
|
||||
/**
|
||||
* Sometimes we cannot afford to call isRunning() and the value is good enough
|
||||
* Zero if engine is not running
|
||||
*/
|
||||
int rpmValue = 0;
|
||||
/**
|
||||
* Should be called once we've realized engine is not spinning any more.
|
||||
*/
|
||||
|
@ -144,9 +144,6 @@ private:
|
|||
// Just a getter for rpmValue which also handles mockRpm if not EFI_PROD_CODE
|
||||
#define GET_RPM() ( ENGINE(rpmCalculator.getRpm(PASS_ENGINE_PARAMETER_SIGNATURE)) )
|
||||
|
||||
// simple variable access, theoretically could be faster than getter method but that's a long stretch
|
||||
#define GET_RPM_VALUE ( ENGINE(rpmCalculator.rpmValue) )
|
||||
|
||||
#define isValidRpm(rpm) ((rpm) > 0 && (rpm) < UNREALISTIC_RPM)
|
||||
|
||||
void rpmShaftPositionCallback(trigger_event_e ckpSignalType, uint32_t index DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
|
|
Loading…
Reference in New Issue