minor improvement

This commit is contained in:
rusefi 2019-01-14 00:21:08 -05:00
parent 4ed5072f13
commit 2bbc5feef4
2 changed files with 5 additions and 1 deletions

View File

@ -125,7 +125,10 @@ int TriggerState::getTotalRevolutionCounter() {
return totalRevolutionCounter;
}
TriggerStateWithRunningStatistics::TriggerStateWithRunningStatistics() {
TriggerStateWithRunningStatistics::TriggerStateWithRunningStatistics() :
//https://en.cppreference.com/w/cpp/language/zero_initialization
instantRpmValue()
{
// avoid ill-defined instant RPM when the data is not gathered yet
efitime_t nowNt = getTimeNowNt();
for (int i = 0; i < PWM_PHASE_MAX_COUNT; i++) {

View File

@ -37,6 +37,7 @@ TEST(sensors, testFasterEngineSpinningUp) {
// check all events starting from now
int timeStartUs = eth.getTimeNowUs();
// advance 1 revolution
// because we have trivial TT_ONE trigger here synchronization would happen with just one rise front
eth.fireRise(200);
// check if the mode is changed