Skip to content

Commit

Permalink
PinLine
Browse files Browse the repository at this point in the history
  • Loading branch information
rusefillc committed Oct 22, 2024
1 parent 53cf357 commit d6222d1
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions random/src/main/java/com/rusefi/PinLine.java
Original file line number Diff line number Diff line change
@@ -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");
}
}
}

0 comments on commit d6222d1

Please sign in to comment.