spelling is important
This commit is contained in:
parent
a2a5fda3ce
commit
b5fd6ea044
|
@ -343,8 +343,8 @@ void TriggerWaveform::setTriggerSynchronizationGap2(float syncRatioFrom, float s
|
|||
void TriggerWaveform::setTriggerSynchronizationGap3(int gapIndex, float syncRatioFrom, float syncRatioTo) {
|
||||
isSynchronizationNeeded = true;
|
||||
criticalAssertVoid(gapIndex >= 0 && gapIndex < GAP_TRACKING_LENGTH, "gapIndex out of range");
|
||||
syncronizationRatioFrom[gapIndex] = syncRatioFrom;
|
||||
syncronizationRatioTo[gapIndex] = syncRatioTo;
|
||||
synchronizationRatioFrom[gapIndex] = syncRatioFrom;
|
||||
synchronizationRatioTo[gapIndex] = syncRatioTo;
|
||||
if (gapIndex == 0) {
|
||||
// we have a special case here - only sync with one gap has this feature
|
||||
this->syncRatioAvg = (int)efiRound((syncRatioFrom + syncRatioTo) * 0.5f, 1.0f);
|
||||
|
|
|
@ -104,8 +104,8 @@ public:
|
|||
* gaps ratios to sync
|
||||
*/
|
||||
|
||||
float syncronizationRatioFrom[GAP_TRACKING_LENGTH];
|
||||
float syncronizationRatioTo[GAP_TRACKING_LENGTH];
|
||||
float synchronizationRatioFrom[GAP_TRACKING_LENGTH];
|
||||
float synchronizationRatioTo[GAP_TRACKING_LENGTH];
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -861,7 +861,7 @@ static void triggerShapeInfo() {
|
|||
TriggerWaveform *shape = &getTriggerCentral()->triggerShape;
|
||||
TriggerFormDetails *triggerFormDetails = &getTriggerCentral()->triggerFormDetails;
|
||||
efiPrintf("syncEdge=%s", getSyncEdge(TRIGGER_WAVEFORM(syncEdge)));
|
||||
efiPrintf("gap from %.2f to %.2f", TRIGGER_WAVEFORM(syncronizationRatioFrom[0]), TRIGGER_WAVEFORM(syncronizationRatioTo[0]));
|
||||
efiPrintf("gap from %.2f to %.2f", TRIGGER_WAVEFORM(synchronizationRatioFrom[0]), TRIGGER_WAVEFORM(synchronizationRatioTo[0]));
|
||||
|
||||
for (size_t i = 0; i < shape->getSize(); i++) {
|
||||
efiPrintf("event %d %.2f", i, triggerFormDetails->eventAngles[i]);
|
||||
|
@ -921,7 +921,7 @@ void triggerInfo(void) {
|
|||
boolToString(tc->directSelfStimulation));
|
||||
|
||||
if (TRIGGER_WAVEFORM(isSynchronizationNeeded)) {
|
||||
efiPrintf("gap from %.2f to %.2f", TRIGGER_WAVEFORM(syncronizationRatioFrom[0]), TRIGGER_WAVEFORM(syncronizationRatioTo[0]));
|
||||
efiPrintf("gap from %.2f to %.2f", TRIGGER_WAVEFORM(synchronizationRatioFrom[0]), TRIGGER_WAVEFORM(synchronizationRatioTo[0]));
|
||||
}
|
||||
|
||||
#endif /* EFI_PROD_CODE || EFI_SIMULATOR */
|
||||
|
@ -1089,8 +1089,8 @@ void TriggerCentral::updateWaveform() {
|
|||
|
||||
// fill the remainder with the default gaps
|
||||
for (; gapIndex < GAP_TRACKING_LENGTH; gapIndex++) {
|
||||
triggerShape.syncronizationRatioFrom[gapIndex] = NAN;
|
||||
triggerShape.syncronizationRatioTo[gapIndex] = NAN;
|
||||
triggerShape.synchronizationRatioFrom[gapIndex] = NAN;
|
||||
triggerShape.synchronizationRatioTo[gapIndex] = NAN;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -475,7 +475,7 @@ expected<TriggerDecodeResult> TriggerDecoderBase::decodeTriggerEvent(
|
|||
const char * prefix = verbose ? "[vrb]" : "[err]";
|
||||
|
||||
for (int i = 0;i<triggerShape.gapTrackingLength;i++) {
|
||||
float ratioFrom = triggerShape.syncronizationRatioFrom[i];
|
||||
float ratioFrom = triggerShape.synchronizationRatioFrom[i];
|
||||
if (cisnan(ratioFrom)) {
|
||||
// we do not track gap at this depth
|
||||
continue;
|
||||
|
@ -488,7 +488,7 @@ expected<TriggerDecodeResult> TriggerDecoderBase::decodeTriggerEvent(
|
|||
prefix
|
||||
);
|
||||
} else {
|
||||
float ratioTo = triggerShape.syncronizationRatioTo[i];
|
||||
float ratioTo = triggerShape.synchronizationRatioTo[i];
|
||||
|
||||
bool gapOk = isInRange(ratioFrom, gap, ratioTo);
|
||||
|
||||
|
@ -516,8 +516,8 @@ expected<TriggerDecodeResult> TriggerDecoderBase::decodeTriggerEvent(
|
|||
triggerConfiguration.PrintPrefix,
|
||||
i,
|
||||
gap,
|
||||
triggerShape.syncronizationRatioFrom[i],
|
||||
triggerShape.syncronizationRatioTo[i],
|
||||
triggerShape.synchronizationRatioFrom[i],
|
||||
triggerShape.synchronizationRatioTo[i],
|
||||
boolToString(someSortOfTriggerError()));
|
||||
}
|
||||
}
|
||||
|
@ -647,8 +647,8 @@ bool TriggerDecoderBase::isSyncPoint(const TriggerWaveform& triggerShape, trigge
|
|||
if (triggerType == trigger_type_e::TT_MIATA_VVT) {
|
||||
auto secondGap = (float)toothDurations[1] / toothDurations[2];
|
||||
|
||||
bool currentGapOk = isInRange(triggerShape.syncronizationRatioFrom[0], (float)triggerSyncGapRatio, triggerShape.syncronizationRatioTo[0]);
|
||||
bool secondGapOk = isInRange(triggerShape.syncronizationRatioFrom[1], secondGap, triggerShape.syncronizationRatioTo[1]);
|
||||
bool currentGapOk = isInRange(triggerShape.synchronizationRatioFrom[0], (float)triggerSyncGapRatio, triggerShape.synchronizationRatioTo[0]);
|
||||
bool secondGapOk = isInRange(triggerShape.synchronizationRatioFrom[1], secondGap, triggerShape.synchronizationRatioTo[1]);
|
||||
|
||||
// One or both teeth was impossible range, this is not the sync point
|
||||
if (!currentGapOk || !secondGapOk) {
|
||||
|
@ -661,8 +661,8 @@ bool TriggerDecoderBase::isSyncPoint(const TriggerWaveform& triggerShape, trigge
|
|||
}
|
||||
|
||||
for (int i = 0; i < triggerShape.gapTrackingLength; i++) {
|
||||
auto from = triggerShape.syncronizationRatioFrom[i];
|
||||
auto to = triggerShape.syncronizationRatioTo[i];
|
||||
auto from = triggerShape.synchronizationRatioFrom[i];
|
||||
auto to = triggerShape.synchronizationRatioTo[i];
|
||||
|
||||
if (cisnan(from)) {
|
||||
// don't check this gap, skip it
|
||||
|
|
|
@ -98,8 +98,8 @@ extern TriggerDecoderBase initState;
|
|||
fprintf(fp, "%s=%s\n", TRIGGER_SYNC_EDGE, getSyncEdge(shape->syncEdge));
|
||||
fprintf(fp, "%s=%d\n", TRIGGER_WITH_SYNC, shape->isSynchronizationNeeded);
|
||||
for (int i = 0; i < shape->gapTrackingLength; i++) {
|
||||
fprintf(fp, "%s.%d=%f\n", TRIGGER_GAP_FROM, i, shape->syncronizationRatioFrom[i]);
|
||||
fprintf(fp, "%s.%d=%f\n", TRIGGER_GAP_TO, i, shape->syncronizationRatioTo[i]);
|
||||
fprintf(fp, "%s.%d=%f\n", TRIGGER_GAP_FROM, i, shape->synchronizationRatioFrom[i]);
|
||||
fprintf(fp, "%s.%d=%f\n", TRIGGER_GAP_TO, i, shape->synchronizationRatioTo[i]);
|
||||
}
|
||||
fprintf(fp, "# end of meta section\n");
|
||||
|
||||
|
|
Loading…
Reference in New Issue