Exploit databaseDownload repository ZIP
GH-ec38f2dd87afb44dc0c67af3a9c7d5b1
535tobor/2023-2024seasoncode
Sources for CVE-2019-11358
1,181 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files6
535tobor/2023-2024seasoncodeRevision a512a9229be3
- ↑..Parent directory
- BlueBoardSide.java
- BlueBoardSidePush.java
- BlueFarSidePush.java
- RedBoardSidePush.java
- RedFarSidePush.java
- readme.md
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/gamecode/autonomous/arcived/RedFarSidePush.java
Java · 5,032 bytespackage org.firstinspires.ftc.teamcode.gamecode.autonomous.arcived;
import static com.qualcomm.hardware.rev.RevHubOrientationOnRobot.LogoFacingDirection.UP;
import static com.qualcomm.hardware.rev.RevHubOrientationOnRobot.UsbFacingDirection.RIGHT;
import static org.firstinspires.ftc.teamcode.operations.inOut.Configs.mapOtherThings;
import static org.firstinspires.ftc.teamcode.operations.inOut.Configs.sensorRange;
import static org.firstinspires.ftc.teamcode.operations.inputs.AprilTag.initAprilTag;
import static org.firstinspires.ftc.teamcode.operations.inputs.Imu.imuGet;
import static org.firstinspires.ftc.teamcode.operations.inputs.TouchSensorButton.button;
import static org.firstinspires.ftc.teamcode.operations.outputs.motors.armLift.arm.Target_arm.arm;
import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.ConfigureMotors.forwardMotors;
import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.ConfigureMotors.mapMotors;
import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.definingDriveMovements.EncoderTickDefinitions.forwardAuto;
import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.definingDriveMovements.EncoderTickDefinitions.strafeLeftAuto;
import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.definingDriveMovements.EncoderTickDefinitions.strafeRightAuto;
import static org.firstinspires.ftc.teamcode.operations.outputs.motors.servos.claw.clawMovements.closeClaw;
import static org.firstinspires.ftc.teamcode.operations.outputs.motors.servos.claw.clawMovements.openClaw;
import static org.firstinspires.ftc.teamcode.operations.outputs.motors.servos.clawWrist.wristClawMovements.wristMove;
import com.qualcomm.robotcore.eventloop.opmode.Autonomous;
import com.qualcomm.robotcore.hardware.DcMotor;
import org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit;
import org.firstinspires.ftc.robotcore.external.navigation.Orientation;
import org.firstinspires.ftc.teamcode.operations.Target_operations;
import org.firstinspires.ftc.teamcode.operations.inputs.DeviceNames;
import org.firstinspires.ftc.teamcode.operations.inputs.TouchSensorButton;
import org.firstinspires.ftc.teamcode.operations.outputs.driverStation.TelemetryShow;
import org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.Encoders;
import org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.Wheels;
@Autonomous(name="Red, Far Side Push", group="push")
public class RedFarSidePush extends Target_operations {
DcMotor arm;
boolean hasBeenPressed = false;
Orientation direction;
private static double distanceUse = 0;
private static double storedDistance = 0;
// and save the heading
double botHeading;
double botTargetHeading;
@Override
public void runOpMode() throws InterruptedException {
// LinearOpMode that calls a different form of OpMode:
runInit();
while(opModeInInit()){runInitLoop();}
waitForStart();
runStart();
if (isStopRequested()){runStop();} // stop OpMode if the button is pressed
while (opModeIsActive()) {runLoop();}
}
@Override
public void runInit() {
mapMotors(hardwareMap, Wheels.FRONT_LEFT.abbreviation(), Wheels.FRONT_RIGHT.abbreviation(), Wheels.BACK_LEFT.abbreviation(), Wheels.BACK_RIGHT.abbreviation());
forwardMotors(true, false, true, false);
imuGet(hardwareMap, DeviceNames.DEFAULT_IMU.hardwareMapName(), RIGHT.name(), UP.name());
// ^ set motor directions
initAprilTag(hardwareMap, "Webcam 1", telemetry);
Encoders.clear();
mapOtherThings(hardwareMap);
TouchSensorButton.mapDigital(hardwareMap); // button
wristMove(0.8);
// set wrist to a position needed to touch the ground
// extend shaft somehow.
closeClaw();
// the claw closes so it will not hit anything as the arm lowers
// in runInitLoop should be openClaw(); under if button is pressed, do once
}
@Override
public void runInitLoop(){
telemetry.addData("found: ", sensorRange.getDistance(DistanceUnit.INCH));
telemetry.update();
if (button.isPressed() && !hasBeenPressed) {
arm.setPower(-1);
// move arm up only one notch
// open claw so the robot fits in the 18x18 zone
openClaw();
hasBeenPressed = true;
}
else if (hasBeenPressed) {
arm.setPower(0);
}
else {
arm.setPower(1);
}
}
@Override
public void runStart() {
forwardAuto(3, 3,500); //
strafeLeftAuto(8,3,500); //
forwardAuto(15,3,500); //
strafeLeftAuto(17,3,500); //
forwardAuto(58,3,500);
strafeRightAuto(123,3,500);
}
@Override
public void runStop() {
stopAll();
}
@Override
public void runLoop() {
TelemetryShow.allLoopMessages(telemetry);
}
}