stash
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
package org.firstinspires.ftc.teamcode.tests;
|
package org.firstinspires.ftc.teamcode.tests;
|
||||||
|
|
||||||
|
import static org.firstinspires.ftc.teamcode.constants.ServoPositions.*;
|
||||||
|
|
||||||
import com.acmerobotics.dashboard.FtcDashboard;
|
import com.acmerobotics.dashboard.FtcDashboard;
|
||||||
import com.acmerobotics.dashboard.config.Config;
|
import com.acmerobotics.dashboard.config.Config;
|
||||||
import com.acmerobotics.dashboard.telemetry.MultipleTelemetry;
|
import com.acmerobotics.dashboard.telemetry.MultipleTelemetry;
|
||||||
@@ -19,14 +21,13 @@ public class ShooterTest extends LinearOpMode {
|
|||||||
// --- CONSTANTS YOU TUNE ---
|
// --- CONSTANTS YOU TUNE ---
|
||||||
|
|
||||||
//TODO: @Daniel FIX THE BELOW CONSTANTS A LITTLE IF NEEDED
|
//TODO: @Daniel FIX THE BELOW CONSTANTS A LITTLE IF NEEDED
|
||||||
public static double transferPower = 0.0;
|
public static double transferPower = 1.0;
|
||||||
public static double hoodPos = 0.501;
|
public static double hoodPos = 0.501;
|
||||||
|
|
||||||
public static double turretPos = 0.501;
|
public static double turretPos = 0.501;
|
||||||
|
public static boolean shoot = false;
|
||||||
Robot robot;
|
Robot robot;
|
||||||
Flywheel flywheel;
|
Flywheel flywheel;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void runOpMode() throws InterruptedException {
|
public void runOpMode() throws InterruptedException {
|
||||||
|
|
||||||
@@ -48,7 +49,6 @@ public class ShooterTest extends LinearOpMode {
|
|||||||
rightShooter.setPower(parameter);
|
rightShooter.setPower(parameter);
|
||||||
leftShooter.setPower(parameter);
|
leftShooter.setPower(parameter);
|
||||||
} else if (mode == 1) {
|
} else if (mode == 1) {
|
||||||
|
|
||||||
double powPID = flywheel.manageFlywheel((int) parameter, robot.shooter1.getCurrentPosition());
|
double powPID = flywheel.manageFlywheel((int) parameter, robot.shooter1.getCurrentPosition());
|
||||||
|
|
||||||
TELE.addData("Velocity", flywheel.getVelo());
|
TELE.addData("Velocity", flywheel.getVelo());
|
||||||
@@ -61,12 +61,17 @@ public class ShooterTest extends LinearOpMode {
|
|||||||
robot.hood.setPosition(hoodPos);
|
robot.hood.setPosition(hoodPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (turretPos!=0.501){
|
if (turretPos != 0.501) {
|
||||||
robot.turr1.setPosition(turretPos);
|
robot.turr1.setPosition(turretPos);
|
||||||
robot.turr2.setPosition(turretPos);
|
robot.turr2.setPosition(turretPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
robot.transfer.setPower(transferPower);
|
robot.transfer.setPower(transferPower);
|
||||||
|
if (shoot) {
|
||||||
|
robot.transferServo.setPosition(transferServo_in);
|
||||||
|
} else {
|
||||||
|
robot.transferServo.setPosition(transferServo_out);
|
||||||
|
}
|
||||||
|
|
||||||
TELE.update();
|
TELE.update();
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import com.acmerobotics.dashboard.telemetry.MultipleTelemetry;
|
|||||||
|
|
||||||
public class Flywheel {
|
public class Flywheel {
|
||||||
Robot robot;
|
Robot robot;
|
||||||
|
|
||||||
MultipleTelemetry TELE;
|
MultipleTelemetry TELE;
|
||||||
|
|
||||||
double initPos = 0.0;
|
double initPos = 0.0;
|
||||||
double stamp = 0.0;
|
double stamp = 0.0;
|
||||||
double stamp1 = 0.0;
|
double stamp1 = 0.0;
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
package org.firstinspires.ftc.teamcode.utils;
|
package org.firstinspires.ftc.teamcode.utils;
|
||||||
|
|
||||||
|
import com.acmerobotics.dashboard.config.Config;
|
||||||
import com.acmerobotics.dashboard.telemetry.MultipleTelemetry;
|
import com.acmerobotics.dashboard.telemetry.MultipleTelemetry;
|
||||||
import com.arcrobotics.ftclib.controller.PIDController;
|
import com.arcrobotics.ftclib.controller.PIDController;
|
||||||
|
|
||||||
|
@Config
|
||||||
public class Servos {
|
public class Servos {
|
||||||
PIDController spinPID;
|
PIDController spinPID;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user