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