Exploit databaseDownload repository ZIP
GH-aa25895a970cd56800e2cefbc9e0084b
8097-botcats/22-23code
Sources for CVE-2019-11358
1,181 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files15
8097-botcats/22-23codeRevision ddcdf962e13c
- ↑..Parent directory
- drive/
- trajectorysequence/
- util/
- AprilTag.java
- Auto1.java
- AutoTest.java
- BasicMecanum.java
- LPosOneConeAuto.java
- RPosOneConeAuto.java
- Robot.java
- ScanParkAuto.java
- readme.md
- teleTest.java
- teleopOff.java
- teleopOff2.java
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/BasicMecanum.java
Java · 3,253 bytespackage org.firstinspires.ftc.teamcode;
import com.qualcomm.hardware.bosch.BNO055IMU;
import com.qualcomm.robotcore.eventloop.opmode.Autonomous;
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
import com.qualcomm.robotcore.hardware.CRServo;
import com.qualcomm.robotcore.hardware.DcMotor;
import com.qualcomm.robotcore.hardware.DcMotorSimple;
import com.qualcomm.robotcore.hardware.Servo;
import org.firstinspires.ftc.robotcore.external.navigation.AngleUnit;
import org.firstinspires.ftc.robotcore.external.navigation.AxesOrder;
import org.firstinspires.ftc.robotcore.external.navigation.AxesReference;
import org.firstinspires.ftc.robotcore.external.navigation.Orientation;
//TELEOP WITH 1 CONTROLLER
@TeleOp(name = "Basic Mecanum")
public class BasicMecanum extends LinearOpMode {
public void runOpMode() {
DcMotor fl = hardwareMap.dcMotor.get("front_left_motor");
DcMotor fr = hardwareMap.dcMotor.get("front_right_motor");
DcMotor bl = hardwareMap.dcMotor.get("back_left_motor");
DcMotor br = hardwareMap.dcMotor.get("back_right_motor");
fr.setDirection(DcMotorSimple.Direction.REVERSE);
br.setDirection(DcMotorSimple.Direction.REVERSE);
double driveSpeed = .5;
boolean aButton = true;
double finalAngle;
telemetry.addData("Status", "Initalized");
telemetry.update();
waitForStart();
while (opModeIsActive()) {
if (gamepad1.a && aButton) {
aButton = false;
if (driveSpeed == 1) { //if the current increment is 1, it'll switch to 0.5
driveSpeed = 0.5;
} else { //if the current increment is not 1, it'll switch to 1
driveSpeed = 1;
}
}
if (!gamepad1.a && !aButton) {
aButton = true;
}
double r = Math.hypot(-gamepad1.left_stick_x, gamepad1.left_stick_y); //finds hypotenuse (power of each motor)
double gpAngle = Math.atan2(gamepad1.left_stick_y, -gamepad1.left_stick_x) - Math.PI / 4; //finds angle of robot subtracted by pi/4 bc
//it "shifts" the powers to each motor CW
double rightX = (-gamepad1.right_stick_x) * .75; //for rotating w/ right stick
finalAngle = gpAngle;
final double v1 = driveSpeed * (r * Math.cos(finalAngle) + rightX);
final double v2 = driveSpeed * (r * Math.sin(finalAngle) - rightX);
final double v3 = driveSpeed * (r * Math.sin(finalAngle) + rightX);
final double v4 = driveSpeed * (r * Math.cos(finalAngle) - rightX);
/*
r is mulitplier for power
math.cos is used for fl and br bc fl&br are used to go diagonal top right, if you want to go faster to the right apply more power to
those motors so closer joystick is to x axis faster robot go to that direction
math.sin is used for same reason as ^ but to go faster forward/backwards
*/
fl.setPower(v1);
fr.setPower(v2);
bl.setPower(v3);
br.setPower(v4);
}
}
}