Skip to content

Commit 1ce4114

Browse files
Various minor changes to get rid of a few warnings, as well as see if Ken can actually check out, build, and check in code from his computer.
1 parent 2eac5f3 commit 1ce4114

File tree

6 files changed

+10
-51
lines changed

6 files changed

+10
-51
lines changed

src/main/java/org/mayheminc/robot2020/commands/MagazineSetTurntable.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
import org.mayheminc.robot2020.RobotContainer;
1111

12-
import edu.wpi.first.wpilibj.Talon;
1312
import edu.wpi.first.wpilibj2.command.CommandBase;
1413

1514
public class MagazineSetTurntable extends CommandBase {

src/main/java/org/mayheminc/robot2020/commands/ShooterFireWhenReady.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
package org.mayheminc.robot2020.commands;
99

1010
import org.mayheminc.robot2020.RobotContainer;
11-
import org.mayheminc.robot2020.subsystems.Targeting;
11+
// import org.mayheminc.robot2020.subsystems.Targeting;
1212

1313
import edu.wpi.first.wpilibj2.command.CommandBase;
1414

src/main/java/org/mayheminc/robot2020/commands/ShooterReadyAimFire.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
package org.mayheminc.robot2020.commands;
99

10-
import edu.wpi.first.wpilibj2.command.ParallelCommandGroup;
1110
import edu.wpi.first.wpilibj2.command.ParallelRaceGroup;
1211
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
1312

src/main/java/org/mayheminc/robot2020/commands/TargetingIsOnTarget.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
package org.mayheminc.robot2020.commands;
99

10-
import org.mayheminc.robot2020.RobotContainer;
11-
import org.mayheminc.robot2020.subsystems.Targeting;
10+
// import org.mayheminc.robot2020.RobotContainer;
11+
// import org.mayheminc.robot2020.subsystems.Targeting;
1212

1313
import edu.wpi.first.wpilibj2.command.CommandBase;
1414

src/main/java/org/mayheminc/robot2020/subsystems/Shooter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package org.mayheminc.robot2020.subsystems;
22

33
import org.mayheminc.robot2020.Constants;
4-
import org.mayheminc.robot2020.RobotContainer;
4+
// import org.mayheminc.robot2020.RobotContainer;
55

66
import com.ctre.phoenix.motorcontrol.*;
77
import com.ctre.phoenix.motorcontrol.ControlMode;
@@ -12,7 +12,7 @@
1212

1313
import org.mayheminc.util.History;
1414
import org.mayheminc.util.MayhemTalonSRX;
15-
import org.mayheminc.util.PidTuner;
15+
// import org.mayheminc.util.PidTuner;
1616
import org.mayheminc.util.PidTunerObject;
1717

1818
public class Shooter extends SubsystemBase implements PidTunerObject {

src/main/java/org/mayheminc/robot2020/subsystems/Targeting.java

Lines changed: 5 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
// import org.mayheminc.robot2019.Robot;
1313

14-
import edu.wpi.first.wpilibj.DriverStation;
14+
// import edu.wpi.first.wpilibj.DriverStation;
1515
import edu.wpi.first.wpilibj.Timer;
1616
import edu.wpi.first.wpilibj2.command.SubsystemBase;
1717
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
@@ -25,51 +25,12 @@ public class Targeting extends SubsystemBase {
2525
// Put methods for controlling this subsystem
2626
// here. Call these from Commands.
2727

28-
// COMPETITION ROBOT NEEDS THE ONE BELOW!
29-
// private double Y_WHEN_TARGET_AT_WALL = 0.65; // Worked fine and 0.70
30-
31-
// PRACTICE ROBOT NEEDS THE ONE BELOW!
32-
// private double m_YWhenTargetAtWall= 0.75; // Worked fine and 0.70
33-
34-
// Y when hatch panel is at wall when the arm is low
35-
private static final double Y_AT_WALL_SAFETY_MARGIN = 0.05;
36-
37-
private static final double Y_WHEN_HATCH_LOW_AT_WALL = 0.75 + Y_AT_WALL_SAFETY_MARGIN;
38-
// Y when hatch panel is at wall when the arm is high
39-
private static final double Y_WHEN_HATCH_MID_AT_WALL = 0.50 + Y_AT_WALL_SAFETY_MARGIN;
40-
// Y when hatch panel is at wall when the arm is high
41-
private static final double Y_WHEN_HATCH_HIGH_AT_WALL = 0.60 + Y_AT_WALL_SAFETY_MARGIN;
42-
4328
private static final double SPEED_EQ_M = -4.115;
4429
private static final double SPEED_EQ_B = 2.244;
4530

46-
// Below values are for centered arm
47-
// private static final double CENTER_EQ_M = -0.1925;
48-
// private static final double CENTER_EQ_B = 0.5719;
49-
50-
// Below values are for arm off 2 inches to left on the practice robot
51-
// private static final double CENTER_EQ_M_HP = -0.2964;
52-
// private static final double CENTER_EQ_B_HP = 0.5871;
53-
// private static final double CENTER_EQ_M_CARGO = -0.6102;
54-
// private static final double CENTER_EQ_B_CARGO = 0.6334;
55-
56-
// Below values are for competition robot based upon PineTree data
57-
private static final double CENTER_EQ_M_HP = -0.2762;
58-
private static final double CENTER_EQ_B_HP = 0.5563;
59-
60-
// below values are guesses for competition robot; same as on practice robot
61-
private static final double CENTER_EQ_M_CARGO = -0.6102;
62-
private static final double CENTER_EQ_B_CARGO = 0.6334;
63-
64-
// After computing a desired heading, add a "fudge" offset to correct
65-
// empirically measured error. Found to be approx -1 degree (to shift aim 1" to
66-
// the left) during NECMP Thursday AM practice field session, for competition
67-
// robot.
68-
69-
// heading correction offset had been 0.0 for PineTree
70-
// changed to -1.0 for first 6 matches of NECMP
71-
// changed to 0.0 at lunch time on Friday
72-
private static final double HEADING_CORRECTION_OFFSET = 0.0; // was -2.0 at CMP
31+
// After computing a desired azimuth, add a "fudge" offset to correct
32+
// empirically measured error. Offset should be in azimuth "ticks."
33+
private static final double AZIMUTH_CORRECTION_OFFSET = 0.0; // was -2.0 at CMP
7334

7435
private double m_desiredAzimuth;
7536
private double[] m_target_array;
@@ -176,7 +137,7 @@ public void update() {
176137
}
177138

178139
public double getDesiredAzimuth() {
179-
return m_desiredAzimuth + HEADING_CORRECTION_OFFSET;
140+
return m_desiredAzimuth + AZIMUTH_CORRECTION_OFFSET;
180141
}
181142

182143
public double getRecommendedSpeed() {

0 commit comments

Comments
 (0)