Exploit databaseDownload repository ZIP
GH-6e23df6e44e3cc8e30ffa4fb7488c326
23476-owl-robotics/pidf-state-machine
Sources for CVE-2019-11358
1,181 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files5
23476-owl-robotics/pidf-state-machineRevision 904296009bf6
- ↑..Parent directory
- Coefficients.java
- Controller.java
- ControllerStates.java
- ConversionUnitCalculator.java
- Tuner.java
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/StateController/ConversionUnitCalculator.java
Java · 2,283 bytespackage org.firstinspires.ftc.teamcode.StateController;
import com.acmerobotics.dashboard.FtcDashboard;
import com.acmerobotics.dashboard.config.Config;
import com.acmerobotics.dashboard.telemetry.MultipleTelemetry;
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
import com.qualcomm.robotcore.hardware.DcMotor;
import com.qualcomm.robotcore.hardware.DcMotorEx;
import com.qualcomm.robotcore.hardware.DcMotorSimple;
/*
This is the conversion unit calculator
It will find the exact decimal needed for any given motor
To use it, open the FTC Dash on your computer and select the program.
Make sure that your motor's encoder value is 0 and is at its off / resting position
Start the program and move your motor
If your motor is running Linear Slides, move the slides up as far as they can go
Set the UnitsTraveled double to however many units that your motor went
eg: 10in for a Linear Slide, 5 rotations for a wheel
Copy the Conversion Unit value from the Telemetry and past it into setConversionUnit()
*/
@TeleOp
@Config
public class ConversionUnitCalculator extends LinearOpMode {
public static double UnitsTraveled = 0;
double encoderPosition;
double conversionValue;
DcMotorEx motor;
@Override
public void runOpMode() {
// ToDo: Set the Motor Name
motor = hardwareMap.get(DcMotorEx.class, "motor");
waitForStart();
if (opModeIsActive()) {
// ToDo: Set the Motor Position
motor.setDirection(DcMotorSimple.Direction.FORWARD);
motor.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.FLOAT);
motor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);
telemetry = new MultipleTelemetry(telemetry, FtcDashboard.getInstance().getTelemetry());
while (opModeIsActive()) {
encoderPosition = motor.getCurrentPosition();
conversionValue = UnitsTraveled / encoderPosition;
telemetry.addData("Encoder Position", encoderPosition);
telemetry.addLine();
telemetry.addData("Convertion Unit", conversionValue);
telemetry.update();
}
}
}
}