Exploit databaseDownload repository ZIP
GH-89786c7d19f1094f9762e90b692942e5
25wangj/ftcintothedeep16460
Sources for CVE-2019-11358
1,181 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files21
25wangj/ftcintothedeep16460Revision cd48e52a53ca
- ↑..Parent directory
- BoolCommand.java
- Command.java
- CommandOpMode.java
- ConsecutiveDetector.java
- DeadlineCommand.java
- FallingEdgeDetector.java
- FnCommand.java
- LazyCommand.java
- LazySeqCommand.java
- Listener.java
- ParCommand.java
- RaceCommand.java
- RepeatCommand.java
- RisingEdgeDetector.java
- Scheduler.java
- SeqCommand.java
- StateMachine.java
- StateMachineBuilder.java
- Subsystem.java
- SwitchCommand.java
- WaitCommand.java
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/command/ParCommand.java
Java · 2,257 bytespackage org.firstinspires.ftc.teamcode.command;
import java.util.ArrayList;
import java.util.List;
public class ParCommand extends Command {
private Command[] commands;
private boolean[] dones;
private boolean[] justDones;
private int numDone;
public ParCommand(Command... commands) {
List<Command> list = new ArrayList<>();
for (Command command : commands) {
if (command != null) {
for (Subsystem subsystem : command.getSubsystems()) {
if (subsystems.contains(subsystem)) {
throw new IllegalArgumentException("Subsystem used twice");
}
subsystems.add(subsystem);
}
cancelable = cancelable && command.cancelable;
list.add(command);
}
}
this.commands = list.toArray(new Command[0]);
}
@Override
public void init(double time) {
dones = new boolean[commands.length];
justDones = new boolean[commands.length];
numDone = 0;
for (Command command : commands) {
command.init(time);
}
}
@Override
public void run(double time) {
for (int i = 0; i < commands.length; i++) {
if (justDones[i]) {
commands[i].end(time, false);
justDones[i] = false;
} else if (!dones[i]) {
commands[i].run(time);
}
}
}
@Override
public void end(double time, boolean canceled) {
if (canceled) {
for (int i = 0; i < commands.length; i++) {
if (!dones[i]) {
commands[i].end(time, true);
}
}
}
for (int i = 0; i < commands.length; i++) {
if (justDones[i]) {
commands[i].end(time, false);
}
}
}
@Override
public boolean done(double time) {
for (int i = 0; i < commands.length; i++) {
if (!dones[i] && commands[i].done(time)) {
justDones[i] = true;
dones[i] = true;
numDone++;
}
}
return numDone == commands.length;
}
}