mirror of
https://github.com/Team4388/2023WayOfTheRobot.git
synced 2026-06-09 00:37:59 -06:00
claw done
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
package frc4388.robot.subsystems;
|
||||
|
||||
public class Arm {
|
||||
// Moves arm to distence [dist] then returns new ang
|
||||
public int funtion moveArm(int dist) {
|
||||
public int moveArm(int dist) {
|
||||
// Move arm code
|
||||
return newDist;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -1,17 +1,23 @@
|
||||
public class claw {
|
||||
package frc4388.robot.subsystems;
|
||||
import edu.wpi.first.wpilibj.PWM;
|
||||
|
||||
public class Claw {
|
||||
private PWM m_clawMotor;
|
||||
private boolean m_open = false;
|
||||
|
||||
// Opens claw
|
||||
public void funtion openClaw() {
|
||||
public Claw(PWM m_clawMotor) {
|
||||
this.m_clawMotor = m_clawMotor;
|
||||
setClaw(true);
|
||||
}
|
||||
|
||||
public void setClaw(boolean open) {
|
||||
// Open claw
|
||||
m_open = open;
|
||||
m_clawMotor.setRaw(open ? 0 : 2000);
|
||||
}
|
||||
|
||||
// Closes claw
|
||||
public void function closeClaw() {
|
||||
//Close claw
|
||||
}
|
||||
|
||||
// Rotate wrist
|
||||
public int function rotClaw(int rot) {
|
||||
//Rotate wrist to ROT
|
||||
return newRot;
|
||||
}
|
||||
public boolean isClawOpen() {
|
||||
return m_open;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user