Exploit databaseDownload repository ZIP
GH-cb5c84f2dd96d0fbd07cf0c58c06431f
14663/powerplay
Sources for CVE-2019-11358
1,181 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files8
14663/powerplayRevision 1bb2976d7fae
- ↑..Parent directory
- BaseProcessor.java
- IntakeTeleOpProcessor.java
- MovementAutoProcessor.java
- MovementTeleOpProcessor.java
- OuttakeTeleOpProcessor.java
- Processor.java
- SafetyMovementAutoProcessor.java
- VisualizationAutoProcessor.java
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Processors/BaseProcessor.java
Java · 3,483 bytespackage org.firstinspires.ftc.teamcode.Processors;
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import com.qualcomm.robotcore.hardware.Gamepad;
import com.qualcomm.robotcore.util.ElapsedTime;
import org.firstinspires.ftc.robotcore.external.Telemetry;
import org.firstinspires.ftc.teamcode.BaseTeleOp;
import org.firstinspires.ftc.teamcode.Killabytez.KillabytezRobot;
public abstract class BaseProcessor implements Processor {
protected LinearOpMode opMode;
private ElapsedTime runtime = new ElapsedTime();
BaseProcessor(LinearOpMode opMode) {
this.opMode = opMode;
}
public KillabytezRobot getKillabytezRobot() {
// TODO: Hack for now
return ((BaseTeleOp) opMode).getKillabytezRobot();
}
protected Telemetry getTelemetry() {
return opMode.telemetry;
}
protected Gamepad getGamepad(int i) {
return (i == 1) ? opMode.gamepad1 : opMode.gamepad2;
}
protected void sleep(long msec) {
opMode.sleep(msec);
}
abstract public void init();
abstract public void process();
/*public void encoderDrive(double leftInches, double rightInches,
double timeoutS) {
int newLeftTarget;
int newRightTarget;
// Ensure that the opmode is still active
// Determine new target position, and pass to motor controller
double fudge_factor = 1.0;
if (leftInches == rightInches) {
fudge_factor = FUDGE_FACTOR;
}
newLeftTarget = getHardwarePushbot().leftDrive.getCurrentPosition() + (int) (leftInches * COUNTS_PER_INCH * fudge_factor);
newRightTarget = getHardwarePushbot().rightDrive.getCurrentPosition() + (int) (rightInches * COUNTS_PER_INCH * fudge_factor);
getHardwarePushbot().leftDrive.setTargetPosition(newLeftTarget);
getHardwarePushbot().rightDrive.setTargetPosition(newRightTarget);
// Turn On RUN_TO_POSITION
getHardwarePushbot().leftDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);
getHardwarePushbot().rightDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);
// reset the timeout time and start motion.
runtime.reset();
getHardwarePushbot().leftDrive.setPower(Math.abs(0.5));
getHardwarePushbot().rightDrive.setPower(Math.abs(0.5));
// keep looping while we are still active, and there is time left, and both motors are running.
// Note: We use (isBusy() && isBusy()) in the loop test, which means that when EITHER motor hits
// its target position, the motion will stop. This is "safer" in the event that the getHardwarePushbot() will
// always end the motion as soon as possible.
// However, if you require that BOTH motors have finished their moves before the getHardwarePushbot() continues
// onto the next step, use (isBusy() || isBusy()) in the loop test.
while ((getHardwarePushbot().leftDrive.isBusy() && getHardwarePushbot().rightDrive.isBusy())) {
getTelemetry().update();
}
// Stop all motion;
getHardwarePushbot().leftDrive.setPower(0);
getHardwarePushbot().rightDrive.setPower(0);
// Turn off RUN_TO_POSITION
getHardwarePushbot().leftDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER);
getHardwarePushbot().rightDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER);
sleep(50); // optional pause after each move
}*/
}