Exploit databaseDownload repository ZIP
GH-1c3baab4a72246969ddd73935a7da736
9848gearview/sharkbaitcodeftc2425
Sources for CVE-2019-11358
1,181 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files4
9848gearview/sharkbaitcodeftc2425Revision c354bc28802e
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/rr/tuning/ManualFeedbackTuner.java
Java · 3,087 bytespackage org.firstinspires.ftc.teamcode.rr.tuning;
import com.acmerobotics.roadrunner.Pose2d;
import com.acmerobotics.roadrunner.ftc.Actions;
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import org.firstinspires.ftc.teamcode.rr.MecanumDrive;
import org.firstinspires.ftc.teamcode.rr.TankDrive;
import org.firstinspires.ftc.teamcode.rr.ThreeDeadWheelLocalizer;
import org.firstinspires.ftc.teamcode.rr.TwoDeadWheelLocalizer;
public final class ManualFeedbackTuner extends LinearOpMode {
public static double DISTANCE = 64;
@Override
public void runOpMode() throws InterruptedException {
if (TuningOpModes.DRIVE_CLASS.equals(MecanumDrive.class)) {
MecanumDrive drive = new MecanumDrive(hardwareMap, new Pose2d(0, 0, 0));
if (drive.localizer instanceof TwoDeadWheelLocalizer) {
if (TwoDeadWheelLocalizer.PARAMS.perpXTicks == 0 && TwoDeadWheelLocalizer.PARAMS.parYTicks == 0) {
throw new RuntimeException("Odometry wheel locations not set! Run AngularRampLogger to tune them.");
}
} else if (drive.localizer instanceof ThreeDeadWheelLocalizer) {
if (ThreeDeadWheelLocalizer.PARAMS.perpXTicks == 0 && ThreeDeadWheelLocalizer.PARAMS.par0YTicks == 0 && ThreeDeadWheelLocalizer.PARAMS.par1YTicks == 1) {
throw new RuntimeException("Odometry wheel locations not set! Run AngularRampLogger to tune them.");
}
}
waitForStart();
while (opModeIsActive()) {
Actions.runBlocking(
drive.actionBuilder(new Pose2d(0, 0, 0))
.lineToX(DISTANCE)
.lineToX(0)
.build());
}
} else if (TuningOpModes.DRIVE_CLASS.equals(TankDrive.class)) {
TankDrive drive = new TankDrive(hardwareMap, new Pose2d(0, 0, 0));
if (drive.localizer instanceof TwoDeadWheelLocalizer) {
if (TwoDeadWheelLocalizer.PARAMS.perpXTicks == 0 && TwoDeadWheelLocalizer.PARAMS.parYTicks == 0) {
throw new RuntimeException("Odometry wheel locations not set! Run AngularRampLogger to tune them.");
}
} else if (drive.localizer instanceof ThreeDeadWheelLocalizer) {
if (ThreeDeadWheelLocalizer.PARAMS.perpXTicks == 0 && ThreeDeadWheelLocalizer.PARAMS.par0YTicks == 0 && ThreeDeadWheelLocalizer.PARAMS.par1YTicks == 1) {
throw new RuntimeException("Odometry wheel locations not set! Run AngularRampLogger to tune them.");
}
}
waitForStart();
while (opModeIsActive()) {
Actions.runBlocking(
drive.actionBuilder(new Pose2d(0, 0, 0))
.lineToX(DISTANCE)
.lineToX(0)
.build());
}
} else {
throw new RuntimeException();
}
}
}