From d6222d114194066dc52fe6eef60252b9f4a4cceb Mon Sep 17 00:00:00 2001 From: rusefillc Date: Tue, 22 Oct 2024 07:28:08 -0400 Subject: [PATCH] PinLine --- random/src/main/java/com/rusefi/PinLine.java | 39 ++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 random/src/main/java/com/rusefi/PinLine.java diff --git a/random/src/main/java/com/rusefi/PinLine.java b/random/src/main/java/com/rusefi/PinLine.java new file mode 100644 index 0000000..28548ff --- /dev/null +++ b/random/src/main/java/com/rusefi/PinLine.java @@ -0,0 +1,39 @@ +package com.rusefi; + +public class PinLine { + + private static final String PREFIX = "X2-"; + + private static final int INDEX_FROM = 53; + private static final int INDEX_TO = 72; + + private static final int Y_FROM = 335; + + private static final int X_FROM = 158; + private static final int X_TO = 856; + + public static void main(String[] args) { + + int count = INDEX_TO - INDEX_FROM; + float width = X_TO - X_FROM; + float perPin = width / count; + + System.out.println("# auto-generated by PinLine.java"); + System.out.println("# " + INDEX_FROM + " " + INDEX_TO); + System.out.println("# " + X_FROM + " " + X_TO); + + for (int i = INDEX_FROM; i <= INDEX_TO; i++) { + + int zeroIndex = i - INDEX_FROM; + + int x = (int) (X_FROM + zeroIndex * perPin); + + System.out.println(" - pin: " + PREFIX + i); + System.out.println(" x: " + x); + System.out.println(" y: " + Y_FROM); + + if (i % 10 == 0) + System.out.println("\n"); + } + } +}