@@ -0,0 +1,2053 @@
+package frc492;%0A%0Aimport java.sql.Struct;%0A%0Aimport frclibj.TrcEvent;%0Aimport frclibj.TrcRobot.AutoStrategy;%0Aimport frclibj.TrcStateMachine;%0A%0Apublic class AutoDrawbridge implements AutoStrategy %7B%0A%09%0A%09private static final String moduleName = %22AutoDrawbridge%22;%0A%09private Robot robot;%0A%09private double distance;%0A%09private TrcEvent driveEvent;%0A%09private TrcEvent elevatorEvent;%0A%09private TrcEvent armEvent;%0A%09%0A%09private TrcStateMachine sm;%0A%0A%09private enum AutonomousState%0A%09%7B%0A%09%09MOVING_CLOSE_TO_DRAWBRIDGE_AT_HIGH_SPEED_WHILE_RAISING_ELEVATOR_AND_ROTATING_ARMS,%0A%09%09MOVING_FORWARD_SLOWLY_TO_POSITION_IN_FRONT_OF_DRAWBRIDGE,%0A%09%09LOWERING_ARMS_OVER_DRABRIDE,%0A%09%09MOVING_BACK_SLOWLY_WHILE_LOWERING_ELEVATOR_SLOWLY_AND_ROTATING_ARMS_BACK_AT_A_SLOW_RATE,%0A%09%09ADVANCING_THROUGH_DRAWBRIDGE_WHILE_LIFTING_ARMS%0A%09%09%0A%09%7D%0A%09private AutonomousState State;%0A%09%0A%09public AutoDrawbridge(Robot robot)%0A%09%7B%0A%09%09this.robot = robot;%0A%09%09%0A%09%7D%0A%09%0A%09private static final float HIGH_SPEED_MOVING_POWER = 0.95f;%0A%09private static final float MEDIUM_SPEED_MOVING_POWER = 0.5f;%0A%09private static final int DISTANCE_TO_DRAWBRIDGE = 96;%0A%09%0A%09public void autoPeriodic() %0A%09%7B%0A%09%09boolean ready = sm.isReady();%0A%09%09%0A%09%09if(!ready)%0A%09%09%09return;%0A%0A%09%09switch(State)%0A%09%09%7B%0A%09%09case MOVING_CLOSE_TO_DRAWBRIDGE_AT_HIGH_SPEED_WHILE_RAISING_ELEVATOR_AND_ROTATING_ARMS:%0A%09%09%09robot.yPidCtrl.setOutputRange(-HIGH_SPEED_MOVING_POWER, HIGH_SPEED_MOVING_POWER);%0A%09%09%09robot.pidDrive.setTarget(DISTANCE_TO_DRAWBRIDGE * (5/6), 0, false, driveEvent, 2);%0A%09%09%09sm.addEvent(driveEvent);%0A%09%09%09// TODO Add elevator and arm raising/turning%0A%09%09%09break;%0A%09%09%09%0A%09%09case MOVING_FORWARD_SLOWLY_TO_POSITION_IN_FRONT_OF_DRAWBRIDGE:%0A%09%09%09robot.yPidCtrl.setOutputRange(-MEDIUM_SPEED_MOVING_POWER, MEDIUM_SPEED_MOVING_POWER);%0A%09%09%09robot.pidDrive.setTarget(DISTANCE_TO_DRAWBRIDGE * (1/6), 0, true, driveEvent, 2);%0A%09%09%09sm.addEvent(driveEvent);%0A%09%09%09break;%0A%09%09%09%0A%09%09case LOWERING_ARMS_OVER_DRABRIDE:%0A%09%09%09break;%0A%09%09%09%0A%09%09case MOVING_BACK_SLOWLY_WHILE_LOWERING_ELEVATOR_SLOWLY_AND_ROTATING_ARMS_BACK_AT_A_SLOW_RATE:%0A%09%09%09break;%0A%09%09%09%0A%09%09case ADVANCING_THROUGH_DRAWBRIDGE_WHILE_LIFTING_ARMS:%0A%09%09%09break;%0A%09%09%09%09%0A%09%09%7D%0A%09%09%0A%09%7D%0A%09%0A%7D%0A

Add AutoDrawbridge.java