Exploit database

GH-dfbdda6970359c7c2f792923ae7d5d96

4h-botsmiths/ftc-18693-freight-frenzy

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2019-11358

1,181 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files4

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Hardware/GyroHardware.java

Java · 2,365 bytes
package org.firstinspires.ftc.teamcode.Hardware;

import static android.os.SystemClock.sleep;

import com.qualcomm.hardware.bosch.BNO055IMU;
import com.qualcomm.robotcore.hardware.HardwareMap;

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;
import org.firstinspires.ftc.robotcore.external.navigation.Temperature;

public class GyroHardware {
    public BNO055IMU gyro = null;
    public BNO055IMU.Parameters parameters = null;
    public Temperature temp;
    public Orientation angles;
    public Orientation angles2;
    public Boolean initialized = null;
    HardwareMap hwMap = null;

    public void init(HardwareMap ahwMap) {
        initialized = false;
        hwMap = ahwMap;
        gyro = hwMap.get(BNO055IMU.class, "imu");
        parameters = new BNO055IMU.Parameters();

        parameters.mode = BNO055IMU.SensorMode.IMU;
        parameters.angleUnit = BNO055IMU.AngleUnit.DEGREES;
        parameters.accelUnit = BNO055IMU.AccelUnit.METERS_PERSEC_PERSEC;
        parameters.loggingEnabled = false;
        parameters.temperatureUnit = BNO055IMU.TempUnit.FARENHEIT;
        //parameters.gyroPowerMode        = BNO055IMU.GyroPowerMode.ADVANCED;

        gyro.initialize(parameters);

        while (!gyro.isGyroCalibrated()) {
            sleep(5);
        }
        initialized = true;
    }
    public void init(){
        initialized = false;
        gyro.initialize(parameters);
        while (!gyro.isGyroCalibrated()) {
            sleep(5);
        }
        initialized = true;
    }

    public Orientation getOrientation() {
        if (gyro.isGyroCalibrated()) {
            angles = gyro.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.XYZ, AngleUnit.DEGREES);
            return angles;
        }
        return null;
    }

    public Orientation getOrientation2() {
        if (gyro.isGyroCalibrated()) {
            angles2 = gyro.getAngularOrientation(AxesReference.EXTRINSIC, AxesOrder.XYZ, AngleUnit.DEGREES);
            return angles2;
        }
        return null;
    }

    public double getTemp() {
        temp = gyro.getTemperature();
        return temp.temperature;
    }
}