power-play/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/AutonMovement3.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

69 lines
1.9 KiB
Java

//package org.firstinspires.ftc.teamcode;
//
//public class AutonMovement3 {
// Hardware hardware;
// MovementAPI movement;
//
// double speed;
//
// public AutonMovement3(Hardware hardware, double speed) {
// this.hardware = hardware;
// this.movement = new MovementAPI(hardware);
// this.speed = speed;
// }
//
// private void sleep(double seconds) {
// double startTime = System.nanoTime();
// double targetTime = startTime + seconds * 1000 * 1000 * 1000;
//
// while (System.nanoTime() < targetTime);
// }
//
// public void straight(double power, double tiles) {
// this.moveFor(0, power, tiles * (23/18.));
// }
//
// public void strafe(double power, double tiles) {
// this.moveFor(power, 0, tiles * (23/17.));
// }
//
// public void moveFor(double powerX, double powerY, double seconds) {
// movement.move(powerX, powerY, 0, this.speed);
//
// this.sleep(seconds);
// movement.stop();
// this.sleep(1);
// }
//
// private double modAngle(double angle) {
// double angle2 = angle % 360;
// if (angle2 >= 180) {
// return angle2 - 360;
// } else {
// return angle2;
// }
// }
//
// public void turn(double degrees) {
// double startYaw = hardware.getImuYaw();
// double targetYaw = startYaw + (-degrees);
//
// while (true) {
// double yaw = hardware.getImuYaw();
// double yawDiff = this.modAngle(targetYaw - yaw);
//
// if (Math.abs(yawDiff) < 1) {
// break;
// }
//
// if (Math.abs(yawDiff) > 20) {
// movement.move(0, 0, Math.signum(yawDiff), this.speed);
// } else {
// movement.move(0, 0, Math.signum(yawDiff) * (yawDiff / 40 + 0.5), this.speed);
// }
// }
// movement.stop();
// this.sleep(0.3);
// }
//}