Skip to content

Commit bd63eb7

Browse files
committed
rename
1 parent 5028362 commit bd63eb7

4 files changed

Lines changed: 30 additions & 30 deletions

File tree

src/org/usfirst/frc/team6414/robot/Robot.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
import edu.wpi.first.wpilibj.livewindow.LiveWindow;
99
import edu.wpi.first.wpilibj.smartdashboard.SendableChooser;
1010
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
11-
import org.usfirst.frc.team6414.robot.commands.Autonomous;
12-
import org.usfirst.frc.team6414.robot.commands.Autonomous2;
11+
import org.usfirst.frc.team6414.robot.commands.BaseLine;
12+
import org.usfirst.frc.team6414.robot.commands.HangGear;
1313
import org.usfirst.frc.team6414.robot.subsystems.*;
1414

1515
/**
@@ -43,8 +43,8 @@ public static double limit(double min, double max, double input) {
4343
*/
4444
@Override
4545
public void robotInit() {
46-
chooser.addDefault("gear", new Autonomous());
47-
chooser.addObject("baseline", new Autonomous2());
46+
chooser.addDefault("gear", new HangGear());
47+
chooser.addObject("baseline", new BaseLine());
4848
SmartDashboard.putData("Auto", chooser);
4949

5050
oi = new OI();
@@ -111,7 +111,7 @@ public void autonomousInit() {
111111
*/
112112

113113
// schedule the autonomous command (example)
114-
// autonomousCommand = new Autonomous2();
114+
// autonomousCommand = new BaseLine();
115115
autonomousCommand.start();
116116
}
117117

src/org/usfirst/frc/team6414/robot/commands/Autonomous2.java renamed to src/org/usfirst/frc/team6414/robot/commands/BaseLine.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
* @author willson
1212
* published under GNU Protocol
1313
*/
14-
public class Autonomous2 extends Command {
14+
public class BaseLine extends Command {
1515

16-
public Autonomous2() {
16+
public BaseLine() {
1717
requires(Robot.chassis);
1818
}
1919

@@ -26,28 +26,28 @@ protected void initialize() {
2626
this.setTimeout(RobotMap.AUTO_TIMEOUT2);
2727
}
2828

29-
/**
29+
/*
3030
* constructor
3131
* speed: max=1, min=0, f'(x)=-2sqrt(a)/(2sqrt(-x+a))
3232
* f(x)=sqrt(-x+a)/sqrt(a) => sqrt(-x/a+1)
3333
*
3434
* @param distant distant form robot to the wall of control station (average)
3535
* @return the speed it should go at a certain distance. Closer, slower.
3636
*/
37-
private double speed(double distant) {
38-
return Math.sqrt(-distant / RobotMap.START_DISTANT + 1);
39-
}
37+
// private double speed(double distant) {
38+
// return Math.sqrt(-distant / RobotMap.START_DISTANT + 1);
39+
// }
4040

41-
/**
41+
/*
4242
* get turning speed
4343
*
4444
* @return From 0.5 to -0.5. Reach Max / Min when perform a 45 degree angle to the wall
4545
*/
46-
private double getRotate() {
47-
return Robot.limit(-1, 1,
48-
(Robot.uSensor.getRightDistant() - Robot.uSensor.getLeftDistant())
49-
/ 2 * Math.sqrt(2) * RobotMap.SENSOR_DIST);
50-
}
46+
// private double getRotate() {
47+
// return Robot.limit(-1, 1,
48+
// (Robot.uSensor.getRightDistant() - Robot.uSensor.getLeftDistant())
49+
// / 2 * Math.sqrt(2) * RobotMap.SENSOR_DIST);
50+
// }
5151

5252
/**
5353
* The execute method is called repeatedly when this Command is

src/org/usfirst/frc/team6414/robot/commands/Autonomous.java renamed to src/org/usfirst/frc/team6414/robot/commands/HangGear.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
* @author willson
1212
* published under GNU Protocol
1313
*/
14-
public class Autonomous extends Command {
14+
public class HangGear extends Command {
1515

16-
public Autonomous() {
16+
public HangGear() {
1717
requires(Robot.chassis);
1818
}
1919

@@ -26,28 +26,28 @@ protected void initialize() {
2626
this.setTimeout(RobotMap.AUTO_TIMEOUT);
2727
}
2828

29-
/**
29+
/*
3030
* constructor
3131
* speed: max=1, min=0, f'(x)=-2sqrt(a)/(2sqrt(-x+a))
3232
* f(x)=sqrt(-x+a)/sqrt(a) => sqrt(-x/a+1)
3333
*
3434
* @param distant distant form robot to the wall of control station (average)
3535
* @return the speed it should go at a certain distance. Closer, slower.
3636
*/
37-
private double speed(double distant) {
38-
return Math.sqrt(-distant / RobotMap.START_DISTANT + 1);
39-
}
37+
// private double speed(double distant) {
38+
// return Math.sqrt(-distant / RobotMap.START_DISTANT + 1);
39+
// }
4040

41-
/**
41+
/*
4242
* get turning speed
4343
*
4444
* @return From 0.5 to -0.5. Reach Max / Min when perform a 45 degree angle to the wall
4545
*/
46-
private double getRotate() {
47-
return Robot.limit(-1, 1,
48-
(Robot.uSensor.getRightDistant() - Robot.uSensor.getLeftDistant())
49-
/ 2 * Math.sqrt(2) * RobotMap.SENSOR_DIST);
50-
}
46+
// private double getRotate() {
47+
// return Robot.limit(-1, 1,
48+
// (Robot.uSensor.getRightDistant() - Robot.uSensor.getLeftDistant())
49+
// / 2 * Math.sqrt(2) * RobotMap.SENSOR_DIST);
50+
// }
5151

5252
/**
5353
* The execute method is called repeatedly when this Command is

src/org/usfirst/frc/team6414/robot/subsystems/USensor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public double getDistant() {
7575

7676
@Override
7777
protected void initDefaultCommand() {
78-
// setDefaultCommand(new Autonomous());
78+
// setDefaultCommand(new HangGear());
7979
}
8080
}
8181

0 commit comments

Comments
 (0)