power-play/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/auto/ZeroConeAutonLeft.java
missing 8cdd3dd447 literally everything ive done over the past >2 months in one commit lol
most important stuff: kinematics, autons, config, dashboard, easyopencv + april tags, and probably more im forgetting

https://xkcd.com/1296/
2023-01-23 23:52:26 -06:00

42 lines
1.3 KiB
Java

package org.firstinspires.ftc.teamcode.auto;
import com.qualcomm.robotcore.eventloop.opmode.Autonomous;
import org.firstinspires.ftc.teamcode.kinematics.Distance;
import org.firstinspires.ftc.teamcode.Hardware;
import org.firstinspires.ftc.teamcode.Strings;
@Autonomous(name = "0-Cone Left Side", group = Strings.leftSideGroup, preselectTeleOp = Strings.mainOpModeName)
public class ZeroConeAutonLeft extends AprilTagAutonBase {
Hardware hardware;
AutonMovement movement;
@Override
void onInit() {
hardware = new Hardware(this);
movement = new AutonMovement(hardware, 0.6);
hardware.setClawPosition(1);
hardware.setWristPosition(-2/3.);
}
@Override
void onPlay(int signalZone) {
// move to the junction
movement.straight(Distance.inTiles(1).sub(Distance.ROBOT_LENGTH).div(2));
movement.strafe(Distance.inTiles(1).sub(Distance.ONE_TILE_WITHOUT_BORDER.sub(Distance.ROBOT_WIDTH).div(2)));
movement.straight(Distance.inTiles(1));
switch (signalZone) {
case 1:
movement.strafe(Distance.inTiles(-2));
break;
case 2:
movement.strafe(Distance.inTiles(-1));
break;
case 3:
// do nothing
break;
}
}
}