Skip to content

Commit 309d874

Browse files
committed
Fix nasty checking issue
1 parent baf5a05 commit 309d874

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/main/java/frc/robot/subsystems/lift/LiftSubsystem.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,11 +1245,8 @@ private void executeInstruction(IDF instruction) {
12451245
* @return If the conditions in the instruction are met
12461246
*/
12471247
private boolean checkInstruction(IDF instruction) {
1248-
return (instruction.wantedArmAngle != null
1249-
&& instruction.armComparison.compare(getArmAngle()))
1250-
&&
1251-
(instruction.wantedElevatorHeight != null
1252-
&& instruction.elevatorComparison.compare(getElevatorHeight()));
1248+
return (instruction.wantedArmAngle == null || instruction.armComparison.compare(getArmAngle()))
1249+
&& (instruction.wantedElevatorHeight == null || instruction.elevatorComparison.compare(getElevatorHeight()));
12531250
}
12541251

12551252
/**

0 commit comments

Comments
 (0)