claw done

This commit is contained in:
Abhi
2023-01-24 17:04:19 -07:00
parent 6a67b76bd9
commit 86053b3162
2 changed files with 22 additions and 14 deletions
@@ -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;
}
}