Skip to content

Commit

Permalink
Added starting position
Browse files Browse the repository at this point in the history
  • Loading branch information
esloan committed Apr 3, 2013
1 parent 13fdcf8 commit c3d8267
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/org/usfirst/frc2022/Scouter.java
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down Expand Up @@ -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("#");
Expand Down
10 changes: 7 additions & 3 deletions src/org/usfirst/frc2022/ScoutingGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -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:");
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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()); }
}
});

Expand Down

0 comments on commit c3d8267

Please sign in to comment.