mirror of
https://github.com/TimeCrafters/FTC_2022
synced 2025-12-16 22:52:35 +00:00
Configuring Autonomous
This commit is contained in:
@@ -11,6 +11,7 @@ import org.timecrafters.Autonomous.States.DriverParkPlaceState;
|
|||||||
import org.timecrafters.Autonomous.States.DriverState;
|
import org.timecrafters.Autonomous.States.DriverState;
|
||||||
import org.timecrafters.Autonomous.States.PathDecision;
|
import org.timecrafters.Autonomous.States.PathDecision;
|
||||||
import org.timecrafters.Autonomous.States.RotationState;
|
import org.timecrafters.Autonomous.States.RotationState;
|
||||||
|
import org.timecrafters.Autonomous.States.ServoCameraRotate;
|
||||||
import org.timecrafters.Autonomous.States.TopArm;
|
import org.timecrafters.Autonomous.States.TopArm;
|
||||||
import org.timecrafters.testing.states.PhoenixBot1;
|
import org.timecrafters.testing.states.PhoenixBot1;
|
||||||
|
|
||||||
@@ -22,7 +23,9 @@ public class LeftSideAutonomousEngine extends CyberarmEngine {
|
|||||||
@Override
|
@Override
|
||||||
public void setup() {
|
public void setup() {
|
||||||
robot = new PhoenixBot1(this);
|
robot = new PhoenixBot1(this);
|
||||||
addState(new ConeIdentification(robot, "LeftSideAutonomous", "00-0"));
|
addState (new ServoCameraRotate(robot, "LeftSideAutonomous", "00-0"));
|
||||||
|
addState(new ConeIdentification(robot, "LeftSideAutonomous", "00-1"));
|
||||||
|
addState (new ServoCameraRotate(robot, "LeftSideAutonomous", "00-2"));
|
||||||
//drive to high pole
|
//drive to high pole
|
||||||
addState(new DriverState(robot, "LeftSideAutonomous", "01-0"));
|
addState(new DriverState(robot, "LeftSideAutonomous", "01-0"));
|
||||||
//turn towards high pole
|
//turn towards high pole
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import org.timecrafters.Autonomous.States.DriverState;
|
|||||||
import org.timecrafters.Autonomous.States.BottomArm;
|
import org.timecrafters.Autonomous.States.BottomArm;
|
||||||
import org.timecrafters.Autonomous.States.PathDecision;
|
import org.timecrafters.Autonomous.States.PathDecision;
|
||||||
import org.timecrafters.Autonomous.States.RotationState;
|
import org.timecrafters.Autonomous.States.RotationState;
|
||||||
|
import org.timecrafters.Autonomous.States.ServoCameraRotate;
|
||||||
import org.timecrafters.Autonomous.States.TopArm;
|
import org.timecrafters.Autonomous.States.TopArm;
|
||||||
import org.timecrafters.testing.states.PhoenixBot1;
|
import org.timecrafters.testing.states.PhoenixBot1;
|
||||||
|
|
||||||
@@ -22,7 +23,9 @@ public class RightSideAutonomousEngine extends CyberarmEngine {
|
|||||||
@Override
|
@Override
|
||||||
public void setup() {
|
public void setup() {
|
||||||
robot = new PhoenixBot1(this);
|
robot = new PhoenixBot1(this);
|
||||||
addState(new ConeIdentification(robot, "RightSideAutonomous", "00-0"));
|
addState(new ServoCameraRotate(robot, "RightSideAutonomous", "00-0"));
|
||||||
|
addState(new ConeIdentification(robot, "RightSideAutonomous", "00-1"));
|
||||||
|
addState(new ServoCameraRotate(robot, "RightSideAutonomous", "00-2"));
|
||||||
//drive to high pole
|
//drive to high pole
|
||||||
addState(new DriverState(robot, "RightSideAutonomous", "01-0"));
|
addState(new DriverState(robot, "RightSideAutonomous", "01-0"));
|
||||||
//turn towards high pole
|
//turn towards high pole
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ public class PhoenixBot1 {
|
|||||||
|
|
||||||
//Camera Servo
|
//Camera Servo
|
||||||
CameraServo = engine.hardwareMap.servo.get("Camera Servo");
|
CameraServo = engine.hardwareMap.servo.get("Camera Servo");
|
||||||
|
CameraServo.setDirection(Servo.Direction.REVERSE);
|
||||||
|
|
||||||
// Collector
|
// Collector
|
||||||
collectorLeft = engine.hardwareMap.crservo.get("Collector Left");
|
collectorLeft = engine.hardwareMap.crservo.get("Collector Left");
|
||||||
|
|||||||
Reference in New Issue
Block a user