Exploit databaseDownload repository ZIP
GH-ef43c2dfe5f3bdc23f6fe7d343e9e0a0
aarushtripathi/belugabotsgithub
Sources for CVE-2019-11358
1,181 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files6
aarushtripathi/belugabotsgithubRevision 2e3c93e2a018
- ↑..Parent directory
- ForwardTuner.java
- LateralTuner.java
- LocalizationTest.java
- MotorDirections.java
- SensorGoBildaPinpointExample.java
- TurnTuner.java
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
TeamCode/src/main/java/tuners_tests/localization/ForwardTuner.java
Java · 3,247 bytespackage tuners_tests.localization;
import com.acmerobotics.dashboard.FtcDashboard;
import com.acmerobotics.dashboard.config.Config;
import com.acmerobotics.dashboard.telemetry.MultipleTelemetry;
import com.pedropathing.localization.PoseUpdater;
import com.pedropathing.util.Constants;
import com.pedropathing.util.DashboardPoseTracker;
import com.pedropathing.util.Drawing;
import com.qualcomm.robotcore.eventloop.opmode.Autonomous;
import com.qualcomm.robotcore.eventloop.opmode.OpMode;
import org.firstinspires.ftc.code.Pedro.constants.FConstants;
import org.firstinspires.ftc.code.Pedro.constants.LConstants;
import org.firstinspires.ftc.robotcore.external.Telemetry;
/**
* This is the ForwardTuner OpMode. This tracks the forward movement of the robot and displays the
* necessary ticks to inches multiplier. This displayed multiplier is what's necessary to scale the
* robot's current distance in ticks to the specified distance in inches. So, to use this, run the
* tuner, then pull/push the robot to the specified distance using a ruler on the ground. When you're
* at the end of the distance, record the ticks to inches multiplier. Feel free to run multiple trials
* and average the results. Then, input the multiplier into the forward ticks to inches in your
* localizer of choice.
* You can adjust the target distance on FTC Dashboard: 192/168/43/1:8080/dash
*
* @author Anyi Lin - 10158 Scott's Bots
* @version 1.0, 5/6/2024
*/
@Config
@Autonomous(name = "Forward Localizer Tuner", group = ".Localization")
public class ForwardTuner extends OpMode {
private PoseUpdater poseUpdater;
private DashboardPoseTracker dashboardPoseTracker;
private Telemetry telemetryA;
public static double DISTANCE = 48;
/**
* This initializes the PoseUpdater as well as the FTC Dashboard telemetry.
*/
@Override
public void init() {
Constants.setConstants(FConstants.class, LConstants.class);
poseUpdater = new PoseUpdater(hardwareMap);
dashboardPoseTracker = new DashboardPoseTracker(poseUpdater);
telemetryA = new MultipleTelemetry(this.telemetry, FtcDashboard.getInstance().getTelemetry());
telemetryA.addLine("Pull your robot forward " + DISTANCE + " inches. Your forward ticks to inches will be shown on the telemetry.");
telemetryA.update();
Drawing.drawRobot(poseUpdater.getPose(), "#4CAF50");
Drawing.sendPacket();
}
/**
* This updates the robot's pose estimate, and updates the FTC Dashboard telemetry with the
* calculated multiplier and draws the robot.
*/
@Override
public void loop() {
poseUpdater.update();
telemetryA.addData("distance moved", poseUpdater.getPose().getX());
telemetryA.addLine("The multiplier will display what your forward ticks to inches should be to scale your current distance to " + DISTANCE + " inches.");
telemetryA.addData("multiplier", DISTANCE / (poseUpdater.getPose().getX() / poseUpdater.getLocalizer().getForwardMultiplier()));
telemetryA.update();
Drawing.drawPoseHistory(dashboardPoseTracker, "#4CAF50");
Drawing.drawRobot(poseUpdater.getPose(), "#4CAF50");
Drawing.sendPacket();
}
}