altos: Remove unused AES code from teledongle and tidongle
[fw/altos] / altosui / Altos.java
index 3e2a7a4076634caa4030629c4755fad61636a958..351927ee39b3fabbac3df8d61fbcfe15830e6471 100644 (file)
@@ -28,74 +28,8 @@ import org.altusmetrum.AltosLib.*;
 
 public class Altos extends AltosLib {
 
-       /* Added for header fields in eeprom files */
-       static final int AO_LOG_CONFIG_VERSION = 1000;
-       static final int AO_LOG_MAIN_DEPLOY = 1001;
-       static final int AO_LOG_APOGEE_DELAY = 1002;
-       static final int AO_LOG_RADIO_CHANNEL = 1003;
-       static final int AO_LOG_CALLSIGN = 1004;
-       static final int AO_LOG_ACCEL_CAL = 1005;
-       static final int AO_LOG_RADIO_CAL = 1006;
-       static final int AO_LOG_MAX_FLIGHT_LOG = 1007;
-       static final int AO_LOG_MANUFACTURER = 2000;
-       static final int AO_LOG_PRODUCT = 2001;
-       static final int AO_LOG_SERIAL_NUMBER = 2002;
-       static final int AO_LOG_LOG_FORMAT = 2003;
-
-       /* Added for header fields in megametrum files */
-       static final int AO_LOG_BARO_RESERVED = 3000;
-       static final int AO_LOG_BARO_SENS = 3001;
-       static final int AO_LOG_BARO_OFF = 3002;
-       static final int AO_LOG_BARO_TCS = 3004;
-       static final int AO_LOG_BARO_TCO = 3005;
-       static final int AO_LOG_BARO_TREF = 3006;
-       static final int AO_LOG_BARO_TEMPSENS = 3007;
-       static final int AO_LOG_BARO_CRC = 3008;
-
-       static final int AO_LOG_SOFTWARE_VERSION = 9999;
-
-       /* Added to flag invalid records */
-       static final int AO_LOG_INVALID = -1;
-
-       /* Flight state numbers and names */
-       static final int ao_flight_startup = 0;
-       static final int ao_flight_idle = 1;
-       static final int ao_flight_pad = 2;
-       static final int ao_flight_boost = 3;
-       static final int ao_flight_fast = 4;
-       static final int ao_flight_coast = 5;
-       static final int ao_flight_drogue = 6;
-       static final int ao_flight_main = 7;
-       static final int ao_flight_landed = 8;
-       static final int ao_flight_invalid = 9;
-
-       /* Telemetry modes */
-       static final int ao_telemetry_off = 0;
-       static final int ao_telemetry_min = 1;
-       static final int ao_telemetry_standard = 1;
-       static final int ao_telemetry_0_9 = 2;
-       static final int ao_telemetry_0_8 = 3;
-       static final int ao_telemetry_max = 3;
-
-       static final String[] ao_telemetry_name = {
-               "Off", "Standard Telemetry", "TeleMetrum v0.9", "TeleMetrum v0.8"
-       };
-
-       static final String launch_sites_url = "http://www.altusmetrum.org/AltOS/launch-sites.txt";
-
-       static final int ao_telemetry_standard_len = 32;
-       static final int ao_telemetry_0_9_len = 95;
-       static final int ao_telemetry_0_8_len = 94;
-
-       static final int[] ao_telemetry_len = {
-               0, 32, 95, 94
-       };
-
-       static HashMap<String,Integer>  string_to_state = new HashMap<String,Integer>();
-
-       static boolean map_initialized = false;
-
        static final int tab_elt_pad = 5;
+
        static Font label_font;
        static Font value_font;
        static Font status_font;
@@ -138,62 +72,6 @@ public class Altos extends AltosLib {
 
        static final int text_width = 20;
 
-       static void initialize_map()
-       {
-               string_to_state.put("startup", ao_flight_startup);
-               string_to_state.put("idle", ao_flight_idle);
-               string_to_state.put("pad", ao_flight_pad);
-               string_to_state.put("boost", ao_flight_boost);
-               string_to_state.put("fast", ao_flight_fast);
-               string_to_state.put("coast", ao_flight_coast);
-               string_to_state.put("drogue", ao_flight_drogue);
-               string_to_state.put("apogee", ao_flight_coast);
-               string_to_state.put("main", ao_flight_main);
-               string_to_state.put("landed", ao_flight_landed);
-               string_to_state.put("invalid", ao_flight_invalid);
-               map_initialized = true;
-       }
-
-       static int telemetry_len(int telemetry) {
-               if (telemetry <= ao_telemetry_max)
-                       return ao_telemetry_len[telemetry];
-               throw new IllegalArgumentException(String.format("Invalid telemetry %d",
-                                                                telemetry));
-       }
-
-       static String telemetry_name(int telemetry) {
-               if (telemetry <= ao_telemetry_max)
-                       return ao_telemetry_name[telemetry];
-               throw new IllegalArgumentException(String.format("Invalid telemetry %d",
-                                                                telemetry));
-       }
-       
-       static String[] state_to_string = {
-               "startup",
-               "idle",
-               "pad",
-               "boost",
-               "fast",
-               "coast",
-               "drogue",
-               "main",
-               "landed",
-               "invalid",
-       };
-
-       static String[] state_to_string_capital = {
-               "Startup",
-               "Idle",
-               "Pad",
-               "Boost",
-               "Fast",
-               "Coast",
-               "Drogue",
-               "Main",
-               "Landed",
-               "Invalid",
-       };
-
        static public int state(String state) {
                if (!map_initialized)
                        initialize_map();