Climber Changed for 2019

Edited old climber and InitiateClimber to fucntion with new climber setup. Tuning constant in Constants
This commit is contained in:
Fred18295
2019-01-19 11:18:04 -07:00
parent 3615e5c257
commit 6d00a693af
11 changed files with 10 additions and 22 deletions
@@ -69,4 +69,7 @@ public class Constants {
public static double kPathFollowingMaxVel = 120.0; // inches/sec
public static double kPathFollowingMaxAccel = 80.0; // inches/sec^2
//Climbing Constants
public static double kClimbLiftSpeed = 1.0;
}
@@ -1,21 +1,20 @@
package org.usfirst.frc4388.robot.commands;
import org.usfirst.frc4388.robot.Robot;
import org.usfirst.frc4388.robot.Constants;
import edu.wpi.first.wpilibj.command.Command;
public class InitiateClimber extends Command
{
boolean climb;
public InitiateClimber(boolean climb) {
this.climb=climb;
public InitiateClimber() {
requires(Robot.climber);
}
@Override
protected void initialize() {
Robot.climber.setClimbSpeed(climb);
Robot.climber.setClimbSpeed(kClimbLiftSpeed);
}
@Override
@@ -1,23 +1,12 @@
package org.usfirst.frc4388.robot.subsystems;
import org.usfirst.frc4388.robot.Robot;
import org.usfirst.frc4388.robot.RobotMap;
import org.usfirst.frc4388.robot.commands.*;
import edu.wpi.first.wpilibj.DoubleSolenoid;
import edu.wpi.first.wpilibj.command.Subsystem;
import edu.wpi.first.wpilibj.livewindow.LiveWindow;
import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX;
/**
*
*/
public class Climber extends Subsystem{
private WPI_TalonSRX Climber;
@@ -49,13 +38,8 @@ public class Climber extends Subsystem{
}
public void setClimbSpeed(boolean Climb) {
if (Climb==true) {
Climber.set(1.0);
}
if (Climb==false) {
Climber.set(0);
}
public void setClimbSpeed(double Climb) {
Climber.set(Climb);
}
// Put methods for controlling this subsystem
// here. Call these from Commands.