Skip to content

Commit

Permalink
Merge pull request #99 from johanlia000/master
Browse files Browse the repository at this point in the history
Changes from GP competition
  • Loading branch information
johanlia000 authored Mar 26, 2017
2 parents 3b6a8af + ae5cd2e commit 1ccca73
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/org/usfirst/frc/team4915/steamworks/OI.java
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@ public Command getAutoCommand()
// Do our regular shooting routine, then almost the exact opposite, and then drive over the baseline
result = new ParameterizedCommandGroup(drivetrain, launcher, this,
"Drive", "" + (-42 + returnForSide(m_alliance, 0, 9)),
"Turn", "-45",
"Drive Timeout", "" + (37 + returnForSide(m_alliance, 0, -3)), "2.5",
"Turn Timeout", "-45", "3",
"Drive Timeout", "" + (29 + returnForSide(m_alliance, 0, -3)), "2.5",
"Shoot",
"Curve", "-125", "0.5");
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ public ParameterizedCommandGroup(Drivetrain drivetrain, Launcher launcher, OI oi
double angle = safeParseDouble(params[i++]);
addSequential(new TurnDegreesIMUCommand(drivetrain, angle * oi.getAllianceScale()));
break;
case "Turn Timeout":
angle = safeParseDouble(params[i++]);
timeout = safeParseDouble(params[i++]);
addSequential(new TurnDegreesIMUCommand(drivetrain, angle * oi.getAllianceScale()), timeout);
break;
case "Turn Fast":
double value = safeParseDouble(params[i++]);
addSequential(new FastTurnDegreesIMUCommand(drivetrain, value * oi.getAllianceScale()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static enum LauncherState
}

//the "perfect" static speed that always makes goal
public static final double DEFAULT_LAUNCHER_SPEED = 2940;
public static final double DEFAULT_LAUNCHER_SPEED = 2880;
public static final double DEFAULT_AGITATOR_SPEED = .7;
private CANTalon m_launcherMotor;
private CANTalon m_agitatorMotor;
Expand Down Expand Up @@ -236,7 +236,7 @@ public CANTalon getAgitator()
public boolean isEmpty()
{
double currentPosition = m_agitatorMotor.getPulseWidthPosition();
if (currentPosition >= (m_initialPos + 4096 * 3)) // 3 full rotations
if (currentPosition >= (m_initialPos + 4096 * 3.5)) // 3 full rotations
{
return true;
}
Expand Down

0 comments on commit 1ccca73

Please sign in to comment.