altoslib/altosui/altosuilib/libaltos: Remove trailing whitespace
authorKeith Packard <keithp@keithp.com>
Fri, 11 Apr 2014 23:40:06 +0000 (16:40 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 11 Apr 2014 23:40:06 +0000 (16:40 -0700)
Just cleaning up the source code.

Signed-off-by: Keith Packard <keithp@keithp.com>
58 files changed:
altoslib/AltosEepromDownload.java
altoslib/AltosEepromHeader.java
altoslib/AltosEepromMega.java
altoslib/AltosEepromMetrum2.java
altoslib/AltosFile.java
altoslib/AltosIdleFetch.java
altoslib/AltosLib.java
altoslib/AltosLink.java
altoslib/AltosMag.java
altoslib/AltosMs5607.java
altoslib/AltosPreferences.java
altoslib/AltosPyro.java
altoslib/AltosRomconfig.java
altoslib/AltosSelfFlash.java
altoslib/AltosSensorTM.java
altoslib/AltosSensorTMini.java
altoslib/AltosStateIterable.java
altoslib/AltosTelemetry.java
altoslib/AltosTelemetryFile.java
altoslib/AltosTelemetryLegacy.java
altoslib/AltosTelemetryMegaData.java
altoslib/AltosTelemetryMegaSensor.java
altoslib/AltosTelemetrySatellite.java
altoslib/AltosUnits.java
altosui/AltosAscent.java
altosui/AltosCompanionInfo.java
altosui/AltosConfigFreqUI.java
altosui/AltosConfigPyroUI.java
altosui/AltosConfigTDUI.java
altosui/AltosConfigureUI.java
altosui/AltosDescent.java
altosui/AltosDeviceUIDialog.java
altosui/AltosDisplayThread.java
altosui/AltosFlashUI.java
altosui/AltosFlightStatsTable.java
altosui/AltosFlightUI.java
altosui/AltosFreqList.java
altosui/AltosGraphDataPoint.java
altosui/AltosGraphUI.java
altosui/AltosIgniteUI.java
altosui/AltosInfoTable.java
altosui/AltosLanded.java
altosui/AltosPad.java
altosui/AltosScanUI.java
altosui/AltosSiteMap.java
altosui/AltosSiteMapPreload.java
altosui/AltosUI.java
altosui/AltosUIPreferencesBackend.java
altosuilib/AltosDeviceDialog.java
altosuilib/AltosUIAxis.java
altosuilib/AltosUIEnable.java
altosuilib/AltosUIFrame.java
altosuilib/AltosUIGraph.java
altosuilib/AltosUIGrapher.java
altosuilib/AltosUIMarker.java
altosuilib/AltosUIPreferencesBackend.java
altosuilib/AltosUISeries.java
libaltos/libaltos.c

index 041010797837ef615b8ac7fad57c174ae9173b76..163ffad93613ec32b2859667dbb9e3c41c7c7ff3 100644 (file)
@@ -132,7 +132,7 @@ public class AltosEepromDownload implements Runnable {
 
                CheckFile(false);
        }
-       
+
        void CaptureLog(AltosEepromLog log) throws IOException, InterruptedException, TimeoutException, ParseException {
                int                     block, state_block = 0;
                int                     log_format = flights.config_data.log_format;
index 6ce7ddd38516ecd3de0db752801e77b76b1202dc..fe5bf6c36b8142a6472f1f31aa24085ae8114fb7 100644 (file)
@@ -162,7 +162,7 @@ public class AltosEepromHeader extends AltosEeprom {
                        break;
                }
        }
-       
+
        public AltosEepromHeader (String[] tokens) {
                last = false;
                valid = true;
@@ -269,7 +269,7 @@ public class AltosEepromHeader extends AltosEeprom {
                for (AltosEepromHeader header : headers) {
                        header.write(out);
                }
-               
+
        }
 
        public AltosEepromHeader (String line) {
index b8a1b9e86dc61ad09403b33c9de4ec54274a3150..35e878852cff480db901314ee5ce15cefeef245c 100644 (file)
@@ -70,7 +70,7 @@ public class AltosEepromMega extends AltosEeprom {
        public int year() { return data8(14); }
        public int month() { return data8(15); }
        public int day() { return data8(16); }
-       
+
        /* AO_LOG_GPS_SAT elements */
        public int nsat() { return data16(0); }
        public int svid(int n) { return data8(2 + n * 2); }
index f1bca6dc14344b118597ce25dafc1eb877e7f453..d13aac42863d5b2e8f8bdc718682d65c0ed95aa5 100644 (file)
@@ -59,7 +59,7 @@ public class AltosEepromMetrum2 extends AltosEeprom {
        public int year() { return data8(4); }
        public int month() { return data8(5); }
        public int day() { return data8(6); }
-       
+
        /* AO_LOG_GPS_SAT elements */
        public int nsat() { return data8(0); }
        public int more() { return data8(1); }
@@ -161,7 +161,7 @@ public class AltosEepromMetrum2 extends AltosEeprom {
                                        break;
                                try {
                                        AltosEepromMetrum2 metrum = new AltosEepromMetrum2(line);
-                                       
+
                                        if (metrum.cmd != AltosLib.AO_LOG_INVALID)
                                                metrums.add(metrum);
                                } catch (Exception e) {
index 37bf70751a7a88dba353e0dea09f36d4d14cd355..79f6f1c6940c29bd0b485bd08b150e86b1b53798 100644 (file)
@@ -15,7 +15,7 @@
  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
  */
 
-package org.altusmetrum.altoslib_3; 
+package org.altusmetrum.altoslib_3;
 
 import java.io.File;
 import java.util.*;
index 02cb7a947a30b4df6a8e766c733f280b05b54342..b0e45797145973d7f786519f6a7faa90cbb62d98 100644 (file)
@@ -142,7 +142,7 @@ public class AltosIdleFetch implements AltosStateUpdate {
                        state.set_received_time(System.currentTimeMillis());
                } catch (TimeoutException te) {
                }
-               
+
        }
 
        public AltosIdleFetch(AltosLink link) {
index 05f0af8df5d4fa518191dc7e1a96c88c0e4772a1..3f25bc3199d8ec1d11ba0a9f2e27bf8eaae0dfcb 100644 (file)
@@ -203,7 +203,7 @@ public class AltosLib {
                throw new IllegalArgumentException(String.format("Invalid telemetry %d",
                                                                 telemetry));
        }
-       
+
        private static String[] state_to_string = {
                "startup",
                "idle",
index 97fa70625ce8d90aa5e1e84eb1f1b01b7c4ba8e2..469b03c0a1f8f41723e9bff0250393ecad5cd601 100644 (file)
@@ -76,7 +76,7 @@ public abstract class AltosLink implements Runnable {
                return get_reply(5000);
        }
 
-               
+
        public abstract boolean can_cancel_reply();
        public abstract boolean show_reply_timeout();
        public abstract void hide_reply_timeout();
@@ -215,7 +215,7 @@ public abstract class AltosLink implements Runnable {
                                        break;
                                }
                        }
-                       
+
                } finally {
                        --in_reply;
                }
index d2bb9da6fbe086430a92c03be434fb844a4b1bf0..a3a0a74b157412e677760046f9b09c35fa3fd14d 100644 (file)
@@ -87,4 +87,3 @@ public class AltosMag implements Cloneable {
                }
        }
 }
-       
\ No newline at end of file
index 97d08c3ea7c894f6f74be8515b6d0aaf0b5ed7ae..4a851524d6810a24d3483fd987aacf65797090c5 100644 (file)
@@ -44,7 +44,7 @@ public class AltosMs5607 {
                //int P;
 
                dT = raw_temp - ((int) tref << 8);
-       
+
                TEMP = (int) (2000 + (((long) dT * (long) tempsens) >> 23));
 
                if (ms5611) {
@@ -55,7 +55,7 @@ public class AltosMs5607 {
                        OFF = ((long) off << 17) + (((long) tco * (long) dT) >> 6);
 
                        SENS = ((long) sens << 16) + (((long) tcs * (long) dT) >> 7);
-               } 
+               }
 
                if (TEMP < 2000) {
                        int     T2 = (int) (((long) dT * (long) dT) >> 31);
index b8920d266c2324ef01474c7f3c7133aa59a3425d..484cb64411735f1881afb67e06aba5e4161f3c98 100644 (file)
@@ -55,7 +55,7 @@ public class AltosPreferences {
 
        /* Launcher channel preference name */
        public final static String launcherChannelPreference = "LAUNCHER-CHANNEL";
-       
+
        /* Default logdir is ~/TeleMetrum */
        public final static String logdirName = "TeleMetrum";
 
@@ -349,7 +349,7 @@ public class AltosPreferences {
                        return launcher_channel;
                }
        }
-       
+
        public static AltosPreferencesBackend bt_devices() {
                synchronized (backend) {
                        return backend.node("bt_devices");
index aefc6fbda7d7383441e3673fd35771bd564b03f2..a14141232dbc6dcd30d3f3a5c0acefbc8e6ce6ff 100644 (file)
@@ -105,7 +105,7 @@ public class AltosPyro {
        private static HashMap<Integer,AltosUnits> pyro_to_units = new HashMap<Integer,AltosUnits>();
 
        private static HashMap<Integer,Double> pyro_to_scale = new HashMap<Integer,Double>();
-       
+
        private static void insert_map(int flag, String string, String name, AltosUnits units, double scale) {
                string_to_pyro.put(string, flag);
                pyro_to_string.put(flag, string);
@@ -114,7 +114,7 @@ public class AltosPyro {
                        pyro_to_units.put(flag, units);
                pyro_to_scale.put(flag, scale);
        }
-       
+
        public static int string_to_pyro(String name) {
                if (string_to_pyro.containsKey(name))
                        return string_to_pyro.get(name);
@@ -174,7 +174,7 @@ public class AltosPyro {
 
                insert_map(pyro_after_motor, pyro_after_motor_string, pyro_after_motor_name, null, 1.0);
                insert_map(pyro_delay, pyro_delay_string, pyro_delay_name, null, pyro_delay_scale);
-               
+
                insert_map(pyro_state_less, pyro_state_less_string, pyro_state_less_name, null, 1.0);
                insert_map(pyro_state_greater_or_equal, pyro_state_greater_or_equal_string, pyro_state_greater_or_equal_name, null, 1.0);
        }
index 1273fbc605e2b95aad949482bfd92e5ffec87643..506c39610eb3e3272af3943b7b8b8a519520a6a2 100644 (file)
@@ -144,7 +144,7 @@ public class AltosRomconfig {
                ao_romconfig_check,
                ao_serial_number
        };
-               
+
        private static boolean name_required(String name) {
                for (String required : required_names)
                        if (name.equals(required))
index aae993ebc368731fb42899a67303d6212a27cb1c..051aa76698f420df39e9e943b1076db79c132f31 100644 (file)
@@ -47,7 +47,7 @@ public class AltosSelfFlash extends AltosProgrammer {
                for (int offset = 0; offset < len; offset += 0x100) {
                        link.printf("R %x\n", addr + offset);
                        byte[]  reply = link.get_binary_reply(5000, 0x100);
-                       
+
                        if (reply == null)
                                throw new IOException("Read device memory timeout");
                        for (b = 0; b < len; b++)
@@ -55,7 +55,7 @@ public class AltosSelfFlash extends AltosProgrammer {
                }
                return data;
        }
-               
+
        void write_memory(long addr, byte[] data, int start, int len) {
                int b;
                link.printf("W %x\n", addr);
index b8f54bcb257845f4a11c357a230055b80e018c2a..a5129783fdfe39dbede076fbdad061562fb4cc61 100644 (file)
@@ -40,7 +40,7 @@ public class AltosSensorTM {
                        state.set_battery_voltage(AltosConvert.cc_battery_to_voltage(sensor_tm.batt));
                        state.set_apogee_voltage(AltosConvert.cc_ignitor_to_voltage(sensor_tm.drogue));
                        state.set_main_voltage(AltosConvert.cc_ignitor_to_voltage(sensor_tm.main));
-                       
+
                } catch (TimeoutException te) {
                }
        }
index cc5718a0eac57eace906ab6bc87a647325ddb7a8..bb60a794dad55d047bd9578c9ff3c1b0de5de99a 100644 (file)
@@ -34,7 +34,7 @@ public class AltosSensorTMini {
                        state.set_battery_voltage(AltosConvert.tele_mini_voltage(sensor_tmini.batt));
                        state.set_apogee_voltage(AltosConvert.tele_mini_voltage(sensor_tmini.apogee));
                        state.set_main_voltage(AltosConvert.tele_mini_voltage(sensor_tmini.main));
-                       
+
                } catch (TimeoutException te) {
                }
        }
index 5a919b66c40a5565d047333e18aaa065535ce8cf..7ea3041bb79e0c862611a1f7de04edc164d95ef7 100644 (file)
@@ -24,6 +24,6 @@ public abstract class AltosStateIterable implements Iterable<AltosState> {
 
        public void write_comments (PrintStream out) {
        }
-       
+
        public abstract void write(PrintStream out);
 }
index 01bedd5e71173f759e3545440b62a7730bda5d91..1c4ce7bc36e6057d4d4b98bbdb4cf895735a0fb1 100644 (file)
@@ -67,7 +67,7 @@ public abstract class AltosTelemetry implements AltosStateUpdate {
        final static int packet_type_metrum_sensor = 0x0a;
        final static int packet_type_metrum_data = 0x0b;
        final static int packet_type_mini = 0x10;
-       
+
        static AltosTelemetry parse_hex(String hex)  throws ParseException, AltosCRCException {
                AltosTelemetry  telem = null;
 
index 09d7d3f8ce26c02432892527d170b8264ddf3c9b..f66431347fec2064a1a677edee8e9216014b2d0a 100644 (file)
@@ -62,7 +62,7 @@ public class AltosTelemetryFile extends AltosStateIterable {
        }
 
        public void write(PrintStream out) {
-               
+
        }
 
        public AltosTelemetryFile(FileInputStream input) {
index d302adddb487b54956793d2f083c950c461410a0..da9296e448d05c81e86d0bfa5b5e8ebdbf7289b4 100644 (file)
@@ -470,7 +470,7 @@ public class AltosTelemetryLegacy extends AltosTelemetry {
                batt = int16(29);
                apogee = int16(31);
                main = int16(33);
-               
+
                ground_accel = int16(7);
                ground_pres = int16(15);
                accel_plus_g = int16(17);
index a4df70bee80ed084f1c17723802c594590b0c4b3..ffd825462a0b5691da2e1528977a513cfcaf674e 100644 (file)
@@ -19,7 +19,7 @@ package org.altusmetrum.altoslib_3;
 
 public class AltosTelemetryMegaData extends AltosTelemetryStandard {
        int     state;
-       
+
        int     v_batt;
        int     v_pyro;
        int     sense[];
@@ -41,7 +41,7 @@ public class AltosTelemetryMegaData extends AltosTelemetryStandard {
                v_batt = int16(6);
                v_pyro = int16(8);
 
-               sense = new int[6];     
+               sense = new int[6];
 
                for (int i = 0; i < 6; i++) {
                        sense[i] = int8(10 + i) << 4;
@@ -62,7 +62,7 @@ public class AltosTelemetryMegaData extends AltosTelemetryStandard {
                super.update_state(state);
 
                state.set_state(this.state);
-                       
+
                state.set_battery_voltage(AltosConvert.mega_battery_voltage(v_batt));
                state.set_pyro_voltage(AltosConvert.mega_pyro_voltage(v_pyro));
 
index d1a463c06cd8ede43dd8252c7eec6216acdfcf95..d9fd7fdeadc0a25a09cdc5a02a21e54c1d93e9b7 100644 (file)
@@ -67,7 +67,7 @@ public class AltosTelemetryMegaSensor extends AltosTelemetryStandard {
                state.set_orient(orient);
 
                AltosIMU imu = new AltosIMU();
-               
+
                imu.accel_x = AltosIMU.convert_accel(accel_x);
                imu.accel_y = AltosIMU.convert_accel(accel_y);
                imu.accel_z = AltosIMU.convert_accel(accel_z);
index 01252bdea92a81186e176b0d2b9fccc52da96abb..24777b28a713396269572093e71edada744f79f7 100644 (file)
@@ -43,7 +43,7 @@ public class AltosTelemetrySatellite extends AltosTelemetryStandard {
                super.update_state(state);
 
                AltosGPS        gps = state.make_temp_gps(true);
-               
+
                gps.cc_gps_sat = sats;
                state.set_temp_gps();
        }
index e573a43b7f1e2289e0051006d5680772317a494e..82f102e4cd14beebda39433f34e2acfd14ae585e 100644 (file)
@@ -41,7 +41,7 @@ public abstract class AltosUnits {
        public double value(double v) {
                return value(v, AltosConvert.imperial_units);
        }
-               
+
        public double inverse(double v) {
                return inverse(v, AltosConvert.imperial_units);
        }
@@ -49,15 +49,15 @@ public abstract class AltosUnits {
        public String show_units() {
                return show_units(AltosConvert.imperial_units);
        }
-               
+
        public String say_units() {
                return say_units(AltosConvert.imperial_units);
        }
-               
+
        public int show_fraction(int width) {
                return show_fraction(width, AltosConvert.imperial_units);
        }
-               
+
        int say_fraction(boolean imperial_units) {
                return 0;
        }
index 36871dd6e23e4867323979685c202ace9fb1e0d2..81b08d2c3aa7cae5ee67c6124dc90199d7b71ee1 100644 (file)
@@ -48,7 +48,7 @@ public class AltosAscent extends JComponent implements AltosFlightDisplay {
                        show();
                        value.setText(s);
                }
-               
+
                void show(AltosUnits units, double v) {
                        show(units.show(8, v));
                }
@@ -122,7 +122,7 @@ public class AltosAscent extends JComponent implements AltosFlightDisplay {
                        show();
                        value.setText(s);
                }
-               
+
                void show(AltosUnits units, double v) {
                        show(units.show(8, v));
                }
index 4cc6c462f28e948bbadad37c0b03da90299f538c..b90240fbebf22578c8c8a722f7ddc1b289fa008f 100644 (file)
@@ -82,7 +82,7 @@ public class AltosCompanionInfo extends JTable {
                        return String.format("%02x\n", companion.board_id);
                }
        }
-       
+
        public void show(AltosState state, AltosListenerState listener_state) {
                if (state == null)
                        return;
index e9923a32ac78ce4cbe703ef7d24f6f159124cd92..5877805791ec28ef7f81859a2dbb226fd2df6fc6 100644 (file)
@@ -71,7 +71,7 @@ class AltosEditFreqUI extends AltosUIDialog implements ActionListener {
 
                GridBagConstraints c = new GridBagConstraints();
                c.insets = new Insets (4,4,4,4);
-               
+
                c.fill = GridBagConstraints.NONE;
                c.anchor = GridBagConstraints.WEST;
                c.gridx = 0;
@@ -126,7 +126,7 @@ class AltosEditFreqUI extends AltosUIDialog implements ActionListener {
                c.weightx = 0;
                c.weighty = 0;
                pane.add(ok_button, c);
-               
+
                cancel_button = new JButton("Cancel");
                cancel_button.setActionCommand("cancel");
                cancel_button.addActionListener(this);
@@ -139,7 +139,7 @@ class AltosEditFreqUI extends AltosUIDialog implements ActionListener {
                c.weightx = 0;
                c.weighty = 0;
                pane.add(cancel_button, c);
-               
+
                if (existing == null)
                        setTitle("Add New Frequency");
                else {
@@ -151,7 +151,7 @@ class AltosEditFreqUI extends AltosUIDialog implements ActionListener {
 
                pack();
                setLocationRelativeTo(frame);
-               
+
        }
 
        public AltosEditFreqUI(Frame in_frame) {
@@ -290,7 +290,7 @@ public class AltosConfigFreqUI extends AltosUIDialog implements ActionListener {
        public AltosFrequency[] frequencies() {
                return frequencies.frequencies();
        }
-       
+
        public AltosConfigFreqUI(Frame in_frame,
                                 AltosFrequency[] in_frequencies) {
                super(in_frame, "Manage Frequencies", true);
index b14c39ab86e1c5ea2f0ca74d92194003d66394a3..b667b15a18379529467f59d9ce7f09c135095949 100644 (file)
@@ -63,22 +63,22 @@ public class AltosConfigPyroUI
 
                public void itemStateChanged(ItemEvent e) {
                        set_enable(enable.isSelected());
-                       if (!setting) 
+                       if (!setting)
                                ui.set_dirty();
                }
 
                public void changedUpdate(DocumentEvent e) {
-                       if (!setting) 
+                       if (!setting)
                                ui.set_dirty();
                }
 
                public void insertUpdate(DocumentEvent e) {
-                       if (!setting) 
+                       if (!setting)
                                ui.set_dirty();
                }
 
                public void removeUpdate(DocumentEvent e) {
-                       if (!setting) 
+                       if (!setting)
                                ui.set_dirty();
                }
 
@@ -149,7 +149,7 @@ public class AltosConfigPyroUI
                        enable = new JCheckBox();
                        enable.addItemListener(this);
                        pane.add(enable, c);
-                       
+
                        if ((flag & AltosPyro.pyro_no_value) == 0) {
                                c = new GridBagConstraints();
                                c.gridx = x+1; c.gridy = y;
@@ -224,7 +224,7 @@ public class AltosConfigPyroUI
 
                        items = new PyroItem[nrow];
                        int row = 0;
-                       
+
                        GridBagConstraints      c;
                        c = new GridBagConstraints();
                        c.gridx = x; c.gridy = y;
@@ -371,7 +371,7 @@ public class AltosConfigPyroUI
                pane.add(close, c);
                close.addActionListener(this);
                close.setActionCommand("Close");
-               
+
                addWindowListener(new ConfigListener(this, owner));
                AltosPreferences.register_units_listener(this);
        }
index 3ce0d98c1c8068a48eaa0370cc3674bc6d0ccc73..55d6aed95c82bc067355bd1828168ea175ddf598 100644 (file)
@@ -311,7 +311,7 @@ public class AltosConfigTDUI
                int i;
                for (i = 0; i < radio_frequency_value.getItemCount(); i++) {
                        AltosFrequency  f = (AltosFrequency) radio_frequency_value.getItemAt(i);
-                       
+
                        if (f.close(new_radio_frequency)) {
                                radio_frequency_value.setSelectedIndex(i);
                                return;
@@ -319,7 +319,7 @@ public class AltosConfigTDUI
                }
                for (i = 0; i < radio_frequency_value.getItemCount(); i++) {
                        AltosFrequency  f = (AltosFrequency) radio_frequency_value.getItemAt(i);
-                       
+
                        if (new_radio_frequency < f.frequency)
                                break;
                }
index 5e42f43055ec55d9b13dabe3044f789d04693785..631c188dddd5063d8c3cce556224d4836f8a0f63 100644 (file)
@@ -123,10 +123,10 @@ public class AltosConfigureUI
                "Bottom",
                "Bottom right",
        };
-               
+
        public void add_position() {
                pane.add(new JLabel ("Menu position"), constraints(0, 1));
-               
+
                position_value = new JComboBox (position_names);
                position_value.setMaximumRowCount(position_names.length);
                int position = AltosUIPreferences.position();
index d1379083feed0d11f9e5bb18ac17612bcb762b79..cd993a758eabf1945a31309309b47e76e86bd6ad 100644 (file)
@@ -318,7 +318,7 @@ public class AltosDescent extends JComponent implements AltosFlightDisplay {
        }
 
        Distance distance;
-               
+
 
        class Apogee extends DescentStatus {
                void show (AltosState state, AltosListenerState listener_state) {
index ceabe84339e240e4531c51279fef95ba2a922112..ca34357ebd9c25579ad222c8f8eae3377106338b 100644 (file)
@@ -46,7 +46,7 @@ public class AltosDeviceUIDialog extends AltosDeviceDialog {
                buttonPane.add(manage_bluetooth_button);
                buttonPane.add(Box.createRigidArea(new Dimension(10, 0)));
        }
-       
+
        public void actionPerformed(ActionEvent e) {
                super.actionPerformed(e);
                if ("manage".equals(e.getActionCommand())) {
index 2a33f996ac52418d0d07eeb2ae715c2d5326b81e..ab85607d447ebd194916086e6e79200a7d611f88 100644 (file)
@@ -155,7 +155,7 @@ public class AltosDisplayThread extends Thread {
                                                        wait(sleep_time);
                                                }
                                        }
-                                       
+
                                        report(false);
                                }
                        } catch (InterruptedException ie) {
index 793a8af3d156dd142c5b8724a486fb71ca99e032..ff9cb95dcc87558b05f5ae79846858232647bc18 100644 (file)
@@ -231,7 +231,7 @@ public class AltosFlashUI
                javax.swing.filechooser.FileFilter ihx_filter = new FileNameExtensionFilter("Flash Image", "ihx");
                hexfile_chooser.addChoosableFileFilter(ihx_filter);
                hexfile_chooser.setFileFilter(ihx_filter);
-               
+
                if (!is_pair_programmed() && !device.matchProduct(AltosLib.product_altusmetrum)) {
                        for (int i = 0; i < filters.length; i++) {
                                if (device != null && device.matchProduct(filters[i].product))
@@ -247,7 +247,7 @@ public class AltosFlashUI
                if (file == null)
                        return false;
                AltosUIPreferences.set_firmwaredir(file.getParentFile());
-               
+
                return true;
        }
 
index cb0c1562bf7b73c95ad2cdb123ac600e5aab7eab..da71154eb3e4282b3148ea0ceaf9995aeb186982 100644 (file)
@@ -140,5 +140,5 @@ public class AltosFlightStatsTable extends JComponent {
                                       pos(stats.lon,"E","W"));
                }
        }
-       
+
 }
\ No newline at end of file
index aac4c9b0c655c638bc5e19d0dff5709d32beac62..0d21d296f66558a7a237238b5dadfaa1c84b08a4 100644 (file)
@@ -226,7 +226,7 @@ public class AltosFlightUI extends AltosUIFrame implements AltosFlightDisplay, A
                        // Telemetry format menu
                        if (reader.supports_telemetry(Altos.ao_telemetry_standard)) {
                                telemetries = new JComboBox();
-                               for (int i = 1; i <= Altos.ao_telemetry_max; i++) 
+                               for (int i = 1; i <= Altos.ao_telemetry_max; i++)
                                        telemetries.addItem(Altos.telemetry_name(i));
                                int telemetry = AltosPreferences.telemetry(serial);
                                if (telemetry <= Altos.ao_telemetry_off ||
index 039b5f220277c35914ca5961552e276dd4668a2e..525e5ce5c1236e36fe36caa8a24d7b5055a214b4 100644 (file)
@@ -37,7 +37,7 @@ public class AltosFreqList extends JComboBox {
 
                for (i = 0; i < getItemCount(); i++) {
                        AltosFrequency  f = (AltosFrequency) getItemAt(i);
-                       
+
                        if (f.close(new_frequency)) {
                                setSelectedIndex(i);
                                return;
@@ -45,7 +45,7 @@ public class AltosFreqList extends JComboBox {
                }
                for (i = 0; i < getItemCount(); i++) {
                        AltosFrequency  f = (AltosFrequency) getItemAt(i);
-                       
+
                        if (new_frequency < f.frequency)
                                break;
                }
@@ -59,7 +59,7 @@ public class AltosFreqList extends JComboBox {
        public void set_product(String new_product) {
                product = new_product;
        }
-               
+
        public void set_serial(int new_serial) {
                serial = new_serial;
        }
index 61a1a2276bdfdf493e3d0740385299cb15db9f7e..e672d1bf4e074c0175be7ca7d1baa9101e3dcc60 100644 (file)
@@ -87,7 +87,7 @@ public class AltosGraphDataPoint implements AltosUIDataPoint {
                        break;
                case data_gps_height:
                        y = state.gps_height;
-                       break;  
+                       break;
                case data_gps_nsat_solution:
                        if (state.gps != null)
                                y = state.gps.nsat;
@@ -109,7 +109,7 @@ public class AltosGraphDataPoint implements AltosUIDataPoint {
                case data_pressure:
                        y = state.pressure();
                        break;
-                       
+
                case data_accel_x:
                case data_accel_y:
                case data_accel_z:
index 40d2f7f4bc40dc83f091ba95e6250ddb740376e7..92b9b94a36ecfbe05aa093032c4289dfbb2e8b25 100644 (file)
@@ -16,7 +16,7 @@ import org.jfree.chart.ChartPanel;
 import org.jfree.chart.JFreeChart;
 import org.jfree.ui.RefineryUtilities;
 
-public class AltosGraphUI extends AltosUIFrame 
+public class AltosGraphUI extends AltosUIFrame
 {
        JTabbedPane             pane;
        AltosGraph              graph;
index 2e69249f42771db2c9d5854e5d64da8583002def..3028bb9c52125a3987024676d8212e771840ae8c 100644 (file)
@@ -486,7 +486,7 @@ public class AltosIgniteUI
                pane.add(close, c);
                close.addActionListener(this);
                close.setActionCommand("close");
-                       
+
                pack();
                setLocationRelativeTo(owner);
 
index 158b61f0bc8ab4f2e89f45075025258a9fc07e29..3242d65273a58b1bf5f4270ce4c9b0bd934d0003 100644 (file)
@@ -205,7 +205,7 @@ public class AltosInfoTable extends JTable {
                                        info_add_deg(1, "Pad longitude", state.pad_lon, 'E', 'W');
                                        info_add_row(1, "Pad GPS alt", "%6.0f m", state.pad_alt);
                                }
-                               if (state.gps.year != AltosLib.MISSING) 
+                               if (state.gps.year != AltosLib.MISSING)
                                        info_add_row(1, "GPS date", "%04d-%02d-%02d",
                                                     state.gps.year,
                                                     state.gps.month,
index 74177753c6dbfe31cd9275dd370b4e30b3170964..25d768adc8713a4dafcf511912578342b6e3f553 100644 (file)
@@ -44,7 +44,7 @@ public class AltosLanded extends JComponent implements AltosFlightDisplay, Actio
                        show();
                        value.setText(s);
                }
-               
+
                void show(AltosUnits units, double v) {
                        show(units.show(8, v));
                }
index 7baf0eb214cadac7a4361af3ee6370dfc08aa183..2844b32c4cae523c24d293e6d8735c1cefc783a0 100644 (file)
@@ -69,7 +69,7 @@ public class AltosPad extends JComponent implements AltosFlightDisplay {
                public void set_label(String text) {
                        label.setText(text);
                }
-               
+
                public LaunchStatus (GridBagLayout layout, int y, String text) {
                        GridBagConstraints      c = new GridBagConstraints();
                        c.weighty = 1;
@@ -142,7 +142,7 @@ public class AltosPad extends JComponent implements AltosFlightDisplay {
                public void set_label(String text) {
                        label.setText(text);
                }
-               
+
                void reset() {
                        value.setText("");
                }
@@ -414,7 +414,7 @@ public class AltosPad extends JComponent implements AltosFlightDisplay {
                pad_lon.set_font();
                pad_alt.set_font();
        }
-       
+
        public void show(AltosState state, AltosListenerState listener_state) {
                battery.show(state, listener_state);
                apogee.show(state, listener_state);
index e4a9336233cd93205e7ec2ba9f406c7a1a6d1943..419fe9577acc4632ef4b710552277f1583acf994 100644 (file)
@@ -34,9 +34,9 @@ class AltosScanResult {
        int             flight;
        AltosFrequency  frequency;
        int             telemetry;
-       
+
        boolean interrupted = false;
-       
+
        public String toString() {
                return String.format("%-9.9s serial %-4d flight %-4d (%s %s)",
                                     callsign, serial, flight, frequency.toShortString(), Altos.telemetry_name(telemetry));
@@ -76,7 +76,7 @@ class AltosScanResult {
 }
 
 class AltosScanResults extends LinkedList<AltosScanResult> implements ListModel {
-       
+
        LinkedList<ListDataListener>    listeners = new LinkedList<ListDataListener>();
 
        void changed(ListDataEvent de) {
@@ -107,7 +107,7 @@ class AltosScanResults extends LinkedList<AltosScanResult> implements ListModel
        public void addListDataListener(ListDataListener l) {
                listeners.add(l);
        }
-       
+
        public void removeListDataListener(ListDataListener l) {
                listeners.remove(l);
        }
@@ -221,12 +221,12 @@ public class AltosScanUI
        void set_telemetry() {
                reader.set_telemetry(telemetry);
        }
-       
+
        void set_frequency() throws InterruptedException, TimeoutException {
                reader.set_frequency(frequencies[frequency_index].frequency);
                reader.reset();
        }
-       
+
        void next() throws InterruptedException, TimeoutException {
                reader.set_monitor(false);
                Thread.sleep(100);
@@ -402,7 +402,7 @@ public class AltosScanUI
                scanning_label = new JLabel("Scanning:");
                frequency_label = new JLabel("");
                telemetry_label = new JLabel("");
-               
+
                set_label();
 
                c.fill = GridBagConstraints.HORIZONTAL;
@@ -434,7 +434,7 @@ public class AltosScanUI
                }
 
                int     y_offset = 3 + (Altos.ao_telemetry_max - Altos.ao_telemetry_min + 1);
-                               
+
                list = new JList(results) {
                                //Subclass JList to workaround bug 4832765, which can cause the
                                //scroll pane to not let the user easily scroll up to the beginning
index 105afade192ed206b3fcde8f3c688231b4da3ba8..643417b53faaff50771bffef0339ba906134d667 100644 (file)
@@ -237,7 +237,7 @@ public class AltosSiteMap extends JScrollPane implements AltosFlightDisplay {
                        AltosSiteMapTile tile = mapTiles.get(k);
                        tile.clearMap();
                }
-                       
+
                centre = getBaseLocation(lat, lng);
                scrollRocketToVisible(pt(lat,lng));
        }
index 66399557e6813289da168fd511bcc711a84e442f..8380b9673c253ec00f0954bc0e3d0beee4a0bcf3 100644 (file)
@@ -178,7 +178,7 @@ class AltosSites extends Thread {
                try {
                        URLConnection uc = url.openConnection();
                        //int length = uc.getContentLength();
-                       
+
                        InputStreamReader in_stream = new InputStreamReader(uc.getInputStream(), Altos.unicode_set);
                        BufferedReader in = new BufferedReader(in_stream);
 
@@ -222,7 +222,7 @@ public class AltosSiteMapPreload extends AltosUIDialog implements ActionListener
        AltosSites      sites;
        JLabel          site_list_label;
        JComboBox       site_list;
-               
+
        JToggleButton   load_button;
        boolean         loading;
        JButton         close_button;
@@ -347,7 +347,7 @@ public class AltosSiteMapPreload extends AltosUIDialog implements ActionListener
                pbar.setValue(0);
                pbar.setString("");
                pbar.setStringPainted(true);
-               
+
                c.fill = GridBagConstraints.HORIZONTAL;
                c.anchor = GridBagConstraints.CENTER;
                c.insets = i;
@@ -373,7 +373,7 @@ public class AltosSiteMapPreload extends AltosUIDialog implements ActionListener
                c.gridwidth = 1;
 
                pane.add(site_list_label, c);
-               
+
                site_list = new JComboBox(new String[] { "Site List" });
                site_list.addItemListener(this);
 
@@ -390,7 +390,7 @@ public class AltosSiteMapPreload extends AltosUIDialog implements ActionListener
                c.gridwidth = 1;
 
                pane.add(site_list, c);
-               
+
                lat = new AltosMapPos(owner,
                                      "Latitude:",
                                      lat_hemi_names,
@@ -407,7 +407,7 @@ public class AltosSiteMapPreload extends AltosUIDialog implements ActionListener
                c.anchor = GridBagConstraints.CENTER;
 
                pane.add(lat, c);
-               
+
                lon = new AltosMapPos(owner,
                                      "Longitude:",
                                      lon_hemi_names,
@@ -429,7 +429,7 @@ public class AltosSiteMapPreload extends AltosUIDialog implements ActionListener
                load_button = new JToggleButton("Load Map");
                load_button.addActionListener(this);
                load_button.setActionCommand("load");
-               
+
                c.fill = GridBagConstraints.NONE;
                c.anchor = GridBagConstraints.CENTER;
                c.insets = i;
@@ -446,7 +446,7 @@ public class AltosSiteMapPreload extends AltosUIDialog implements ActionListener
                close_button = new JButton("Close");
                close_button.addActionListener(this);
                close_button.setActionCommand("close");
-               
+
                c.fill = GridBagConstraints.NONE;
                c.anchor = GridBagConstraints.CENTER;
                c.insets = i;
index 5d4599476ba44bd988e0b57a1f792fe12fd5dd6f..a1bc83bf11c28c40fe2545f7e5dcd8691f37f277 100644 (file)
@@ -233,7 +233,7 @@ public class AltosUI extends AltosUIFrame {
                });
 
                setLocationByPlatform(false);
-               
+
                /* Insets aren't set before the window is visible */
                setVisible(true);
        }
@@ -468,7 +468,7 @@ public class AltosUI extends AltosUIFrame {
                }
                return false;
        }
-       
+
        static boolean process_summary(File file) {
                AltosStateIterable states = record_iterable(file);
                if (states == null)
@@ -547,7 +547,7 @@ public class AltosUI extends AltosUIFrame {
                System.out.printf("    --kml\tgenerate KML output for use with Google Earth\n");
                System.exit(code);
        }
-       
+
        public static void main(final String[] args) {
                int     errors = 0;
                load_library(null);
index 697d9902ff40bc545b48971fcf425b46e76ade25..f85735e8de583969a51839e45ffae97c80b3095f 100644 (file)
@@ -25,7 +25,7 @@ import javax.swing.filechooser.FileSystemView;
 public class AltosUIPreferencesBackend implements AltosPreferencesBackend {
 
        private Preferences _preferences = null;
-       
+
        public AltosUIPreferencesBackend() {
                _preferences = Preferences.userRoot().node("/org/altusmetrum/altosui");
        }
index 73bc0b2f5141cd117b15c0c2d7d2e3f458556bc4..0a3ddb7bf034482dc518ec57795c60e990bdffef 100644 (file)
@@ -30,7 +30,7 @@ public abstract class AltosDeviceDialog extends AltosUIDialog implements ActionL
        public Frame            frame;
        public int              product;
        public JPanel           buttonPane;
-       
+
        public AltosDevice getValue() {
                return value;
        }
index 1638ea290512fdb9d62473e9cd696d6a64686380..7bc2def9826c35fe1d509be73e3585c3dc769c39 100644 (file)
@@ -50,7 +50,7 @@ public class AltosUIAxis extends NumberAxis {
        public void set_units() {
                setLabel(String.format("%s (%s)", label, units.show_units()));
        }
-       
+
        public void set_enable(boolean enable) {
                if (enable) {
                        visible++;
index ea4bd00ab6b4874b12355e0de196ac2184a8929c..40b5f0877175d5f4906d7aefcd11146a197b2b58 100644 (file)
@@ -56,7 +56,7 @@ public class AltosUIEnable extends Container {
                        this.name = name;
                        this.grapher = grapher;
                        enable = new JRadioButton(name, enabled);
-                       grapher.set_enable(enabled);                      
+                       grapher.set_enable(enabled);
                        enable.addActionListener(this);
                }
        }
index 3fc99910d8c6f016d4770311146cf923dc7345b0..3dc2a0ad3f43e8d8110e0605b89d825589e227ad 100644 (file)
@@ -45,7 +45,7 @@ public class AltosUIFrame extends JFrame implements AltosUIListener, AltosPositi
        };
 
        static public String[] icon_names;
-       
+
        static public void set_icon_names(String[] new_icon_names) { icon_names = new_icon_names; }
 
        public String[] icon_names() {
@@ -57,7 +57,7 @@ public class AltosUIFrame extends JFrame implements AltosUIListener, AltosPositi
        public void set_icon() {
                ArrayList<Image> icons = new ArrayList<Image>();
                String[] icon_names = icon_names();
-               
+
                for (int i = 0; i < icon_names.length; i++) {
                        java.net.URL imgURL = AltosUIFrame.class.getResource(icon_names[i]);
                        if (imgURL != null)
@@ -65,14 +65,14 @@ public class AltosUIFrame extends JFrame implements AltosUIListener, AltosPositi
                }
                setIconImages(icons);
        }
-                       
+
        private boolean location_by_platform = true;
 
        public void setLocationByPlatform(boolean lbp) {
                location_by_platform = lbp;
                super.setLocationByPlatform(lbp);
        }
-               
+
        public void setSize() {
                /* Smash sizes around so that the window comes up in the right shape */
                Insets i = getInsets();
@@ -153,7 +153,7 @@ public class AltosUIFrame extends JFrame implements AltosUIListener, AltosPositi
                                setPosition(position);
                }
        }
-               
+
        void init() {
                AltosUIPreferences.register_ui_listener(this);
                AltosUIPreferences.register_position_listener(this);
index 061a76295a0b0fd5214ada2b6cfee4ea8b489cce..21e13cf645353e425bb1ce982b505bcb32cebc97 100644 (file)
@@ -82,7 +82,7 @@ public class AltosUIGraph implements AltosUnitsListener {
        public void addSeries(String label, int fetch, AltosUnits units, Color color) {
                addSeries(label, fetch, units, color, true, newAxis(label, units, color));
        }
-       
+
        public void addMarker(String label, int fetch, Color color) {
                AltosUIMarker           marker = new AltosUIMarker(fetch, color, plot);
                if (enable != null)
@@ -131,7 +131,7 @@ public class AltosUIGraph implements AltosUnitsListener {
                this.axis_index = 0;
 
                xAxis = new NumberAxis("Time (s)");
-               
+
                xAxis.setAutoRangeIncludesZero(true);
 
                plot = new XYPlot();
index 23e7d9f09ccdfc39437208b2046f9d68ed4c4d8a..54f8d5a9b869995cff379342c4d0afe891ede2ac 100644 (file)
@@ -37,7 +37,7 @@ import org.jfree.data.*;
 interface AltosUIGrapher {
 
        public abstract void set_units();
-       
+
        public abstract void clear();
 
        public abstract void add(AltosUIDataPoint dataPoint);
index ae8eb0344ae6a6e7aa29516731e3520523dcba43..efd279219772df54a1bf334b431d85f0d631a405 100644 (file)
@@ -41,7 +41,7 @@ public class AltosUIMarker implements AltosUIGrapher {
        boolean                 enabled;
        int                     fetch;
        Color                   color;
-       
+
        private void remove_markers() {
                for (ValueMarker marker : markers)
                        plot.removeDomainMarker(marker);
index 64d3e3dfa8b184d4174670e8f5e2cc1262732f68..d6575717d1de312168b1c34b4dd0a4d9b42d3428 100644 (file)
@@ -25,7 +25,7 @@ import javax.swing.filechooser.FileSystemView;
 public class AltosUIPreferencesBackend implements AltosPreferencesBackend {
 
        private Preferences _preferences = null;
-       
+
        public AltosUIPreferencesBackend() {
                _preferences = Preferences.userRoot().node("/org/altusmetrum/altosui");
        }
index 1f2a1c3f6a18c528a5ebd70802283ec0e3bfdb17..c17175e41017a293ae64a4d15b7fd6a77a9f0bda 100644 (file)
@@ -38,7 +38,7 @@ class AltosUITime extends AltosUnits {
        public double value(double v, boolean imperial_units) { return v; }
 
        public double inverse(double v, boolean imperial_unis) { return v; }
-       
+
        public String show_units(boolean imperial_units) { return "s"; }
 
        public String say_units(boolean imperial_units) { return "seconds"; }
@@ -60,7 +60,7 @@ public class AltosUISeries extends XYSeries implements AltosUIGrapher {
        XYItemRenderer  renderer;
        int             fetch;
        boolean         enable;
-       
+
        public void set_units() {
                axis.set_units();
                StandardXYToolTipGenerator      ttg;
index a623d5ae0b5c187f9b0c5a7bec962b1c73e2451d..b7ec98fc58f5c17994c523955b4e20c6d680f23d 100644 (file)
@@ -817,7 +817,7 @@ get_string(io_object_t object, CFStringRef entry, char *result, int result_len)
                got_string = CFStringGetCString(entry_as_string,
                                                result, result_len,
                                                kCFStringEncodingASCII);
-    
+
                CFRelease(entry_as_string);
                if (got_string)
                        return 1;
@@ -830,7 +830,7 @@ get_number(io_object_t object, CFStringRef entry, int *result)
 {
        CFTypeRef entry_as_number;
        Boolean got_number;
-       
+
        entry_as_number = IORegistryEntrySearchCFProperty (object,
                                                           kIOServicePlane,
                                                           entry,
@@ -885,7 +885,7 @@ altos_list_next(struct altos_list *list, struct altos_device *device)
                object = IOIteratorNext(list->iterator);
                if (!object)
                        return 0;
-  
+
                if (!get_number (object, CFSTR(kUSBVendorID), &device->vendor) ||
                    !get_number (object, CFSTR(kUSBProductID), &device->product))
                        continue;
@@ -989,7 +989,7 @@ log_message(char *fmt, ...)
        if (log) {
                SYSTEMTIME time;
                GetLocalTime(&time);
-               fprintf (log, "%4d-%02d-%02d %2d:%02d:%02d. ", 
+               fprintf (log, "%4d-%02d-%02d %2d:%02d:%02d. ",
                         time.wYear, time.wMonth, time.wDay,
                         time.wHour, time.wMinute, time.wSecond);
                va_start(a, fmt);
@@ -1340,7 +1340,7 @@ altos_open(struct altos_device *device)
                altos_set_last_windows_error();
                Sleep(100);
        }
-       
+
        if (file->handle == INVALID_HANDLE_VALUE) {
                free(file);
                return NULL;