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

Commit 1c898f5

Browse files
committed
More minor fixes for the distance
Original constants were incorrect because I forgot about the distance to height ratio.
1 parent 8eb8ca2 commit 1c898f5

1 file changed

Lines changed: 23 additions & 10 deletions

File tree

  • Robot2018/src/org/usfirst/frc/team199/Robot2018/commands

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

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,30 @@
1313
*
1414
*/
1515
public class AutoLift extends Command implements PIDOutput{
16+
/**
17+
* All distances are - 1 foot for initial height of intake and + 3 inches for wiggle room for dropping cubes
18+
* Also, acutal distances are divided by 3 because according to cad, the lift will have a 1:3 ratio from winch
19+
* to actual height.
20+
*/
1621

17-
// All distances are - 1 foot for initial height of intake and + 3 inches for wiggle room for dropping cubes
18-
//Distance to switch
19-
// 18.75 inches in starting position
20-
private final double SWITCH_DIST = 9.75;
21-
//Distance to scale
22-
// 5 feet starting
23-
private final double SCALE_DIST = 51;
24-
//Distance to bar
25-
// 7 feet starting; bar distance should be changed because I'm not aware how climber mech will be positioned
26-
private final double BAR_DIST = 72;
22+
/**
23+
* Distance to switch
24+
* 18.75 inches in starting position (this measurement is the fence that surrounds the switch)
25+
* 9.75 / 3 for ratio = 3.25
26+
*/
27+
private final double SWITCH_DIST = 3.25;
28+
/**
29+
* Distance to scale
30+
* 5 feet starting
31+
* 51 / 3 = 17
32+
*/
33+
private final double SCALE_DIST = 17;
34+
/**
35+
* Distance to bar
36+
* 72 / 3 = 24
37+
* 7 feet starting; bar distance should be changed because I'm not aware how climber mech will be positioned
38+
*/
39+
private final double BAR_DIST = 24;
2740
private double desiredDist = 0;
2841
private double currDist = 0;
2942
private LiftInterface lift;

0 commit comments

Comments
 (0)