@@ -0,0 +1,1590 @@
+/*%0A * To change this template, choose Tools %7C Templates%0A * and open the template in the editor.%0A */%0Apackage org.lunatecs316.frc2013.auto;%0A%0A/**%0A *%0A * @author Domenic%0A */%0Apublic class StateMachineAuto implements AutonomousMode %7B%0A%0A    protected static class State %7B%0A        private String name;%0A        private double value;%0A        %0A        public State(String name, double value) %7B%0A            this.name = name;%0A            this.value = value;%0A        %7D%0A        %0A        public State(String name) %7B%0A            this(name, 0);%0A        %7D%0A        %0A        /**%0A         * Convert the State to a string%0A         * @return the string value%0A         */%0A        public String toString() %7B%0A            return name;%0A        %7D%0A        %0A        /**%0A         * Get the value of the state%0A         * @return value%0A         */%0A        public double getValue() %7B%0A            return value;%0A        %7D%0A    %7D;%0A    %0A    protected State state;%0A    protected long startTime;%0A    %0A    /**%0A     * Returns the time spent in the current state%0A     * @return millisecond state time%0A     */%0A    private double ellapsedStateTime() %7B%0A        //System.out.println(%22Time:%22 + System.currentTimeMillis() + %22StartTime: %22 + startTime);%0A        return System.currentTimeMillis() - startTime;%0A    %7D%0A    %0A    /**%0A     * Sets the state for the next loop and resets startTime%0A     * @param state the new state%0A     */%0A    private void setState(State state) %7B%0A        this.state = state;%0A        startTime = System.currentTimeMillis();%0A    %7D%0A    %0A    public void init() %7B%0A        %0A    %7D%0A%0A    public void run() %7B%0A        %0A    %7D%0A    %0A%7D%0A

Add experimental StateMachineAuto class