-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathclimbSubsystemCommandOverview(inline).txt
More file actions
83 lines (78 loc) · 1.84 KB
/
climbSubsystemCommandOverview(inline).txt
File metadata and controls
83 lines (78 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
WINCH:
goToSetPosition(Angle){
setsPIDSetpoint
}
autoPullDownClaw(){
goToSetPosition(deployed)
and waits to reach it with timeout
}
autoPullUpClaw(){
goToSetPosition(home)
and waits to reach the hardstop with timeout
if timedOut, backs into hardstop with timeOut
}
rotateWinchWithStop(dutyCycle, bool_Stop){
rotates motor at dutycyle until stop bool is true
}
manualPullUpClaw(bool_stop){
rotateWinchWithStop forward with stop
}
manualPullDownClaw(bool_stop){
rotateWinchWithStop reverse with stop
}
ARM:
goToSetPosition(Angle){
setsPIDSetpoint
}
autoDeployArm(){
goToSetPosition(deployed)
and waits to reach it with timeout
}
autoRetractArm(){
goToSetPosition(home)
and waits to reach it with timeout
}
moveArmWithStop(dutyCycle, bool_Stop){
rotates motor at dutycyle until stop bool is true
}
deployArm(bool_stop){
moveArmWithStop reverse with stop
}
retractArm(bool_stop){
rotateWinchWithStop forward with stop
}
CLIMB:
getClimbCommand(){
returns which auto climb command to return based on climbState
}
autoClimb(){
basically wrapper for getClimbCommand()
}
autoClimbUp(){
autoDeployArm() then autoPullDownClaw() if arm deploy wasn't interupted
}
autoClimbDown(){
autoPullDownClaw() then autoRetractArm() if claw wasn't interrupted
}
waitForButtonRelease(bool_step){
waits for step to be released
}
waitForNextStep(bool_step){
waitForButtonRelease() then waits for button press then waitForButtonRelease()
}
semiAutoClimbUp(bool_step){
1. waitForButtonRelease() then
2. deployArm(step) then
3. waits for softLimit on arm or step
4. waitForNextStep()
5. manualPullDownClaw()
6. wait for reverse limit on winch or step
}
semiAutoClimbDown(bool_step){
1. waitForButtonRelease() then
2. manualPullUpClaw(step) then
3. waits for softLimit on winch or step
4. waitForNextStep()
5. retractArm()
6. wait for reverse limit on arm or step
}