Skip to content

Commit f85da37

Browse files
A new lift method was made to check the whether the limit is pressed.
* A new method is added to Ilift.h to check whether the limit switch is pressed or not. * This will be used as the new condition to check whether the lift has reached low enough. * The state machine was updated to reflect the new condition. * Currently, it checks whether the lift has stopped spinning. However, this is no longer valid as the lift will not stop due to the physical obstruction being rubber bands and not metal; rubber bands do not fully stop the lift.
1 parent b15df76 commit f85da37

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

2024/prototype/intake_mechanisms/docs/lift-state-machine.dot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ digraph G {
3030
MobileGoal -> MobileGoal [label="L1 released\n AND L2 released"];
3131
MobileGoal -> MobileGoalUp [label="L1 pressed", fontcolor="red", color="red"];
3232

33-
MobileGoalDown -> Default [label="Default height reached\n AND L2 released", fontcolor="lime", color="lime"];
34-
MobileGoalDown -> MobileGoalDown [label="Default height not reached\n OR L2 pressed", fontcolor="blue", color="blue"];
33+
MobileGoalDown -> Default [label="Limit switch pressed\n AND L2 released", fontcolor="lime", color="lime"];
34+
MobileGoalDown -> MobileGoalDown [label="Limit switch not pressed\n OR L2 pressed", fontcolor="blue", color="blue"];
3535

3636
MobileGoalUp -> AllianceStake [label="alliance stake height reached\n AND L1 released", fontcolor="orange", color="orange"];
3737
MobileGoalUp -> MobileGoalUp [label="alliance stake height not reached\n OR L1 pressed", fontcolor="red", color="red"];
Loading

2024/prototype/intake_mechanisms/include/Ilift.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,23 @@ class Ilift {
8181
*/
8282
virtual bool isLiftSpinning() const = 0;
8383

84+
/**
85+
* Previously, the lift stops moving when it hits a physical barrier. Rubber
86+
* bands were added to overcome the slippage (the lift moved downwards
87+
* because the lift motor could not hold its position). Thus, rubber bands
88+
* were added to fight gravity.
89+
*
90+
* However, this strains the lift motor when moving down because the
91+
* physical barrier stopping it rubber bands. The lift doesn't fully stop
92+
* (sprongy-sprongy). Our state machines worked by checking whether the lift
93+
* has stopped spinning due to obstruction.
94+
*
95+
* Since, this is no longer valid due to the rubber bands preventing the
96+
* complete stop, we will use a limit switch to determine when the lift has
97+
* reached low enough.
98+
*/
99+
virtual bool hasLiftReachedBottom() const = 0;
100+
84101
/**
85102
* Returns the default height value constants. However, each robot will
86103
* have different height values for their lift. The derived classes can

0 commit comments

Comments
 (0)