File tree Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -95,9 +95,7 @@ private boolean updateAuto() {
95
95
/**
96
96
* @return Object for binding a command to a change in autonomous mode selection
97
97
*/
98
- public Trigger getChangedAutoSelection () {
99
- return autoSelectionChanged .castTo (Trigger ::new );
100
- }
98
+ public Trigger changedAutoSelection = autoSelectionChanged .castTo (Trigger ::new );
101
99
102
100
/** Schedules the command corresponding to the selected autonomous mode */
103
101
public void scheduleAuto () {
Original file line number Diff line number Diff line change @@ -277,7 +277,8 @@ private void configureOperatorButtonBindings() {
277
277
// spotless:on
278
278
279
279
private void configureEventBindings () {
280
- autoSelector .getChangedAutoSelection ().onTrue (leds .createChangeAutoAnimationCommand ());
280
+ autoSelector .changedAutoSelection .onTrue (leds .createChangeAutoAnimationCommand ());
281
+ lifter .impendingCoralGripperDamage .onTrue (coralWrist .createSetAngleCommand (CoralWristState .L1 ));
281
282
}
282
283
283
284
private void configureAutoOptions () {
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ public static enum LifterState {
58
58
Processor (12.0 ),
59
59
AlgaeL2 (30 ),
60
60
AlgaeL3 (46.5 ),
61
- Max (30.00 );
61
+ Max (52.0 );
62
62
63
63
public Distance height ;
64
64
Original file line number Diff line number Diff line change @@ -139,6 +139,8 @@ public Boolean inState(LifterState state) {
139
139
}
140
140
141
141
public Trigger atIntakingHeight = new Trigger (() -> inState (LifterState .Intake ));
142
+ public Trigger impendingCoralGripperDamage =
143
+ new Trigger (() -> getHeight ().gt (LifterState .L3 .height .plus (Inches .of (2.0 ))));
142
144
143
145
private void resetEncoder () {
144
146
encoder .setPosition (LifterState .Reset .height .in (Inches ));
You can’t perform that action at this time.
0 commit comments