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 0410107..163ffad 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 6ce7ddd..fe5bf6c 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 b8a1b9e..35e8788 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 f1bca6d..d13aac4 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 37bf707..79f6f1c 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 02cb7a9..b0e4579 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 05f0af8..3f25bc3 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 97fa706..469b03c 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 d2bb9da..a3a0a74 100644 (file)
@@ -87,4 +87,3 @@ public class AltosMag implements Cloneable {
                }
        }
 }
-       
\ No newline at end of file
index 97d08c3..4a85152 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 b8920d2..484cb64 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 aefc6fb..a141412 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 1273fbc..506c396 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 aae993e..051aa76 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 b8f54bc..a512978 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 cc5718a..bb60a79 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 5a919b6..7ea3041 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 01bedd5..1c4ce7b 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 09d7d3f..f664313 100644 (file)
@@ -62,7 +62,7 @@ public class AltosTelemetryFile extends AltosStateIterable {
        }
 
        public void write(PrintStream out) {
-               
+
        }
 
        public AltosTelemetryFile(FileInputStream input) {
index d302add..da9296e 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 a4df70b..ffd8254 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 d1a463c..d9fd7fd 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 01252bd..24777b2 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 e573a43..82f102e 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 36871dd..81b08d2 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 4cc6c46..b90240f 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 e9923a3..5877805 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 b14c39a..b667b15 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 3ce0d98..55d6aed 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 5e42f43..631c188 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 d137908..cd993a7 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 ceabe84..ca34357 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 2a33f99..ab85607 100644 (file)
@@ -155,7 +155,7 @@ public class AltosDisplayThread extends Thread {
                                                        wait(sleep_time);
                                                }
                                        }
-                                       
+
                                        report(false);
                                }
                        } catch (InterruptedException ie) {
index 793a8af..ff9cb95 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 cb0c156..da71154 100644 (file)
@@ -140,5 +140,5 @@ public class AltosFlightStatsTable extends JComponent {
                                       pos(stats.lon,"E","W"));
                }
        }
-       
+
 }
\ No newline at end of file
index aac4c9b..0d21d29 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 039b5f2..525e5ce 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 61a1a22..e672d1b 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 40d2f7f..92b9b94 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 2e69249..3028bb9 100644 (file)
@@ -486,7 +486,7 @@ public class AltosIgniteUI
                pane.add(close, c);
                close.addActionListener(this);
                close.setActionCommand("close");
-                       
+
                pack();
                setLocationRelativeTo(owner);
 
index 158b61f..3242d65 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 7417775..25d768a 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 7baf0eb..2844b32 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 e4a9336..419fe95 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 105afad..643417b 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 6639955..8380b96 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 5d45994..a1bc83b 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 697d990..f85735e 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 73bc0b2..0a3ddb7 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 1638ea2..7bc2def 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 ea4bd00..40b5f08 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 3fc9991..3dc2a0a 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 061a762..21e13cf 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 23e7d9f..54f8d5a 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 ae8eb03..efd2792 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 64d3e3d..d657571 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 1f2a1c3..c17175e 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 a623d5a..b7ec98f 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;