all triggers should be documented way nicer #2001
This commit is contained in:
parent
e226024a5c
commit
f1aa696db4
|
@ -10,12 +10,14 @@ import org.jetbrains.annotations.NotNull;
|
|||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.io.*;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* This utility produces images of trigger signals supported by rusEFI
|
||||
|
@ -47,6 +49,8 @@ public class TriggerImage {
|
|||
return "Miata NB";
|
||||
case Fields.TT_TT_SUBARU_SVX:
|
||||
return "Subaru SVX";
|
||||
case Fields.TT_TT_HONDA_1_24:
|
||||
return "Honda 1+24";
|
||||
case Fields.TT_TT_SUBARU_7_6:
|
||||
return "Subaru 7/6";
|
||||
case Fields.TT_TT_GM_LS_24:
|
||||
|
@ -63,6 +67,12 @@ public class TriggerImage {
|
|||
return "44/2/2";
|
||||
case Fields.TT_TT_RENIX_66_2_2_2:
|
||||
return "66/2/2/2";
|
||||
case Fields.TT_TT_TOOTHED_WHEEL_36_1:
|
||||
return "36/1";
|
||||
case Fields.TT_TT_TOOTHED_WHEEL_36_2:
|
||||
return "36/2";
|
||||
case Fields.TT_TT_TOOTHED_WHEEL_60_2:
|
||||
return "60/2";
|
||||
}
|
||||
return triggerName.triggerName;
|
||||
}
|
||||
|
@ -102,7 +112,7 @@ public class TriggerImage {
|
|||
}
|
||||
}
|
||||
});
|
||||
// System.exit(-1);
|
||||
System.exit(-1);
|
||||
}
|
||||
|
||||
private static void generateImages(String workingFolder, TriggerPanel trigger, JPanel topPanel, JPanel content) throws IOException {
|
||||
|
@ -187,6 +197,7 @@ public class TriggerImage {
|
|||
|
||||
UiUtils.trueLayout(triggerPanel);
|
||||
UiUtils.trueRepaint(triggerPanel);
|
||||
content.paintImmediately(content.getVisibleRect());
|
||||
new File(OUTPUT_FOLDER).mkdir();
|
||||
UiUtils.saveImage(OUTPUT_FOLDER + File.separator + "trigger_" + triggerWheelInfo.id + ".png", content);
|
||||
}
|
||||
|
@ -206,7 +217,7 @@ public class TriggerImage {
|
|||
|
||||
double nextAngle = i == wheel.size() - 1 ? 360 + wheel.get(0).angle : wheel.get(i + 1).angle;
|
||||
int arcDuration = (int) (nextAngle - current.angle);
|
||||
if (current.state == 0) {
|
||||
if (current.state == 1) {
|
||||
g.drawArc(WHEEL_BORDER, WHEEL_BORDER, WHEEL_DIAMETER, WHEEL_DIAMETER, (int) current.angle, arcDuration);
|
||||
} else {
|
||||
int corner = WHEEL_BORDER + (WHEEL_DIAMETER - SMALL_DIAMETER) / 2;
|
||||
|
|
|
@ -82,6 +82,9 @@ class TriggerWheelInfo {
|
|||
|
||||
private boolean isFirstCrankBased() {
|
||||
return id == Fields.TT_TT_GM_LS_24 ||
|
||||
id == Fields.TT_TT_HONDA_K_12_1 ||
|
||||
id == Fields.TT_TT_RENIX_44_2_2 ||
|
||||
id == Fields.TT_TT_RENIX_66_2_2_2 ||
|
||||
id == Fields.TT_TT_GM_7X;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue