Skip to content
This repository was archived by the owner on Sep 14, 2019. It is now read-only.

Commit 833cdda

Browse files
committed
added stuff to testPeriodic in order to find lift's "holding" voltage
1 parent 9dd6365 commit 833cdda

2 files changed

Lines changed: 4 additions & 39 deletions

File tree

Robot2018/src/org/usfirst/frc/team199/Robot2018/Robot.java

Lines changed: 3 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -288,43 +288,8 @@ public void testInit() {
288288
*/
289289
@Override
290290
public void testPeriodic() {
291-
// if(firstTime) {
292-
// Robot.dt.enableVelocityPIDs();
293-
// firstTime = false;
294-
//// }
295-
// dt.getLeftVPID().setConsts(getConst("VelocityLeftkI", 0), 0,
296-
// getConst("VelocityLeftkD", rmap.calcDefkD(dt.getCurrentMaxSpeed())),
297-
// /* 1 / dt.getCurrentMaxSpeed() */Robot.getConst("VelocityLeftkF",
298-
// 1 / Robot.getConst("Max Low Speed", 84)));
299-
// dt.getRightVPID().setConsts(getConst("VelocityRightkI", 0), 0,
300-
// getConst("VelocityRightkD", rmap.calcDefkD(dt.getCurrentMaxSpeed())),
301-
// /* 1 / dt.getCurrentMaxSpeed() */Robot.getConst("VelocityRightkF",
302-
// 1 / Robot.getConst("Max Low Speed", 84)));
303-
// dt.resetAllVelocityPIDConsts();
304-
305-
// dt.setVPIDs(getConst("VPID Test Set", 0.5));
306-
307-
Scheduler.getInstance().run();
308-
309-
// System.out.println("Left VPID Targ: " + dt.getLeftVPIDOutput());
310-
// System.out.println("Right VPID Targ: " + dt.getRightVPIDOutput());
311-
// System.out.println("Left VPID Error: " + dt.getLeftVPIDerror());
312-
// System.out.println("Right VPID Error: " + dt.getRightVPIDerror());
313-
// System.out.println("Left Enc Rate: " + dt.getLeftEncRate());
314-
// System.out.println("Right Enc Rate: " + dt.getRightEncRate());
315-
//
316-
// System.out.println("Left Talon Speed: " + rmap.dtLeftMaster.get());
317-
// System.out.println("Right Talon Speed: " + rmap.dtRightMaster.get());
318-
319-
// System.out.println("Left Enc Dist " + dt.getLeftDist());
320-
// System.out.println("Right Enc Dist " + dt.getRightDist());
321-
// System.out.println("Avg Enc Dist" + dt.getEncAvgDist());
322-
323-
// dt.dtLeft.set(0.1);
324-
// dt.dtRight.set(-oi.rightJoy.getY());
325-
// dt.dtLeft.set(-oi.leftJoy.getY());
326-
// dt.dtRight.set(-oi.rightJoy.getY());
327-
328-
// dt.putVelocityControllersToDashboard();
291+
// Scheduler.getInstance().run();
292+
lift.disable();
293+
lift.runMotor(SmartDashboard.getNumber("Voltage to Lift", 0));
329294
}
330295
}

Robot2018/src/org/usfirst/frc/team199/Robot2018/subsystems/Lift.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public double getLiftSpeed() {
117117
* Runs lift motors at specified speed
118118
*
119119
* @param speed
120-
* - desired speed to run at
120+
* - desired speed to run at [-1, 1]
121121
*/
122122
@Override
123123
public void runMotor(double output) {

0 commit comments

Comments
 (0)