From 6d00a693af3919e35a45d67ffaa7e6f49743fd66 Mon Sep 17 00:00:00 2001 From: Fred18295 Date: Sat, 19 Jan 2019 11:18:04 -0700 Subject: [PATCH] Climber Changed for 2019 Edited old climber and InitiateClimber to fucntion with new climber setup. Tuning constant in Constants --- .gradle/5.0/fileChanges/last-build.bin | Bin 0 -> 1 bytes .gradle/5.0/fileHashes/fileHashes.lock | Bin 0 -> 17 bytes .gradle/5.0/gc.properties | 0 .gradle/5.0/taskHistory/taskHistory.bin | Bin 0 -> 18733 bytes .gradle/5.0/taskHistory/taskHistory.lock | Bin 0 -> 17 bytes .../buildOutputCleanup.lock | Bin 0 -> 17 bytes .gradle/buildOutputCleanup/cache.properties | 2 ++ .gradle/vcs-1/gc.properties | 0 .../org/usfirst/frc4388/robot/Constants.java | 3 +++ .../robot/commands/InitiateClimber.java | 7 +++--- .../frc4388/robot/subsystems/Climber.java | 20 ++---------------- 11 files changed, 10 insertions(+), 22 deletions(-) create mode 100644 .gradle/5.0/fileChanges/last-build.bin create mode 100644 .gradle/5.0/fileHashes/fileHashes.lock create mode 100644 .gradle/5.0/gc.properties create mode 100644 .gradle/5.0/taskHistory/taskHistory.bin create mode 100644 .gradle/5.0/taskHistory/taskHistory.lock create mode 100644 .gradle/buildOutputCleanup/buildOutputCleanup.lock create mode 100644 .gradle/buildOutputCleanup/cache.properties create mode 100644 .gradle/vcs-1/gc.properties diff --git a/.gradle/5.0/fileChanges/last-build.bin b/.gradle/5.0/fileChanges/last-build.bin new file mode 100644 index 0000000000000000000000000000000000000000..f76dd238ade08917e6712764a16a22005a50573d GIT binary patch literal 1 IcmZPo000310RR91 literal 0 HcmV?d00001 diff --git a/.gradle/5.0/fileHashes/fileHashes.lock b/.gradle/5.0/fileHashes/fileHashes.lock new file mode 100644 index 0000000000000000000000000000000000000000..fba6852b7ba7051fc4103273b36c9717d088bcc8 GIT binary patch literal 17 TcmZR+)F$t7V4?MO1}FdkG++ca literal 0 HcmV?d00001 diff --git a/.gradle/5.0/gc.properties b/.gradle/5.0/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/.gradle/5.0/taskHistory/taskHistory.bin b/.gradle/5.0/taskHistory/taskHistory.bin new file mode 100644 index 0000000000000000000000000000000000000000..ce38f7022d6bd1636251e214fcd51e37a91bb996 GIT binary patch literal 18733 zcmeI%u}T9m7{Kv67eNZvLFg+8dP+NVRjDAlh*%eglHSELwqA}T-ia^b;NlB7)faHk zmvD6H=IW-Y*U~2tME)Nn`A95I_I{1Q0*~0R#|0009ILKmY**5I_I{1Q0*~0R#|0009ILKmY**5I_I{1Q0*~ z0R#|00D-?C(DFsR`|&mz;l1oD)juzr<*m4B>A^+2?aExmMX9F6Zu|8$)FzEmBa)$v zM6Mzy?7&8e5^1KbQ?ZS9uhlTw%L-+5b|o`+EOTw#iNDwD$XFZUWKwVT4xTnwikG9> Q;^XMS9)`d6@=x*OZ`|#1`Tzg` literal 0 HcmV?d00001 diff --git a/.gradle/5.0/taskHistory/taskHistory.lock b/.gradle/5.0/taskHistory/taskHistory.lock new file mode 100644 index 0000000000000000000000000000000000000000..2afb763259af3a832bac965708a438a61f5ef99a GIT binary patch literal 17 UcmZR!l<+%0d;P8+1_)pV051Oo1poj5 literal 0 HcmV?d00001 diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock new file mode 100644 index 0000000000000000000000000000000000000000..d794a3b9526864402d846c13de7f781a6df27809 GIT binary patch literal 17 UcmZSH=Crqe_ny~_7$ATV06^3QO#lD@ literal 0 HcmV?d00001 diff --git a/.gradle/buildOutputCleanup/cache.properties b/.gradle/buildOutputCleanup/cache.properties new file mode 100644 index 0000000..061a365 --- /dev/null +++ b/.gradle/buildOutputCleanup/cache.properties @@ -0,0 +1,2 @@ +#Sat Jan 19 11:10:27 MST 2019 +gradle.version=5.0 diff --git a/.gradle/vcs-1/gc.properties b/.gradle/vcs-1/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/2019robot/src/main/java/org/usfirst/frc4388/robot/Constants.java b/2019robot/src/main/java/org/usfirst/frc4388/robot/Constants.java index 96a6f89..986f17b 100644 --- a/2019robot/src/main/java/org/usfirst/frc4388/robot/Constants.java +++ b/2019robot/src/main/java/org/usfirst/frc4388/robot/Constants.java @@ -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; + } diff --git a/2019robot/src/main/java/org/usfirst/frc4388/robot/commands/InitiateClimber.java b/2019robot/src/main/java/org/usfirst/frc4388/robot/commands/InitiateClimber.java index 8a6e37d..3be9068 100644 --- a/2019robot/src/main/java/org/usfirst/frc4388/robot/commands/InitiateClimber.java +++ b/2019robot/src/main/java/org/usfirst/frc4388/robot/commands/InitiateClimber.java @@ -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 diff --git a/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/Climber.java b/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/Climber.java index 3cacf76..e8046eb 100644 --- a/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/Climber.java +++ b/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/Climber.java @@ -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.