rejecter
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package org.firstinspires.ftc.teamcode.subsystems;
|
||||
|
||||
|
||||
import com.acmerobotics.dashboard.telemetry.MultipleTelemetry;
|
||||
import com.qualcomm.robotcore.hardware.Servo;
|
||||
|
||||
import org.firstinspires.ftc.teamcode.utils.Robot;
|
||||
|
||||
public class Rejecter implements Subsystem{
|
||||
|
||||
private final Servo servo;
|
||||
|
||||
public double rpos = 0.5;
|
||||
|
||||
public Rejecter(Robot robot){
|
||||
this.servo = robot.rejecter;
|
||||
}
|
||||
|
||||
public void rejecterPos(double pos){
|
||||
this.rpos = pos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
this.servo.setPosition(rpos);
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@ import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
|
||||
|
||||
import org.firstinspires.ftc.teamcode.subsystems.Drivetrain;
|
||||
import org.firstinspires.ftc.teamcode.subsystems.Intake;
|
||||
import org.firstinspires.ftc.teamcode.subsystems.Rejecter;
|
||||
import org.firstinspires.ftc.teamcode.subsystems.Shooter;
|
||||
import org.firstinspires.ftc.teamcode.subsystems.Spindexer;
|
||||
import org.firstinspires.ftc.teamcode.subsystems.Transfer;
|
||||
@@ -22,6 +23,7 @@ import org.firstinspires.ftc.teamcode.utils.Robot;
|
||||
|
||||
public class TeleopV1 extends LinearOpMode {
|
||||
|
||||
public static double rpos = 0.5;
|
||||
|
||||
Robot robot;
|
||||
|
||||
@@ -29,6 +31,8 @@ public class TeleopV1 extends LinearOpMode {
|
||||
|
||||
Intake intake;
|
||||
|
||||
Rejecter rejecter;
|
||||
|
||||
Spindexer spindexer;
|
||||
|
||||
Transfer transfer;
|
||||
@@ -123,7 +127,6 @@ public class TeleopV1 extends LinearOpMode {
|
||||
|
||||
transfer = new Transfer(robot);
|
||||
|
||||
|
||||
spindexer = new Spindexer(robot, TELE);
|
||||
|
||||
shooter = new Shooter(robot, TELE);
|
||||
@@ -141,6 +144,8 @@ public class TeleopV1 extends LinearOpMode {
|
||||
|
||||
intake();
|
||||
|
||||
rejecter.rejecterPos(rpos);
|
||||
|
||||
drivetrain.update();
|
||||
|
||||
TELE.update();
|
||||
|
||||
Reference in New Issue
Block a user