mirror of https://github.com/FOME-Tech/fome-fw.git
Mitsubishi 4G93 Trigger issues #4918
This commit is contained in:
parent
0337cb44ac
commit
ae31e06e75
|
@ -363,14 +363,13 @@ public class TriggerImage {
|
||||||
}
|
}
|
||||||
g.drawString(" " + tdcMessage, 0, tdcFontSize);
|
g.drawString(" " + tdcMessage, 0, tdcFontSize);
|
||||||
g.setColor(Color.darkGray);
|
g.setColor(Color.darkGray);
|
||||||
|
if (image == null)
|
||||||
|
return;
|
||||||
for (int i = 0; i < gaps.gapFrom.length; i++) {
|
for (int i = 0; i < gaps.gapFrom.length; i++) {
|
||||||
String message = "Sync " + (i + 1) + ": From " + gaps.gapFrom[i] + " to " + gaps.gapTo[i];
|
String message = "Sync " + (i + 1) + ": From " + gaps.gapFrom[i] + " to " + gaps.gapTo[i];
|
||||||
g.drawString(" " + message, 0, tdcFontSize * (2 + i));
|
g.drawString(" " + message, 0, tdcFontSize * (2 + i));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (image == null)
|
|
||||||
return;
|
|
||||||
int tdcX = image.engineReport.getTimeAxisTranslator().timeToScreen(MIN_TIME + tdcPosition, w);
|
int tdcX = image.engineReport.getTimeAxisTranslator().timeToScreen(MIN_TIME + tdcPosition, w);
|
||||||
g.drawLine(tdcX, 0, tdcX, h);
|
g.drawLine(tdcX, 0, tdcX, h);
|
||||||
Graphics2D g2 = (Graphics2D) g;
|
Graphics2D g2 = (Graphics2D) g;
|
||||||
|
|
|
@ -22,13 +22,15 @@ public class TriggerWheelInfo {
|
||||||
private final boolean isCrankBased;
|
private final boolean isCrankBased;
|
||||||
private final boolean hasSecondChannel;
|
private final boolean hasSecondChannel;
|
||||||
private final boolean hardcodedOperationMode;
|
private final boolean hardcodedOperationMode;
|
||||||
|
private final boolean isSynchronizationNeeded;
|
||||||
private final TriggerGaps gaps;
|
private final TriggerGaps gaps;
|
||||||
|
|
||||||
public TriggerWheelInfo(int id, double tdcPosition, String triggerName, List<TriggerSignal> signals,
|
public TriggerWheelInfo(int id, double tdcPosition, String triggerName, List<TriggerSignal> signals,
|
||||||
boolean isCrankBased,
|
boolean isCrankBased,
|
||||||
boolean isSecondWheelCam,
|
boolean isSecondWheelCam,
|
||||||
boolean hasSecondChannel,
|
boolean hasSecondChannel,
|
||||||
boolean hardcodedOperationMode, TriggerGaps gaps) {
|
boolean hardcodedOperationMode,
|
||||||
|
boolean isSynchronizationNeeded, TriggerGaps gaps) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.isSecondWheelCam = isSecondWheelCam;
|
this.isSecondWheelCam = isSecondWheelCam;
|
||||||
this.tdcPosition = tdcPosition;
|
this.tdcPosition = tdcPosition;
|
||||||
|
@ -37,6 +39,7 @@ public class TriggerWheelInfo {
|
||||||
this.isCrankBased = isCrankBased;
|
this.isCrankBased = isCrankBased;
|
||||||
this.hasSecondChannel = hasSecondChannel;
|
this.hasSecondChannel = hasSecondChannel;
|
||||||
this.hardcodedOperationMode = hardcodedOperationMode;
|
this.hardcodedOperationMode = hardcodedOperationMode;
|
||||||
|
this.isSynchronizationNeeded = isSynchronizationNeeded;
|
||||||
this.gaps = gaps;
|
this.gaps = gaps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +60,7 @@ public class TriggerWheelInfo {
|
||||||
boolean isSecondWheelCam = false;
|
boolean isSecondWheelCam = false;
|
||||||
boolean hasSecondChannel = false;
|
boolean hasSecondChannel = false;
|
||||||
boolean hardcodedOperationMode = false;
|
boolean hardcodedOperationMode = false;
|
||||||
int cycleDuration = -1;
|
boolean isSynchronizationNeeded = false;
|
||||||
TriggerWheelInfo.TriggerGaps gaps = null;
|
TriggerWheelInfo.TriggerGaps gaps = null;
|
||||||
while (true) {
|
while (true) {
|
||||||
line = reader.readLine();
|
line = reader.readLine();
|
||||||
|
@ -87,7 +90,7 @@ public class TriggerWheelInfo {
|
||||||
isCrankBased = Boolean.parseBoolean(value);
|
isCrankBased = Boolean.parseBoolean(value);
|
||||||
break;
|
break;
|
||||||
case TRIGGER_CYCLE_DURATION:
|
case TRIGGER_CYCLE_DURATION:
|
||||||
cycleDuration = (int)Double.parseDouble(value);
|
//cycleDuration = (int)Double.parseDouble(value);
|
||||||
break;
|
break;
|
||||||
case TRIGGER_IS_SECOND_WHEEL_CAM:
|
case TRIGGER_IS_SECOND_WHEEL_CAM:
|
||||||
isSecondWheelCam = Boolean.parseBoolean(value);
|
isSecondWheelCam = Boolean.parseBoolean(value);
|
||||||
|
@ -98,6 +101,9 @@ public class TriggerWheelInfo {
|
||||||
case TRIGGER_HARDCODED_OPERATION_MODE:
|
case TRIGGER_HARDCODED_OPERATION_MODE:
|
||||||
hardcodedOperationMode = Boolean.parseBoolean(value);
|
hardcodedOperationMode = Boolean.parseBoolean(value);
|
||||||
break;
|
break;
|
||||||
|
case "isSynchronizationNeeded":
|
||||||
|
isSynchronizationNeeded = Integer.parseInt(value) > 0;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
throw new IllegalStateException("Unexpected key/value: " + line);
|
throw new IllegalStateException("Unexpected key/value: " + line);
|
||||||
}
|
}
|
||||||
|
@ -111,6 +117,7 @@ public class TriggerWheelInfo {
|
||||||
isSecondWheelCam,
|
isSecondWheelCam,
|
||||||
hasSecondChannel,
|
hasSecondChannel,
|
||||||
hardcodedOperationMode,
|
hardcodedOperationMode,
|
||||||
|
isSynchronizationNeeded,
|
||||||
gaps
|
gaps
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue