RE: reasons for verbose messages
This commit is contained in:
parent
653e36e4cc
commit
637dc37e95
|
@ -562,6 +562,7 @@ expected<TriggerDecodeResult> TriggerDecoderBase::decodeTriggerEvent(
|
||||||
bool verbose = engine->isEngineSnifferEnabled && triggerConfiguration.VerboseTriggerSynchDetails;
|
bool verbose = engine->isEngineSnifferEnabled && triggerConfiguration.VerboseTriggerSynchDetails;
|
||||||
|
|
||||||
if (verbose || (someSortOfTriggerError() && !silentTriggerError)) {
|
if (verbose || (someSortOfTriggerError() && !silentTriggerError)) {
|
||||||
|
const char * prefix = verbose ? "[vrb]" : "[err]";
|
||||||
|
|
||||||
int rpm = Sensor::getOrZero(SensorType::Rpm);
|
int rpm = Sensor::getOrZero(SensorType::Rpm);
|
||||||
floatms_t engineCycleDuration = getEngineCycleDuration(rpm);
|
floatms_t engineCycleDuration = getEngineCycleDuration(rpm);
|
||||||
|
@ -575,14 +576,17 @@ expected<TriggerDecodeResult> TriggerDecoderBase::decodeTriggerEvent(
|
||||||
|
|
||||||
float gap = 1.0 * toothDurations[i] / toothDurations[i + 1];
|
float gap = 1.0 * toothDurations[i] / toothDurations[i + 1];
|
||||||
if (cisnan(gap)) {
|
if (cisnan(gap)) {
|
||||||
efiPrintf("index=%d NaN gap, you have noise issues?",
|
efiPrintf("%s index=%d NaN gap, you have noise issues?",
|
||||||
i);
|
i,
|
||||||
|
prefix
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
float ratioTo = triggerShape.syncronizationRatioTo[i];
|
float ratioTo = triggerShape.syncronizationRatioTo[i];
|
||||||
|
|
||||||
bool gapOk = isInRange(ratioFrom, gap, ratioTo);
|
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",
|
efiPrintf("%s %srpm=%d time=%d eventIndex=%d gapIndex=%d: %s gap=%.3f expected from %.3f to %.3f error=%s",
|
||||||
|
prefix,
|
||||||
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(),
|
||||||
|
|
Loading…
Reference in New Issue