fixed hood offset

This commit is contained in:
2026-04-25 22:15:26 -05:00
parent 81e0e80f62
commit 222b201561
2 changed files with 3 additions and 4 deletions

View File

@@ -27,7 +27,7 @@ public class ServoPositions {
public static double hoodAuto = 0.27; public static double hoodAuto = 0.27;
public static double hoodOffset = -0.04; // offset from 0.93 public static double hoodOffset = -0.05; // offset from 0.93 (or position at 0,0 in targeting class)
public static double turret_redClose = 0; public static double turret_redClose = 0;
public static double turret_blueClose = 0; public static double turret_blueClose = 0;

View File

@@ -1,6 +1,7 @@
package org.firstinspires.ftc.teamcode.utils; package org.firstinspires.ftc.teamcode.utils;
import static org.firstinspires.ftc.teamcode.constants.Color.redAlliance; import static org.firstinspires.ftc.teamcode.constants.Color.redAlliance;
import static org.firstinspires.ftc.teamcode.constants.ServoPositions.hoodOffset;
import com.acmerobotics.dashboard.telemetry.MultipleTelemetry; import com.acmerobotics.dashboard.telemetry.MultipleTelemetry;
import java.lang.Math; import java.lang.Math;
@@ -84,8 +85,6 @@ public class Targeting {
public Targeting() { public Targeting() {
} }
double cos54 = Math.cos(Math.toRadians(-54));
double sin54 = Math.sin(Math.toRadians(-54));
//TODO: change code so it uses pedropathing paths //TODO: change code so it uses pedropathing paths
public Settings calculateSettings(double robotX, double robotY, double robotHeading, double robotVelocity, boolean interpolate) { public Settings calculateSettings(double robotX, double robotY, double robotHeading, double robotVelocity, boolean interpolate) {
Settings recommendedSettings = new Settings(0.0, 0.0); Settings recommendedSettings = new Settings(0.0, 0.0);
@@ -220,7 +219,7 @@ public class Targeting {
if (true) { //!interpolate) { if (true) { //!interpolate) {
if ((robotGridY < 6) && (robotGridX < 6)) { if ((robotGridY < 6) && (robotGridX < 6)) {
recommendedSettings.flywheelRPM = KNOWNTARGETING[robotGridX][robotGridY].flywheelRPM; recommendedSettings.flywheelRPM = KNOWNTARGETING[robotGridX][robotGridY].flywheelRPM;
recommendedSettings.hoodAngle = KNOWNTARGETING[robotGridX][robotGridY].hoodAngle; recommendedSettings.hoodAngle = KNOWNTARGETING[robotGridX][robotGridY].hoodAngle + hoodOffset;
} }
return recommendedSettings; return recommendedSettings;
} else { } else {