-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Arm as interface * Fix type error relating to arm interface
- Loading branch information
1 parent
250fb5e
commit a4d5f81
Showing
9 changed files
with
245 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
package frc.robot.commands; | ||
|
||
import edu.wpi.first.wpilibj2.command.Command; | ||
import frc.robot.subsystems.Arm; | ||
import frc.robot.subsystems.arm.ArmInterface; | ||
|
||
public class ArmRotateTo extends Command{ | ||
public class ArmRotateTo extends Command { | ||
|
||
private final double setpoint; | ||
private final Arm arm; | ||
private final double setpoint; | ||
private final ArmInterface arm; | ||
|
||
public ArmRotateTo(Arm arm, double degree){ | ||
this.setpoint = degree; | ||
this.arm = arm; | ||
public ArmRotateTo(ArmInterface arm, double degree) { | ||
this.setpoint = degree; | ||
this.arm = arm; | ||
|
||
addRequirements(arm); | ||
addRequirements(arm); | ||
|
||
} | ||
} | ||
|
||
@Override | ||
public void initialize() { | ||
arm.setSetpoint(setpoint); | ||
} | ||
@Override | ||
public void initialize() { | ||
arm.setSetpoint(setpoint); | ||
} | ||
|
||
@Override | ||
public boolean isFinished() { | ||
return arm.isAtDesiredPosition(); | ||
} | ||
@Override | ||
public boolean isFinished() { | ||
return arm.isAtDesiredPosition(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.