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

Commit 36c90ed

Browse files
committed
trello card checklist changes
https://trello.com/c/7OOvkOJG/167-implement-pid-on-lift-encoder made absolute setpoints used getHeight for everything deleted AutoLift bc obsolete deleted another missed unecessary enable
1 parent 2c19666 commit 36c90ed

3 files changed

Lines changed: 2 additions & 136 deletions

File tree

Robot2018/src/org/usfirst/frc/team199/Robot2018/commands/AutoLift.java

Lines changed: 0 additions & 116 deletions
This file was deleted.

Robot2018/src/org/usfirst/frc/team199/Robot2018/commands/UpdateLiftPosition.java

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
public class UpdateLiftPosition extends Command {
1313

1414
private Lift lift;
15-
16-
private double currDist;
1715
private double desiredDist = 0;
1816
private LiftHeight desiredPos;
1917

@@ -33,14 +31,6 @@ protected void initialize() {
3331
System.err.println("[ERROR] Manipulator not plugged in.");
3432
manipulatorPluggedIn = false;
3533
}
36-
37-
// I put this enable in here as well as in the Lift constructor bc not sure if
38-
// this interrupted() method (and therefore end() and disable() methods) will be
39-
// called when an auto command takes overs temporarily. May be repetitive, so...
40-
/**
41-
* @TODO figure out if this needs to be here and/or in Lift constructor or not
42-
*/
43-
lift.enable();
4434
}
4535

4636
// Called repeatedly when this Command is scheduled to run
@@ -59,15 +49,7 @@ protected void execute() {
5949
desiredPos = LiftHeight.GROUND;
6050
}
6151

62-
currDist = lift.getHeight();
63-
/**
64-
* @TODO: AutoLift sets desiredDist to the delta dist (set - current), but
65-
* shouldn't you set the setpoint to your actual setpoint? not to the
66-
* current error? Uncomment line 70 if using delta. Or, use
67-
* setRelativeSetpoint(something here).
68-
*/
6952
desiredDist = lift.getDesiredDistFromPos(desiredPos);
70-
// desiredDist -= currDist;
7153
lift.setSetpoint(desiredDist);
7254
}
7355
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public void setCurrPosition(LiftHeight newPosition) {
9090
}
9191

9292
/**
93-
* Uses (insert sensor here) to detect the current lift position
93+
* Uses AMT103 Encoder to detect the current lift position
9494
*/
9595
@Override
9696
public double getHeight() {
@@ -165,7 +165,7 @@ public double getWiggleRoom() {
165165
@Override
166166
protected double returnPIDInput() {
167167
// return getHeight(); //Use this instead? What's the difference?
168-
return liftEnc.getDistance();
168+
return getHeight();
169169
}
170170

171171
/**

0 commit comments

Comments
 (0)