mirror of
https://github.com/TimeCrafters/FTC_2022
synced 2025-12-15 17:52:34 +00:00
Rename all 'Prototype' to 'Phoenix'
This commit is contained in:
@@ -12,16 +12,16 @@ import org.timecrafters.Autonomous.States.DriverState;
|
||||
import org.timecrafters.Autonomous.States.PathDecision;
|
||||
import org.timecrafters.Autonomous.States.RotationState;
|
||||
import org.timecrafters.Autonomous.States.TopArm;
|
||||
import org.timecrafters.testing.states.PrototypeBot1;
|
||||
import org.timecrafters.testing.states.PhoenixBot1;
|
||||
|
||||
@Autonomous (name = "Left Side")
|
||||
|
||||
public class LeftSideAutonomousEngine extends CyberarmEngine {
|
||||
PrototypeBot1 robot;
|
||||
PhoenixBot1 robot;
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
robot = new PrototypeBot1(this);
|
||||
robot = new PhoenixBot1(this);
|
||||
addState(new ConeIdentification(robot, "LeftSideAutonomous", "00-0"));
|
||||
//drive to high pole
|
||||
addState(new DriverState(robot, "LeftSideAutonomous", "01-0"));
|
||||
|
||||
@@ -12,16 +12,16 @@ import org.timecrafters.Autonomous.States.BottomArm;
|
||||
import org.timecrafters.Autonomous.States.PathDecision;
|
||||
import org.timecrafters.Autonomous.States.RotationState;
|
||||
import org.timecrafters.Autonomous.States.TopArm;
|
||||
import org.timecrafters.testing.states.PrototypeBot1;
|
||||
import org.timecrafters.testing.states.PhoenixBot1;
|
||||
|
||||
@Autonomous (name = "Right Side")
|
||||
|
||||
public class RightSideAutonomousEngine extends CyberarmEngine {
|
||||
PrototypeBot1 robot;
|
||||
PhoenixBot1 robot;
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
robot = new PrototypeBot1(this);
|
||||
robot = new PhoenixBot1(this);
|
||||
addState(new ConeIdentification(robot, "RightSideAutonomous", "00-0"));
|
||||
//drive to high pole
|
||||
addState(new DriverState(robot, "RightSideAutonomous", "01-0"));
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
package org.timecrafters.Autonomous.States;
|
||||
|
||||
import org.cyberarm.engine.V2.CyberarmState;
|
||||
import org.timecrafters.testing.states.PrototypeBot1;
|
||||
import org.timecrafters.testing.states.PhoenixBot1;
|
||||
|
||||
public class BottomArm extends CyberarmState {
|
||||
|
||||
private final boolean stateDisabled;
|
||||
PrototypeBot1 robot;
|
||||
PhoenixBot1 robot;
|
||||
double LowerRiserRightPos, LowerRiserLeftPos, AddedDistance;
|
||||
long time;
|
||||
long lastStepTime = 0;
|
||||
boolean up;
|
||||
boolean directPosition;
|
||||
|
||||
public BottomArm(PrototypeBot1 robot, String groupName, String actionName) {
|
||||
public BottomArm(PhoenixBot1 robot, String groupName, String actionName) {
|
||||
this.robot = robot;
|
||||
this.LowerRiserLeftPos = robot.configuration.variable(groupName, actionName, "LowerRiserLeftPos").value();
|
||||
this.LowerRiserRightPos = robot.configuration.variable(groupName, actionName, "LowerRiserRightPos").value();
|
||||
|
||||
@@ -4,11 +4,11 @@ import com.qualcomm.robotcore.hardware.DcMotor;
|
||||
|
||||
import org.cyberarm.engine.V2.CyberarmState;
|
||||
import org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit;
|
||||
import org.timecrafters.testing.states.PrototypeBot1;
|
||||
import org.timecrafters.testing.states.PhoenixBot1;
|
||||
|
||||
public class CollectorDistanceState extends CyberarmState {
|
||||
|
||||
private final PrototypeBot1 robot;
|
||||
private final PhoenixBot1 robot;
|
||||
private int traveledDistance;
|
||||
private int RampUpDistance;
|
||||
private int RampDownDistance;
|
||||
@@ -25,7 +25,7 @@ public class CollectorDistanceState extends CyberarmState {
|
||||
private double inRangeTime;
|
||||
|
||||
|
||||
public CollectorDistanceState(PrototypeBot1 robot, String groupName, String actionName) {
|
||||
public CollectorDistanceState(PhoenixBot1 robot, String groupName, String actionName) {
|
||||
this.robot = robot;
|
||||
this.targetDrivePower = robot.configuration.variable(groupName, actionName, "targetDrivePower").value();
|
||||
this.traveledDistance = robot.configuration.variable(groupName, actionName, "traveledDistance").value();
|
||||
|
||||
@@ -2,18 +2,18 @@ package org.timecrafters.Autonomous.States;
|
||||
|
||||
import org.cyberarm.engine.V2.CyberarmState;
|
||||
import org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit;
|
||||
import org.timecrafters.testing.states.PrototypeBot1;
|
||||
import org.timecrafters.testing.states.PhoenixBot1;
|
||||
|
||||
public class CollectorState extends CyberarmState {
|
||||
|
||||
private final PrototypeBot1 robot;
|
||||
private final PhoenixBot1 robot;
|
||||
private final boolean stateDisabled;
|
||||
private boolean collecting;
|
||||
private long duration;
|
||||
private long BeginningofActionTime;
|
||||
|
||||
|
||||
public CollectorState(PrototypeBot1 robot, String groupName, String actionName) {
|
||||
public CollectorState(PhoenixBot1 robot, String groupName, String actionName) {
|
||||
this.robot = robot;
|
||||
|
||||
this.duration = robot.configuration.variable(groupName, actionName, "Duration").value();
|
||||
|
||||
@@ -4,17 +4,17 @@ import static org.firstinspires.ftc.robotcore.external.BlocksOpModeCompanion.tel
|
||||
|
||||
import org.cyberarm.engine.V2.CyberarmState;
|
||||
import org.firstinspires.ftc.robotcore.external.tfod.Recognition;
|
||||
import org.timecrafters.testing.states.PrototypeBot1;
|
||||
import org.timecrafters.testing.states.PhoenixBot1;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ConeIdentification extends CyberarmState {
|
||||
PrototypeBot1 robot;
|
||||
PhoenixBot1 robot;
|
||||
private int time;
|
||||
private float minimumConfidence;
|
||||
private int ParkPlace;
|
||||
|
||||
public ConeIdentification(PrototypeBot1 robot, String groupName, String actionName) {
|
||||
public ConeIdentification(PhoenixBot1 robot, String groupName, String actionName) {
|
||||
this.robot = robot;
|
||||
minimumConfidence = robot.configuration.variable(groupName, actionName, "Minimum Confidence").value();
|
||||
time = robot.configuration.variable(groupName, actionName, "time").value();
|
||||
|
||||
@@ -3,16 +3,16 @@ package org.timecrafters.Autonomous.States;
|
||||
import com.qualcomm.robotcore.hardware.DcMotor;
|
||||
|
||||
import org.cyberarm.engine.V2.CyberarmState;
|
||||
import org.timecrafters.testing.states.PrototypeBot1;
|
||||
import org.timecrafters.testing.states.PhoenixBot1;
|
||||
|
||||
public class DriverParkPlaceState extends CyberarmState {
|
||||
private final boolean stateDisabled;
|
||||
PrototypeBot1 robot;
|
||||
PhoenixBot1 robot;
|
||||
private int RampUpDistance;
|
||||
private int RampDownDistance;
|
||||
private String intendedPlacement;
|
||||
|
||||
public DriverParkPlaceState(PrototypeBot1 robot, String groupName, String actionName) {
|
||||
public DriverParkPlaceState(PhoenixBot1 robot, String groupName, String actionName) {
|
||||
this.robot = robot;
|
||||
this.targetDrivePower = robot.configuration.variable(groupName, actionName, "targetDrivePower").value();
|
||||
this.traveledDistance = robot.configuration.variable(groupName, actionName, "traveledDistance").value();
|
||||
|
||||
@@ -3,14 +3,14 @@ package org.timecrafters.Autonomous.States;
|
||||
import com.qualcomm.robotcore.hardware.DcMotor;
|
||||
|
||||
import org.cyberarm.engine.V2.CyberarmState;
|
||||
import org.timecrafters.testing.states.PrototypeBot1;
|
||||
import org.timecrafters.testing.states.PhoenixBot1;
|
||||
|
||||
public class DriverState extends CyberarmState {
|
||||
private final boolean stateDisabled;
|
||||
PrototypeBot1 robot;
|
||||
PhoenixBot1 robot;
|
||||
private int RampUpDistance;
|
||||
private int RampDownDistance;
|
||||
public DriverState(PrototypeBot1 robot, String groupName, String actionName) {
|
||||
public DriverState(PhoenixBot1 robot, String groupName, String actionName) {
|
||||
this.robot = robot;
|
||||
this.targetDrivePower = robot.configuration.variable(groupName, actionName, "targetDrivePower").value();
|
||||
this.traveledDistance = robot.configuration.variable(groupName, actionName, "traveledDistance").value();
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package org.timecrafters.Autonomous.States;
|
||||
|
||||
import org.cyberarm.engine.V2.CyberarmState;
|
||||
import org.timecrafters.testing.states.PrototypeBot1;
|
||||
import org.timecrafters.testing.states.PhoenixBot1;
|
||||
|
||||
public class PathDecision extends CyberarmState {
|
||||
PrototypeBot1 robot;
|
||||
PhoenixBot1 robot;
|
||||
private String groupName;
|
||||
|
||||
|
||||
public PathDecision (PrototypeBot1 robot, String groupName, String actionName){
|
||||
public PathDecision (PhoenixBot1 robot, String groupName, String actionName){
|
||||
this.robot = robot;
|
||||
this.groupName = groupName;
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package org.timecrafters.Autonomous.States;
|
||||
|
||||
import org.cyberarm.engine.V2.CyberarmState;
|
||||
import org.timecrafters.testing.states.PrototypeBot1;
|
||||
import org.timecrafters.testing.states.PhoenixBot1;
|
||||
|
||||
public class RotationState extends CyberarmState {
|
||||
private final boolean stateDisabled;
|
||||
PrototypeBot1 robot;
|
||||
public RotationState(PrototypeBot1 robot, String groupName, String actionName) {
|
||||
PhoenixBot1 robot;
|
||||
public RotationState(PhoenixBot1 robot, String groupName, String actionName) {
|
||||
this.robot = robot;
|
||||
this.drivePower = robot.configuration.variable(groupName, actionName, "DrivePower").value();
|
||||
this.targetRotation = robot.configuration.variable(groupName, actionName, "targetRotation").value();
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
package org.timecrafters.Autonomous.States;
|
||||
|
||||
import org.cyberarm.engine.V2.CyberarmState;
|
||||
import org.timecrafters.testing.states.PrototypeBot1;
|
||||
import org.timecrafters.testing.states.PhoenixBot1;
|
||||
|
||||
public class TopArm extends CyberarmState {
|
||||
|
||||
private final boolean stateDisabled;
|
||||
PrototypeBot1 robot;
|
||||
PhoenixBot1 robot;
|
||||
double UpperRiserRightPos, UpperRiserLeftPos, AddedDistance;
|
||||
long time;
|
||||
long lastStepTime = 0;
|
||||
boolean up;
|
||||
boolean directPosition;
|
||||
|
||||
public TopArm(PrototypeBot1 robot, String groupName, String actionName) {
|
||||
public TopArm(PhoenixBot1 robot, String groupName, String actionName) {
|
||||
this.robot = robot;
|
||||
this.UpperRiserLeftPos = robot.configuration.variable(groupName, actionName, "UpperRiserLeftPos").value();
|
||||
this.UpperRiserRightPos = robot.configuration.variable(groupName, actionName, "UpperRiserRightPos").value();
|
||||
|
||||
Reference in New Issue
Block a user