-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
rusefillc
committed
Oct 22, 2024
1 parent
53cf357
commit d6222d1
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | ||
} | ||
} | ||
} |