to test new shooter

This commit is contained in:
2026-01-03 16:07:14 -06:00
parent 21b4b0b4f5
commit a84891bc06
2 changed files with 9 additions and 8 deletions

View File

@@ -1,14 +1,11 @@
package org.firstinspires.ftc.teamcode.utils;
import static org.firstinspires.ftc.teamcode.constants.ShooterVars.kP;
import static org.firstinspires.ftc.teamcode.constants.ShooterVars.maxStep;
import com.acmerobotics.dashboard.telemetry.MultipleTelemetry;
import com.acmerobotics.dashboard.config.Config;
@Config
public class Flywheel {
Robot robot;
MultipleTelemetry TELE;
public static double kP = 0.001; // small proportional gain (tune this)
public static double maxStep = 0.06; // prevents sudden jumps
double initPos = 0.0;
double stamp = 0.0;
double stamp1 = 0.0;

View File

@@ -4,7 +4,9 @@ import static org.firstinspires.ftc.teamcode.variables.HardwareConfig.*;
import com.qualcomm.hardware.limelightvision.Limelight3A;
import com.qualcomm.hardware.rev.RevHubOrientationOnRobot;
import com.qualcomm.robotcore.hardware.DcMotor;
import com.qualcomm.robotcore.hardware.DcMotorEx;
import com.qualcomm.robotcore.hardware.DcMotorSimple;
import com.qualcomm.robotcore.hardware.HardwareMap;
import com.qualcomm.robotcore.hardware.IMU;
import com.qualcomm.robotcore.hardware.Servo;
@@ -30,8 +32,10 @@ public class Robot {
limelight3A = hardwareMap.get(Limelight3A.class, "limelight");
shooter1 = hardwareMap.get(DcMotorEx.class, "s1");
shooter2 = hardwareMap.get(DcMotorEx.class, "s2");
shooter1.setDirection(DcMotorSimple.Direction.REVERSE);
shooter1.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);
shooter2.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);
hood = hardwareMap.get(Servo.class, "hood");