diff --git a/src/org/usfirst/frc2022/Scouter.java b/src/org/usfirst/frc2022/Scouter.java index 3179d01..e09a5bf 100644 --- a/src/org/usfirst/frc2022/Scouter.java +++ b/src/org/usfirst/frc2022/Scouter.java @@ -9,7 +9,7 @@ public class Scouter { public static AboutGUI aboutScouter; - public static void save(String path, String i, String j, int pu, boolean k, int m, int aa, int a3, int a2, int a1, int ap, int ta, int t3, int t2, int t1,int p, int f, int tf, int c, String ss, String n) { + public static void save(String path, String i, String j, int pu, boolean k, int m, int aa, int a3, int a2, int a1, int ap, int ta, int t3, int t2, int t1,int p, int f, int tf, int c, String ss, String sp, String n) { String BlueOrRed; if (k){ @@ -46,7 +46,7 @@ public static void save(String path, String i, String j, int pu, boolean k, int e.printStackTrace(); } - String[] info = (i + "#" + j + "#" + BlueOrRed + "#" + ss + "#" + PickupType + "#" + String[] info = (i + "#" + j + "#" + BlueOrRed + "#" + sp + "#" + ss + "#" + PickupType + "#" + DefenseLevel + "#" + aa + "#" + a3 + "#" + a2 + "#" + a1 + "#" + ap + "#" + ta + "#" + t3 + "#" + t2 + "#" + t1 + "#" + p + "#" + c + "#" + f + "#" + tf + "#" + sum + "#" + n).split("#"); diff --git a/src/org/usfirst/frc2022/ScoutingGUI.java b/src/org/usfirst/frc2022/ScoutingGUI.java index f9cb105..44979ce 100644 --- a/src/org/usfirst/frc2022/ScoutingGUI.java +++ b/src/org/usfirst/frc2022/ScoutingGUI.java @@ -79,6 +79,8 @@ private int integer(String str){ JToggleButton blue = new JToggleButton("Blue"); JToggleButton red = new JToggleButton("Red"); + JLabel startingPos = new JLabel("Starting Position:"); + JTextField sPos = new JTextField(15); JLabel sweetSpot = new JLabel("Sweet Spot Location:"); JTextField sSpot = new JTextField(15); JLabel notesLabel = new JLabel("Other notes:"); @@ -134,7 +136,7 @@ public ScoutingGUI()throws ClassNotFoundException, InstantiationException, Illeg //Create the window setTitle("Scouter 2013"); setVisible(true); - setSize(530, 695); + setSize(530, 710); setResizable(false); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); @@ -172,6 +174,8 @@ public void actionPerformed(ActionEvent e) { this.jp.add(red, "wrap"); colorGroup.add(blue); colorGroup.add(red); + this.jp.add(startingPos,"split 2"); + this.jp.add(sPos, "wrap"); this.jp.add(sweetSpot,"split 2"); this.jp.add(sSpot, "wrap"); this.jp.add(feederPickup,"split 3"); @@ -369,10 +373,10 @@ public void actionPerformed(ActionEvent e) { data[i] = integer(label[i].getText()); } - Scouter.save(path, teamNumber.getText(), matchNumber.getText(), pickup, bOrR, + Scouter.save(path, teamNumber.getText(), matchNumber.getText(), pickup, bOrR, dLevel, data[0], data[1], data[2], data[3], data[4], data[5], data[6], data[7], data[8], data[9], data[10], data[11], climbLevel, - sSpot.getText(), notes.getText()); } + sSpot.getText(), sPos.getText(), notes.getText()); } } });