@@ -0,0 +1,2482 @@
+package org.lunatecs316.frc2014;%0A%0Aimport com.sun.squawk.io.BufferedReader;%0Aimport com.sun.squawk.microedition.io.FileConnection;%0Aimport java.io.IOException;%0Aimport java.io.InputStreamReader;%0Aimport java.util.Enumeration;%0Aimport java.util.Hashtable;%0Aimport java.util.Vector;%0Aimport javax.microedition.io.Connector;%0A%0A/**%0A * Robot Constants manager. All constants have a String key and double value%0A * @author Domenic%0A */%0Apublic class Constants %7B%0A    %0A    private static final String kFilename = %22Constants.txt%22;%0A    private static final Hashtable constants = new Hashtable();%0A    %0A    /**%0A     * Update the constants. Read the latest values from the constants file%0A     */%0A    public static void update() %7B%0A        try %7B%0A            // Open the connection to the file%0A            FileConnection file = (FileConnection) Connector.open(%22file:///%22 + kFilename, Connector.READ);%0A            BufferedReader reader = new BufferedReader(new InputStreamReader(file.openDataInputStream()));%0A            %0A            // Read in each line of the constants file%0A            Vector lines = new Vector();%0A            String l;%0A            while ((l = reader.readLine()) != null) %7B%0A                lines.addElement(l);%0A            %7D%0A            %0A            // Close the file connections%0A            reader.close();%0A            file.close();%0A            %0A            // Parse each line%0A            Enumeration e = lines.elements();%0A            while (e.hasMoreElements()) %7B%0A                // Get the next line%0A                l = (String) e.nextElement();%0A                %0A                // Seperate into name and value%0A                int index = l.indexOf(%22=%22);%0A                String key = l.substring(0, index);%0A                double value = Double.parseDouble(l.substring(index + 1));%0A                %0A                // Add to the constants vector%0A                constants.put(key, new Double(value));%0A            %7D%0A        %7D catch (IOException e) %7B%0A            System.err.println(%22Error reading constants file!%22);%0A            System.err.println(e.getMessage());%0A        %7D%0A    %7D%0A    %0A    /**%0A     * Get the value for the specified constant%0A     * @param key the name of the constant%0A     * @return the value for the specified constant; 0.0 if constant is not found%0A     */%0A    public static double get(String key) %7B%0A        Double value = (Double) constants.get(key);%0A        %0A        if (value != null)%0A            return value.doubleValue();%0A        else%0A            return 0.0;%0A    %7D%0A%7D%0A

Add Constants class