more info verbose trigger/vvt

This commit is contained in:
rusefillc 2022-06-17 22:11:09 -04:00
parent f3a5b027d9
commit 9d942a1c4a
1 changed files with 7 additions and 2 deletions

View File

@ -576,15 +576,20 @@ expected<TriggerDecodeResult> TriggerDecoderBase::decodeTriggerEvent(
efiPrintf("index=%d NaN gap, you have noise issues?", efiPrintf("index=%d NaN gap, you have noise issues?",
i); i);
} else { } else {
efiPrintf("%srpm=%d time=%d eventIndex=%d gapIndex=%d: gap=%.3f expected from %.3f to %.3f error=%s", float ratioTo = triggerShape.syncronizationRatioTo[i];
bool gapOk = isInRange(ratioFrom, gap, ratioTo);
efiPrintf("%srpm=%d time=%d eventIndex=%d gapIndex=%d: %s gap=%.3f expected from %.3f to %.3f error=%s",
triggerConfiguration.PrintPrefix, triggerConfiguration.PrintPrefix,
(int)Sensor::getOrZero(SensorType::Rpm), (int)Sensor::getOrZero(SensorType::Rpm),
/* cast is needed to make sure we do not put 64 bit value to stack*/ (int)getTimeNowSeconds(), /* cast is needed to make sure we do not put 64 bit value to stack*/ (int)getTimeNowSeconds(),
currentCycle.current_index, currentCycle.current_index,
i, i,
gapOk ? "Y" : "n",
gap, gap,
ratioFrom, ratioFrom,
triggerShape.syncronizationRatioTo[i], ratioTo,
boolToString(someSortOfTriggerError())); boolToString(someSortOfTriggerError()));
} }
} }