Exploit database

GH-8fb29eca00002f21cd455c31dbadfaa8

aaditrir/inferno26

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 files6

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

TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Claw.java

Suggested starting fileJava · 1,094 bytes
package org.firstinspires.ftc.teamcode;

import com.qualcomm.robotcore.hardware.Servo;

public class Claw {

    public static final double WRIST_MAX_POS = 0.8;
    public static final double WRIST_MIN_POS = 0.0;
    public static final double CLAW_OPEN_POS = 0.5;
    public static final double CLAW_CLOSED_POS = 0.1;
    private final Servo wristServo;
    private final Servo clawServo;
    public Claw(Servo wristServo, Servo clawServo) {
        this.wristServo = wristServo;
        this.clawServo = clawServo;
    }
    private double limit(double value, double min, double max) {
        return Math.min(Math.max(value, min), max); // The variables are backwards because math.
    }
    public void setWristPos(double pos) {
        this.wristServo.setPosition(limit(pos, WRIST_MIN_POS, WRIST_MAX_POS));
    }
    public void setClawPos(double pos) {
        this.clawServo.setPosition(limit(pos, CLAW_CLOSED_POS, CLAW_OPEN_POS));
    }

    public void openClaw() {
        setClawPos(CLAW_OPEN_POS);
    }

    public void closedClaw() {
        setClawPos(CLAW_CLOSED_POS);
    }
}