Something something Automatic Compression Release #3442

This commit is contained in:
rusefi 2021-11-14 15:04:10 -05:00
parent fcf0d68849
commit e8aebc313a
3 changed files with 3 additions and 2 deletions

View File

@ -94,6 +94,7 @@ public:
AcState acState;
bool enableOverdwellProtection = true;
bool isPwmEnabled = true;
// todo: remove this once all usages are using 'm_lastEventTimer'
int triggerActivityMs = -99 * 1000;
const char *prevOutputName = nullptr;

View File

@ -531,7 +531,7 @@ void configureRusefiLuaHooks(lua_State* l) {
Engine *engine = engineForLuaUnitTests;
EXPAND_Engine;
#endif
int result = currentTimeMillis() - engine->triggerActivityMs;
int result = engine->triggerCentral.m_lastEventTimer.getElapsedUs() / 1000;
lua_pushnumber(l, result);
return 1;
});

View File

@ -86,10 +86,10 @@ public:
TriggerFormDetails triggerFormDetails;
private:
// Keep track of the last time we got a valid trigger event
Timer m_lastEventTimer;
private:
// Keep track of the last time we saw the sync tooth go by (trigger index 0)
Timer m_virtualZeroTimer;
};