mirror of
https://github.com/Team4388/2019-Hit-or-Miss.git
synced 2026-06-09 00:28:05 -06:00
Climber Changed for 2019
Edited old climber and InitiateClimber to fucntion with new climber setup. Tuning constant in Constants
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
|||||||
|
#Sat Jan 19 11:10:27 MST 2019
|
||||||
|
gradle.version=5.0
|
||||||
@@ -69,4 +69,7 @@ public class Constants {
|
|||||||
public static double kPathFollowingMaxVel = 120.0; // inches/sec
|
public static double kPathFollowingMaxVel = 120.0; // inches/sec
|
||||||
public static double kPathFollowingMaxAccel = 80.0; // inches/sec^2
|
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;
|
package org.usfirst.frc4388.robot.commands;
|
||||||
|
|
||||||
import org.usfirst.frc4388.robot.Robot;
|
import org.usfirst.frc4388.robot.Robot;
|
||||||
|
import org.usfirst.frc4388.robot.Constants;
|
||||||
|
|
||||||
import edu.wpi.first.wpilibj.command.Command;
|
import edu.wpi.first.wpilibj.command.Command;
|
||||||
|
|
||||||
public class InitiateClimber extends Command
|
public class InitiateClimber extends Command
|
||||||
{
|
{
|
||||||
boolean climb;
|
|
||||||
|
|
||||||
public InitiateClimber(boolean climb) {
|
public InitiateClimber() {
|
||||||
this.climb=climb;
|
|
||||||
requires(Robot.climber);
|
requires(Robot.climber);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initialize() {
|
protected void initialize() {
|
||||||
Robot.climber.setClimbSpeed(climb);
|
Robot.climber.setClimbSpeed(kClimbLiftSpeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,23 +1,12 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
package org.usfirst.frc4388.robot.subsystems;
|
package org.usfirst.frc4388.robot.subsystems;
|
||||||
|
|
||||||
import org.usfirst.frc4388.robot.Robot;
|
import org.usfirst.frc4388.robot.Robot;
|
||||||
import org.usfirst.frc4388.robot.RobotMap;
|
import org.usfirst.frc4388.robot.RobotMap;
|
||||||
import org.usfirst.frc4388.robot.commands.*;
|
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;
|
import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class Climber extends Subsystem{
|
public class Climber extends Subsystem{
|
||||||
|
|
||||||
private WPI_TalonSRX Climber;
|
private WPI_TalonSRX Climber;
|
||||||
@@ -49,13 +38,8 @@ public class Climber extends Subsystem{
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setClimbSpeed(boolean Climb) {
|
public void setClimbSpeed(double Climb) {
|
||||||
if (Climb==true) {
|
Climber.set(Climb);
|
||||||
Climber.set(1.0);
|
|
||||||
}
|
|
||||||
if (Climb==false) {
|
|
||||||
Climber.set(0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// Put methods for controlling this subsystem
|
// Put methods for controlling this subsystem
|
||||||
// here. Call these from Commands.
|
// here. Call these from Commands.
|
||||||
|
|||||||
Reference in New Issue
Block a user