@@ -0,0 +1,2150 @@
+package com.edinarobotics.zeke.commands;%0A%0Aimport com.edinarobotics.zeke.Components;%0Aimport com.edinarobotics.zeke.vision.VisionServer;%0Aimport edu.wpi.first.wpilibj.command.Command;%0A%0Apublic class WaitForVisionCommand extends Command %7B%0A    private VisionServer visionServer;%0A    %0A    private int hotGoalCounts;%0A    %0A    /**%0A     * Creates a new command that waits until the hot goal count becomes greater%0A     * than the number specified, or gets timed out. Vision data is read from%0A     * socket port 1180.%0A     * @param hotGoalCounts The minimum samples of hot goals that should be%0A     * counted. The count increases every 50 ms when a signal is being received.%0A     * Thus, a count of 20 implies 20*50 = 1000 ms (1 second).%0A     * @param timeout The time after which this command times out.%0A     */%0A    public WaitForVisionCommand(int hotGoalCounts, double timeout) %7B%0A        visionServer = Components.getInstance().visionServer;%0A        this.hotGoalCounts = hotGoalCounts;%0A        setInterruptible(true);%0A        setTimeout(timeout);%0A    %7D%0A    %0A    /**%0A     * Creates a new command that waits until the hot goal count becomes greater%0A     * than the number specified, or gets timed out.%0A     * @param visionPort The socket port to read from. (default = 1180)%0A     * @param hotGoalCounts The minimum samples of hot goals that should be%0A     * counted. The count increases every 50 ms when a signal is being received.%0A     * Thus, a count of 20 implies 20*50 = 1000 ms (1 second).%0A     * @param timeout The time after which this command times out.%0A     */%0A    public WaitForVisionCommand(int visionPort, int hotGoalCounts, double timeout) %7B%0A        this(hotGoalCounts, timeout);%0A        visionServer.setPort(visionPort);%0A    %7D%0A    %0A    protected void initialize() %7B%0A        visionServer.resetCounts();%0A        visionServer.start();%0A    %7D%0A%0A    protected void execute() %7B%0A    %7D%0A%0A    protected boolean isFinished() %7B%0A        return visionServer.getCount()%3E hotGoalCounts %7C%7C isTimedOut();%0A    %7D%0A%0A    protected void end() %7B%0A        visionServer.stop();%0A        visionServer.resetCounts();%0A    %7D%0A%0A    protected void interrupted() %7B%0A        end();%0A    %7D%0A%7D%0A

Add WaitForVisionCommand to the robot.