trigger images - black dot is green line fix #2730
This commit is contained in:
parent
2a0e72e2e9
commit
f051993224
|
@ -6,7 +6,7 @@ import java.net.URL;
|
|||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
public class rusEFIVersion {
|
||||
public static final int CONSOLE_VERSION = 20210428;
|
||||
public static final int CONSOLE_VERSION = 20210523;
|
||||
public static AtomicReference<String> firmwareVersion = new AtomicReference<>("N/A");
|
||||
|
||||
public static long classBuildTimeMillis() {
|
||||
|
|
|
@ -239,7 +239,6 @@ public class TriggerImage {
|
|||
@Override
|
||||
public void paint(Graphics g) {
|
||||
super.paint(g);
|
||||
g.setColor(Color.black);
|
||||
|
||||
int middle = WHEEL_BORDER + WHEEL_DIAMETER / 2;
|
||||
if (showTdc) {
|
||||
|
@ -249,12 +248,14 @@ public class TriggerImage {
|
|||
int smallY = (int) (WHEEL_DIAMETER / 2 * Math.cos(tdcAngle));
|
||||
|
||||
int tdcMarkRadius = 8;
|
||||
g.setColor(UpDownImage.ENGINE_CYCLE_COLOR);
|
||||
g.fillOval(middle + smallX - tdcMarkRadius, middle + smallY - tdcMarkRadius,
|
||||
2 * tdcMarkRadius,
|
||||
2 * tdcMarkRadius);
|
||||
|
||||
g.drawString("TDC", middle + smallX + tdcMarkRadius * 2, middle + smallY);
|
||||
}
|
||||
g.setColor(Color.black);
|
||||
|
||||
for (int i = 0; i < wheel.size(); i++) {
|
||||
TriggerSignal current = wheel.get(i);
|
||||
|
@ -401,13 +402,23 @@ public class TriggerImage {
|
|||
if (id != null)
|
||||
g.drawString(id, 0, (int) (h * 0.9));
|
||||
|
||||
g.setColor(Color.green);
|
||||
g.setColor(UpDownImage.ENGINE_CYCLE_COLOR);
|
||||
int tdcFontSize = (int) (f.getSize() * 1.5);
|
||||
g.setFont(new Font(f.getName(), Font.BOLD, tdcFontSize));
|
||||
g.drawString("tdcPosition " + formatTdcPosition(), 0, tdcFontSize);
|
||||
String tdcMessage;
|
||||
if (tdcPosition != 0) {
|
||||
tdcMessage = "TDC " + formatTdcPosition() + " degree from synchronization point";
|
||||
} else {
|
||||
tdcMessage = "TDC at synchronization point";
|
||||
}
|
||||
g.drawString(" " + tdcMessage, 0, tdcFontSize);
|
||||
|
||||
int tdcX = (int) (w / 720.0 * tdcPosition);
|
||||
g.drawLine(tdcX, 0, tdcX, h);
|
||||
Graphics2D g2 = (Graphics2D) g;
|
||||
g2.rotate(Math.PI / 2);
|
||||
g2.drawString("TDC", 60, -tdcX - 3);
|
||||
g2.rotate(-Math.PI / 2);
|
||||
}
|
||||
|
||||
private String formatTdcPosition() {
|
||||
|
|
|
@ -33,7 +33,7 @@ public class UpDownImage extends JPanel {
|
|||
private static final SimpleDateFormat FORMAT = new SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ss");
|
||||
private static final int LINE_SIZE = 20;
|
||||
public static final Color TIME_SCALE_COLOR = Color.red;
|
||||
public static final Color ENGINE_CYCLE_COLOR = Color.green;
|
||||
public static final Color ENGINE_CYCLE_COLOR = new Color(0, 153, 0);
|
||||
private static final BasicStroke TIME_SCALE_STROKE = new BasicStroke(1, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 10.0f,
|
||||
new float[]{7.0f, 21.0f}, 0.0f);
|
||||
private static final BasicStroke ENGINE_CYCLE_STROKE = new BasicStroke(1, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 10.0f,
|
||||
|
|
Loading…
Reference in New Issue