From 31beeb0882d27cbc05e28118611feec4ae43d9da Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 16 Jun 2014 11:02:49 -0700 Subject: doc: Add instructions for flash recovery technique The flash recovery section explained which pins to connect, but lacked explicit instructions on how to make it work. --- doc/altusmetrum.xsl | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/doc/altusmetrum.xsl b/doc/altusmetrum.xsl index 5ccbee9f..fb8fe7e1 100644 --- a/doc/altusmetrum.xsl +++ b/doc/altusmetrum.xsl @@ -4347,6 +4347,50 @@ NAR #88757, TRA #12200 + + Once you've located the right pins: + + + + + Turn the altimeter power off. + + + + + Connect a battery. + + + + + Connect the indicated terminals together with a short + piece of wire. Take care not to accidentally connect + anything else. + + + + + Connect USB + + + + + Turn the board power on. + + + + + The board should now be visible over USB as 'AltosFlash' + and be ready to receive firmware. + + + + + Once the board has been powered up, you can remove the + piece of wire. + + +
-- cgit v1.2.3 From 6579e4cae8fea65780f1c4677f29c1fc17ca41e2 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 16 Jun 2014 15:59:09 -0700 Subject: altos/micropeak: Create a script to load firmware. The micropeak-load script flashes micropeak with firmware from whatever directory it is sitting in. A 'publish' target in the source directory copies the script and hex to ~/altusmetrumllc/Binaries Signed-off-by: Keith Packard --- src/micropeak/Makefile | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/src/micropeak/Makefile b/src/micropeak/Makefile index 6ae3d0be..ac00f635 100644 --- a/src/micropeak/Makefile +++ b/src/micropeak/Makefile @@ -8,8 +8,15 @@ vpath make-altitude-pa ../util include ../avr/Makefile.defs +PROGNAME=micropeak-v0.1 +PROG=$(PROGNAME)-$(VERSION).elf +HEX=$(PROGNAME)-$(VERSION).ihx + +SCRIPT=micropeak-load + PUBLISH_DIR=$(HOME)/altusmetrumllc/Binaries -PUBLISH_FILE=$(PUBLISH_DIR)/$(PROG)-$(VERSION).hex +PUBLISH_HEX=$(PUBLISH_DIR)/$(HEX) +PUBLISH_SCRIPT=$(PUBLISH_DIR)/$(SCRIPT) MCU=attiny85 DUDECPUTYPE=t85 @@ -55,8 +62,6 @@ CFLAGS += -g -mmcu=$(MCU) -Wall -Wstrict-prototypes -O2 -mcall-prologues -DATTIN NICKLE=nickle -PROG=micropeak-v0.1 - SRC=$(ALTOS_SRC) OBJ=$(SRC:.c=.o) @@ -68,7 +73,7 @@ endif # Otherwise, print the full command line. quiet ?= $($1) -all: $(PROG) $(PROG).hex +all: $(PROG) $(HEX) micropeak-load CHECK=sh ../util/check-avr-mem @@ -76,16 +81,16 @@ $(PROG): Makefile $(OBJ) $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ) $(call quiet,CHECK) $(PROG) || ($(RM) -f $(PROG); exit 1) -$(PROG).hex: $(PROG) +$(HEX): $(PROG) avr-size $(PROG) $(OBJCOPY) -R .eeprom -O ihex $(PROG) $@ -load: $(PROG).hex - $(LOADCMD) $(LOADARG)$(PROG).hex +load: $(HEX) + $(LOADCMD) $(LOADARG)$(HEX) -load-slow: $(PROG).hex - $(LOADCMD) $(LOADSLOW) $(LOADARG)$(PROG).hex +load-slow: $(HEX) + $(LOADCMD) $(LOADSLOW) $(LOADARG)$(HEX) ao_product.h: ao-make-product.5c ../Version $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@ @@ -98,22 +103,30 @@ ao_product.o: ao_product.c ao_product.h distclean: clean clean: - rm -f *.o $(PROG) $(PROG).hex + rm -f *.o $(PROG) $(HEX) $(SCRIPT) rm -f ao_product.h +publish: $(PUBLISH_HEX) $(PUBLISH_SCRIPT) -publish: $(PROG).hex - cp -a $(PROG).hex $(PUBLISH_FILE) +$(PUBLISH_HEX): $(HEX) + cp -a $(HEX) $@ + +$(PUBLISH_SCRIPT): $(SCRIPT) + cp -a $(SCRIPT) $@ load-product: - $(LOADCMD) $(LOADARG)$(PUBLISH_FILE) + ./$(SCRIPT) fast load-product-slow: - $(LOADCMD) $(LOADSLOW) $(LOADARG)$(PUBLISH_FILE) + ./$(SCRIPT) slow ../altitude-pa.h: make-altitude-pa nickle $< > $@ +$(SCRIPT): $(SCRIPT).tmpl Makefile ../Version + sed -e 's/%HEX%/$(HEX)/' -e 's/%LOADCMD%/$(LOADCMD)/' -e 's/%LOADARG%/$(LOADARG)/' -e 's/%LOADSLOW%/$(LOADSLOW)/' $(SCRIPT).tmpl > $@ || (rm $@ && exit 1) + chmod +x $@ + install: uninstall: -- cgit v1.2.3 From e612693e33ef3b0e22db0656792992fa6e961ff2 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 16 Jun 2014 21:57:35 -0700 Subject: altosui/telegps: Use menus for frequency list and telemetry formats This will let us move them into the Mac OS X menu bar, as well as making them look a bit nicer. Signed-off-by: Keith Packard --- altoslib/AltosFrequency.java | 2 +- altosui/AltosFlightUI.java | 57 +++++----------- altosuilib/AltosFreqList.java | 124 ++++++++++++++++++++++++++++++----- altosuilib/AltosUITelemetryMenu.java | 88 +++++++++++++++++++++++++ altosuilib/Makefile.am | 3 +- telegps/TeleGPS.java | 17 +++-- 6 files changed, 225 insertions(+), 66 deletions(-) create mode 100644 altosuilib/AltosUITelemetryMenu.java diff --git a/altoslib/AltosFrequency.java b/altoslib/AltosFrequency.java index 7c291ea9..d1ab847b 100644 --- a/altoslib/AltosFrequency.java +++ b/altoslib/AltosFrequency.java @@ -41,4 +41,4 @@ public class AltosFrequency { frequency = f; description = d; } -} \ No newline at end of file +} diff --git a/altosui/AltosFlightUI.java b/altosui/AltosFlightUI.java index 43deb631..2e192c73 100644 --- a/altosui/AltosFlightUI.java +++ b/altosui/AltosFlightUI.java @@ -170,13 +170,17 @@ public class AltosFlightUI extends AltosUIFrame implements AltosFlightDisplay { } Container bag; - AltosFreqList frequencies; - JComboBox telemetries; - JLabel telemetry; + + JMenuBar menu_bar; + AltosFreqList frequencies; + AltosUITelemetryMenu telemetries; + JLabel telemetry; ActionListener show_timer; public AltosFlightUI(AltosVoice in_voice, AltosFlightReader in_reader, final int serial) { + super(); + AltosUIPreferences.set_component(this); displays = new LinkedList(); @@ -193,6 +197,10 @@ public class AltosFlightUI extends AltosUIFrame implements AltosFlightDisplay { /* Stick channel selector at top of table for telemetry monitoring */ if (serial >= 0) { + + menu_bar = new JMenuBar(); + setJMenuBar(menu_bar); + // Channel menu frequencies = new AltosFreqList(AltosUIPreferences.frequency(serial)); frequencies.set_product("Monitor"); @@ -208,43 +216,19 @@ public class AltosFlightUI extends AltosUIFrame implements AltosFlightDisplay { reader.save_frequency(); } }); - c.gridx = 0; - c.gridy = 0; - c.weightx = 0; - c.weighty = 0; - c.insets = new Insets(3, 3, 3, 3); - c.fill = GridBagConstraints.NONE; - c.anchor = GridBagConstraints.WEST; - bag.add (frequencies, c); + menu_bar.add (frequencies); // Telemetry format menu - if (reader.supports_telemetry(Altos.ao_telemetry_standard)) { - telemetries = new JComboBox(); - 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 || - telemetry > Altos.ao_telemetry_max) - telemetry = Altos.ao_telemetry_standard; - telemetries.setSelectedIndex(telemetry - 1); - telemetries.setMaximumRowCount(Altos.ao_telemetry_max); - telemetries.setPreferredSize(null); - telemetries.revalidate(); + if (reader.supports_telemetry(AltosLib.ao_telemetry_standard)) { + telemetries = new AltosUITelemetryMenu(serial); telemetries.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - int telemetry = telemetries.getSelectedIndex() + 1; + int telemetry = telemetries.get_selected(); reader.set_telemetry(telemetry); reader.save_telemetry(); } }); - c.gridx = 1; - c.gridy = 0; - c.weightx = 0; - c.weighty = 0; - c.fill = GridBagConstraints.NONE; - c.anchor = GridBagConstraints.WEST; - bag.add (telemetries, c); - c.insets = new Insets(0, 0, 0, 0); + menu_bar.add(telemetries); } else { String version; @@ -256,14 +240,7 @@ public class AltosFlightUI extends AltosUIFrame implements AltosFlightDisplay { version = "Telemetry: None"; telemetry = new JLabel(version); - c.gridx = 1; - c.gridy = 0; - c.weightx = 0; - c.weighty = 0; - c.fill = GridBagConstraints.NONE; - c.anchor = GridBagConstraints.WEST; - bag.add (telemetry, c); - c.insets = new Insets(0, 0, 0, 0); + menu_bar.add(telemetry); } } diff --git a/altosuilib/AltosFreqList.java b/altosuilib/AltosFreqList.java index e1299aae..b985d472 100644 --- a/altosuilib/AltosFreqList.java +++ b/altosuilib/AltosFreqList.java @@ -17,15 +17,113 @@ package org.altusmetrum.altosuilib_2; +import java.util.*; import javax.swing.*; +import java.awt.event.*; import org.altusmetrum.altoslib_4.*; -public class AltosFreqList extends JComboBox { +class FreqEntry extends JMenuItem { + AltosFrequency frequency; + + public FreqEntry(AltosFrequency frequency) { + super(frequency.toShortString()); + this.frequency = frequency; + } +} + +public class AltosFreqList extends JMenu implements ActionListener { String product; int serial; int calibrate; + AltosFrequency[] frequencies = new AltosFrequency[0]; + + int selected = -1; + + LinkedList action_listeners = new LinkedList(); + + public void addActionListener(ActionListener listener) { + action_listeners.add(listener); + } + + public void removeActionListener(ActionListener listener) { + action_listeners.remove(listener); + } + + public void actionPerformed(ActionEvent ev) { + FreqEntry e = (FreqEntry) ev.getSource(); + set_selected(e.frequency); + ActionEvent event = new ActionEvent(e.frequency, 0, "selected"); + for (ActionListener l : action_listeners) + l.actionPerformed(event); + } + + private void set_selected(AltosFrequency frequency) { + for (int i = 0; i < frequencies.length; i++) { + if (frequencies[i].frequency == frequency.frequency) { + selected = i; + String new_text = String.format("Frequency: %7.3f MHz (%s) ▾", + frequency.frequency, + frequency.description); + setText(new_text); + } + } + } + + private AltosFrequency get_selected() { + if (0 <= selected && selected < frequencies.length) + return frequencies[selected]; + return null; + } + + private void add(AltosFrequency add) { + int insert; + + for (insert = 0; insert < frequencies.length; insert++) { + if (frequencies[insert].frequency == add.frequency) + return; + if (add.frequency < frequencies[insert].frequency) + break; + } + + AltosFrequency[] new_frequencies = new AltosFrequency[frequencies.length + 1]; + + for (int before = 0; before < insert; before++) + new_frequencies[before] = frequencies[before]; + new_frequencies[insert] = add; + + for (int after = insert; after < frequencies.length; after++) + new_frequencies[after+1] = frequencies[after]; + + frequencies = new_frequencies; + + FreqEntry e = new FreqEntry(add); + add(e, insert); + e.addActionListener(this); + } + + private void remove(AltosFrequency remove) { + int delete; + for (delete = 0; delete < frequencies.length; delete++) { + if (frequencies[delete].frequency == remove.frequency) + break; + if (remove.frequency < frequencies[delete].frequency) + return; + } + + remove(delete); + + AltosFrequency[] new_frequencies = new AltosFrequency[frequencies.length - 1]; + + for (int before = 0; before < delete; before++) + new_frequencies[before] = frequencies[before]; + + for (int after = delete + 1; after < frequencies.length; after++) + new_frequencies[after-1] = frequencies[after]; + frequencies = new_frequencies; + } + public void set_frequency(double new_frequency) { int i; @@ -34,25 +132,21 @@ public class AltosFreqList extends JComboBox { return; } - for (i = 0; i < getItemCount(); i++) { - AltosFrequency f = (AltosFrequency) getItemAt(i); + for (i = 0; i < frequencies.length; i++) { + AltosFrequency f = frequencies[i]; if (f.close(new_frequency)) { - setSelectedIndex(i); + set_selected(f); return; } } - for (i = 0; i < getItemCount(); i++) { - AltosFrequency f = (AltosFrequency) getItemAt(i); - if (new_frequency < f.frequency) - break; - } String description = String.format("%s serial %d", product, serial); AltosFrequency frequency = new AltosFrequency(new_frequency, description); AltosUIPreferences.add_common_frequency(frequency); - insertItemAt(frequency, i); - setMaximumRowCount(getItemCount()); + + add(frequency); + set_selected(frequency); } public void set_product(String new_product) { @@ -64,16 +158,16 @@ public class AltosFreqList extends JComboBox { } public double frequency() { - AltosFrequency f = (AltosFrequency) getSelectedItem(); + AltosFrequency f = get_selected(); if (f != null) return f.frequency; return 434.550; } public AltosFreqList () { - super(AltosUIPreferences.common_frequencies()); - setMaximumRowCount(getItemCount()); - setEditable(false); + super(); + for (AltosFrequency frequency: AltosUIPreferences.common_frequencies()) + add(frequency); product = "Unknown"; serial = 0; } diff --git a/altosuilib/AltosUITelemetryMenu.java b/altosuilib/AltosUITelemetryMenu.java new file mode 100644 index 00000000..fc4a91c5 --- /dev/null +++ b/altosuilib/AltosUITelemetryMenu.java @@ -0,0 +1,88 @@ +/* + * Copyright © 2014 Keith Packard + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ + +package org.altusmetrum.altosuilib_2; + +import java.util.*; +import javax.swing.*; +import java.awt.event.*; +import org.altusmetrum.altoslib_4.*; + +class TelemetryMenuItem extends JMenuItem { + public int telemetry; + + public TelemetryMenuItem (int telemetry) { + super(AltosLib.telemetry_name(telemetry)); + this.telemetry = telemetry; + } +} + +public class AltosUITelemetryMenu extends JMenu implements ActionListener { + TelemetryMenuItem selected = null; + + public int get_selected() { + if (selected == null) + return AltosLib.ao_telemetry_off; + return selected.telemetry; + } + + public void set_selected(int telemetry) { + for (int i = 0; i < getItemCount(); i++) { + TelemetryMenuItem item = (TelemetryMenuItem) getItem(i); + if (item.telemetry == telemetry) { + selected = item; + String new_text = String.format("Format: %s ▾", AltosLib.telemetry_name(telemetry)); + setText(new_text); + break; + } + } + } + + private LinkedList action_listeners = new LinkedList(); + + public void addActionListener(ActionListener l) { + action_listeners.add(l); + } + + public void removeActionListener(ActionListener l) { + action_listeners.remove(l); + } + + public void actionPerformed(ActionEvent e) { + TelemetryMenuItem item = (TelemetryMenuItem) e.getSource(); + set_selected(item.telemetry); + ActionEvent my_e = new ActionEvent(selected, 0, "selected"); + for (ActionListener l : action_listeners) + l.actionPerformed(my_e); + } + + public AltosUITelemetryMenu(int serial) { + super(); + for (int i = AltosLib.ao_telemetry_min; i <= AltosLib.ao_telemetry_max; i++) { + TelemetryMenuItem item = new TelemetryMenuItem(i); + + item.addActionListener(this); + add(item); + } + + int telemetry = AltosPreferences.telemetry(serial); + if (telemetry < AltosLib.ao_telemetry_min || AltosLib.ao_telemetry_max < telemetry) + telemetry = AltosLib.ao_telemetry_standard; + set_selected(telemetry); + } +} + diff --git a/altosuilib/Makefile.am b/altosuilib/Makefile.am index e08fbe74..157cd5e8 100644 --- a/altosuilib/Makefile.am +++ b/altosuilib/Makefile.am @@ -80,7 +80,8 @@ altosuilib_JAVA = \ AltosUIFlightTab.java \ AltosUIIndicator.java \ AltosUIUnitsIndicator.java \ - AltosUIVoltageIndicator.java + AltosUIVoltageIndicator.java \ + AltosUITelemetryMenu.java JAR=altosuilib_$(ALTOSUILIB_VERSION).jar diff --git a/telegps/TeleGPS.java b/telegps/TeleGPS.java index 6e68dd30..646495b6 100644 --- a/telegps/TeleGPS.java +++ b/telegps/TeleGPS.java @@ -351,17 +351,18 @@ public class TeleGPS frequencies.set_product("Monitor"); frequencies.set_serial(serial); frequencies.set_frequency(AltosUIPreferences.frequency(serial)); - frequencies.setEnabled(true); + menu_bar.add(frequencies); + menu_bar.repaint(); } void disable_frequency_menu() { - if (frequency_listener != null) { - frequencies.removeActionListener(frequency_listener); - frequencies.setEnabled(false); - frequency_listener = null; - } - + if (frequency_listener == null) + return; + frequencies.removeActionListener(frequency_listener); + menu_bar.remove(frequencies); + menu_bar.repaint(); + frequency_listener = null; } public void set_reader(AltosFlightReader reader, AltosDevice device) { @@ -435,8 +436,6 @@ public class TeleGPS monitor_menu = make_menu("Monitor", monitor_menu_entries); device_menu = make_menu("Device", device_menu_entries); frequencies = new AltosFreqList(); - frequencies.setEnabled(false); - menu_bar.add(frequencies); displays = new LinkedList(); -- cgit v1.2.3 From ed38b1b596062b2232fa78a3181f6eaf5818b651 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 16 Jun 2014 21:58:13 -0700 Subject: altosuilib: Move menu bars into the Mac OS X top bar Setting these properties causes the top menu bar to get placed into the Mac OS X window system menu bar Signed-off-by: Keith Packard --- altosuilib/AltosUIFrame.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/altosuilib/AltosUIFrame.java b/altosuilib/AltosUIFrame.java index 6e62c762..2de1fb1c 100644 --- a/altosuilib/AltosUIFrame.java +++ b/altosuilib/AltosUIFrame.java @@ -157,11 +157,28 @@ public class AltosUIFrame extends JFrame implements AltosUIListener, AltosPositi } } + static boolean global_settings_done; + + public String getName() { + return "Altus Metrum"; + } + void init() { AltosUIPreferences.register_ui_listener(this); AltosUIPreferences.register_position_listener(this); position = AltosUIPreferences.position(); addWindowListener(new AltosUIFrameListener()); + + /* Try to make menus live in the menu bar like regular Mac apps */ + if (!global_settings_done) { + try { + global_settings_done = true; + System.setProperty("com.apple.mrj.application.apple.menu.about.name", getName()); + System.setProperty("com.apple.macos.useScreenMenuBar", "true"); + System.setProperty( "apple.laf.useScreenMenuBar", "true" ); // for older versions of Java + } catch (Exception e) { + } + } set_icon(); } -- cgit v1.2.3 From 75766b0e7ee30fb3bfbf90ecb68f7758bac6eeba Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 16 Jun 2014 22:48:25 -0700 Subject: altosui: Fix ground station configure frequency list Fix the API to match the switch to a menu, wrap in a menu bar to make it work. Signed-off-by: Keith Packard --- altosui/AltosConfigTDUI.java | 30 ++++++------------------------ altosuilib/AltosFreqList.java | 43 +++++++++++++++++++++++++++++++++++-------- 2 files changed, 41 insertions(+), 32 deletions(-) diff --git a/altosui/AltosConfigTDUI.java b/altosui/AltosConfigTDUI.java index 22b3384d..955c7dab 100644 --- a/altosui/AltosConfigTDUI.java +++ b/altosui/AltosConfigTDUI.java @@ -44,6 +44,7 @@ public class AltosConfigTDUI JLabel product_value; JLabel version_value; JLabel serial_value; + JMenuBar radio_frequency_menu_bar; AltosFreqList radio_frequency_value; JLabel radio_calibration_value; @@ -166,9 +167,11 @@ public class AltosConfigTDUI c.anchor = GridBagConstraints.LINE_START; c.insets = ir; c.ipady = 5; - radio_frequency_value = new AltosFreqList(); + radio_frequency_value = new AltosFreqList(false); radio_frequency_value.addItemListener(this); - pane.add(radio_frequency_value, c); + radio_frequency_menu_bar = new JMenuBar(); + radio_frequency_menu_bar.add(radio_frequency_value); + pane.add(radio_frequency_menu_bar, c); radio_frequency_value.setToolTipText("Telemetry, RDF and packet frequency"); /* Radio Calibration */ @@ -308,28 +311,7 @@ public class AltosConfigTDUI } public void set_radio_frequency(double new_radio_frequency) { - 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; - } - } - for (i = 0; i < radio_frequency_value.getItemCount(); i++) { - AltosFrequency f = (AltosFrequency) radio_frequency_value.getItemAt(i); - - if (new_radio_frequency < f.frequency) - break; - } - String description = String.format("%s serial %s", - product_value.getText(), - serial_value.getText()); - AltosFrequency new_frequency = new AltosFrequency(new_radio_frequency, description); - AltosPreferences.add_common_frequency(new_frequency); - radio_frequency_value.insertItemAt(new_frequency, i); - radio_frequency_value.setSelectedIndex(i); + radio_frequency_value.set_frequency(new_radio_frequency); } public double radio_frequency() { diff --git a/altosuilib/AltosFreqList.java b/altosuilib/AltosFreqList.java index b985d472..a4c3e36a 100644 --- a/altosuilib/AltosFreqList.java +++ b/altosuilib/AltosFreqList.java @@ -59,14 +59,30 @@ public class AltosFreqList extends JMenu implements ActionListener { l.actionPerformed(event); } + boolean label = true; + + public void set_label(boolean label) { + this.label = label; + set_label(); + } + + private void set_label() { + String new_text = ""; + if (0 <= selected && selected < frequencies.length) { + AltosFrequency frequency = frequencies[selected]; + new_text = String.format("%s%7.3f MHz (%s) ▾", + label ? "Frequency: " : "", + frequency.frequency, + frequency.description); + } + setText(new_text); + } + private void set_selected(AltosFrequency frequency) { for (int i = 0; i < frequencies.length; i++) { if (frequencies[i].frequency == frequency.frequency) { selected = i; - String new_text = String.format("Frequency: %7.3f MHz (%s) ▾", - frequency.frequency, - frequency.description); - setText(new_text); + set_label(); } } } @@ -164,16 +180,27 @@ public class AltosFreqList extends JMenu implements ActionListener { return 434.550; } - public AltosFreqList () { + public AltosFreqList(double in_frequency, boolean label) { super(); + this.label = label; + for (AltosFrequency frequency: AltosUIPreferences.common_frequencies()) add(frequency); product = "Unknown"; serial = 0; - } + if (in_frequency != 0) + set_frequency(in_frequency); + } public AltosFreqList(double in_frequency) { - this(); - set_frequency(in_frequency); + this(in_frequency, true); + } + + public AltosFreqList (boolean label) { + this(0, label); + } + + public AltosFreqList () { + this(0, true); } } -- cgit v1.2.3 From c8078d352a7f54a4a97d25af080155d3f875536a Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 16 Jun 2014 22:49:34 -0700 Subject: java: Bump java library versions for next release Prepare for future release by bumping java versions now Signed-off-by: Keith Packard --- altosdroid/src/org/altusmetrum/AltosDroid/AltosBluetooth.java | 2 +- altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java | 2 +- .../src/org/altusmetrum/AltosDroid/AltosDroidPreferences.java | 2 +- altosdroid/src/org/altusmetrum/AltosDroid/AltosDroidTab.java | 2 +- altosdroid/src/org/altusmetrum/AltosDroid/AltosVoice.java | 2 +- altosdroid/src/org/altusmetrum/AltosDroid/TabAscent.java | 2 +- altosdroid/src/org/altusmetrum/AltosDroid/TabDescent.java | 2 +- altosdroid/src/org/altusmetrum/AltosDroid/TabLanded.java | 2 +- altosdroid/src/org/altusmetrum/AltosDroid/TabMap.java | 2 +- altosdroid/src/org/altusmetrum/AltosDroid/TabPad.java | 2 +- altosdroid/src/org/altusmetrum/AltosDroid/TelemetryLogger.java | 2 +- altosdroid/src/org/altusmetrum/AltosDroid/TelemetryReader.java | 2 +- altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java | 2 +- altoslib/AltosAccel.java | 2 +- altoslib/AltosCRCException.java | 2 +- altoslib/AltosCSV.java | 2 +- altoslib/AltosCompanion.java | 2 +- altoslib/AltosConfigData.java | 2 +- altoslib/AltosConfigDataException.java | 2 +- altoslib/AltosConfigValues.java | 2 +- altoslib/AltosConvert.java | 2 +- altoslib/AltosDebug.java | 2 +- altoslib/AltosDistance.java | 2 +- altoslib/AltosEeprom.java | 2 +- altoslib/AltosEepromChunk.java | 2 +- altoslib/AltosEepromDownload.java | 2 +- altoslib/AltosEepromFile.java | 2 +- altoslib/AltosEepromGPS.java | 2 +- altoslib/AltosEepromHeader.java | 2 +- altoslib/AltosEepromIterable.java | 2 +- altoslib/AltosEepromList.java | 2 +- altoslib/AltosEepromLog.java | 2 +- altoslib/AltosEepromMega.java | 2 +- altoslib/AltosEepromMetrum2.java | 2 +- altoslib/AltosEepromMini.java | 2 +- altoslib/AltosEepromMonitor.java | 2 +- altoslib/AltosEepromTM.java | 2 +- altoslib/AltosEepromTm.java | 2 +- altoslib/AltosFile.java | 2 +- altoslib/AltosFlash.java | 2 +- altoslib/AltosFlashListener.java | 2 +- altoslib/AltosFlightReader.java | 2 +- altoslib/AltosFlightStats.java | 2 +- altoslib/AltosFrequency.java | 2 +- altoslib/AltosGPS.java | 2 +- altoslib/AltosGPSSat.java | 2 +- altoslib/AltosGreatCircle.java | 2 +- altoslib/AltosHeight.java | 2 +- altoslib/AltosHexfile.java | 2 +- altoslib/AltosHexsym.java | 2 +- altoslib/AltosIMU.java | 2 +- altoslib/AltosIdle.java | 2 +- altoslib/AltosIdleFetch.java | 2 +- altoslib/AltosIdleMonitor.java | 2 +- altoslib/AltosIdleMonitorListener.java | 2 +- altoslib/AltosIgnite.java | 2 +- altoslib/AltosKML.java | 2 +- altoslib/AltosLatitude.java | 2 +- altoslib/AltosLib.java | 2 +- altoslib/AltosLine.java | 2 +- altoslib/AltosLink.java | 2 +- altoslib/AltosListenerState.java | 2 +- altoslib/AltosLocation.java | 2 +- altoslib/AltosLog.java | 2 +- altoslib/AltosLongitude.java | 2 +- altoslib/AltosMag.java | 2 +- altoslib/AltosMma655x.java | 2 +- altoslib/AltosMs5607.java | 2 +- altoslib/AltosNoSymbol.java | 2 +- altoslib/AltosOrient.java | 2 +- altoslib/AltosParse.java | 2 +- altoslib/AltosPreferences.java | 2 +- altoslib/AltosPreferencesBackend.java | 2 +- altoslib/AltosProgrammer.java | 2 +- altoslib/AltosPyro.java | 2 +- altoslib/AltosReplayReader.java | 2 +- altoslib/AltosRomconfig.java | 2 +- altoslib/AltosSelfFlash.java | 2 +- altoslib/AltosSensorEMini.java | 2 +- altoslib/AltosSensorMM.java | 2 +- altoslib/AltosSensorMega.java | 2 +- altoslib/AltosSensorMetrum.java | 2 +- altoslib/AltosSensorTM.java | 2 +- altoslib/AltosSensorTMini.java | 2 +- altoslib/AltosSpeed.java | 2 +- altoslib/AltosState.java | 2 +- altoslib/AltosStateIterable.java | 2 +- altoslib/AltosStateUpdate.java | 2 +- altoslib/AltosTelemetry.java | 2 +- altoslib/AltosTelemetryConfiguration.java | 2 +- altoslib/AltosTelemetryFile.java | 2 +- altoslib/AltosTelemetryIterable.java | 2 +- altoslib/AltosTelemetryLegacy.java | 2 +- altoslib/AltosTelemetryLocation.java | 2 +- altoslib/AltosTelemetryMap.java | 2 +- altoslib/AltosTelemetryMegaData.java | 2 +- altoslib/AltosTelemetryMegaSensor.java | 2 +- altoslib/AltosTelemetryMetrumData.java | 2 +- altoslib/AltosTelemetryMetrumSensor.java | 2 +- altoslib/AltosTelemetryMini.java | 2 +- altoslib/AltosTelemetryRaw.java | 2 +- altoslib/AltosTelemetryReader.java | 2 +- altoslib/AltosTelemetrySatellite.java | 2 +- altoslib/AltosTelemetrySensor.java | 2 +- altoslib/AltosTelemetryStandard.java | 2 +- altoslib/AltosTemperature.java | 2 +- altoslib/AltosUnits.java | 2 +- altoslib/AltosUnitsListener.java | 2 +- altoslib/AltosVoltage.java | 2 +- altoslib/AltosWriter.java | 2 +- altosui/Altos.java | 4 ++-- altosui/AltosAscent.java | 4 ++-- altosui/AltosCompanionInfo.java | 4 ++-- altosui/AltosConfig.java | 4 ++-- altosui/AltosConfigPyroUI.java | 4 ++-- altosui/AltosConfigTD.java | 4 ++-- altosui/AltosConfigTDUI.java | 4 ++-- altosui/AltosConfigUI.java | 4 ++-- altosui/AltosConfigureUI.java | 2 +- altosui/AltosDescent.java | 4 ++-- altosui/AltosFlightStatus.java | 4 ++-- altosui/AltosFlightStatusTableModel.java | 2 +- altosui/AltosFlightStatusUpdate.java | 2 +- altosui/AltosFlightUI.java | 4 ++-- altosui/AltosGraphUI.java | 4 ++-- altosui/AltosIdleMonitorUI.java | 4 ++-- altosui/AltosIgniteUI.java | 4 ++-- altosui/AltosIgnitor.java | 4 ++-- altosui/AltosLanded.java | 4 ++-- altosui/AltosLaunch.java | 2 +- altosui/AltosLaunchUI.java | 2 +- altosui/AltosPad.java | 4 ++-- altosui/AltosUI.java | 4 ++-- altosui/AltosUIPreferencesBackend.java | 2 +- altosuilib/AltosBTDevice.java | 4 ++-- altosuilib/AltosBTDeviceIterator.java | 4 ++-- altosuilib/AltosBTKnown.java | 4 ++-- altosuilib/AltosBTManage.java | 4 ++-- altosuilib/AltosCSVUI.java | 4 ++-- altosuilib/AltosConfigFreqUI.java | 4 ++-- altosuilib/AltosDataChooser.java | 4 ++-- altosuilib/AltosDevice.java | 2 +- altosuilib/AltosDeviceDialog.java | 2 +- altosuilib/AltosDeviceUIDialog.java | 2 +- altosuilib/AltosDisplayThread.java | 4 ++-- altosuilib/AltosEepromDelete.java | 4 ++-- altosuilib/AltosEepromManage.java | 4 ++-- altosuilib/AltosEepromMonitor.java | 2 +- altosuilib/AltosEepromMonitorUI.java | 4 ++-- altosuilib/AltosEepromSelect.java | 4 ++-- altosuilib/AltosFlashUI.java | 4 ++-- altosuilib/AltosFlightDisplay.java | 4 ++-- altosuilib/AltosFlightInfoTableModel.java | 2 +- altosuilib/AltosFlightStatsTable.java | 4 ++-- altosuilib/AltosFontListener.java | 2 +- altosuilib/AltosFreqList.java | 4 ++-- altosuilib/AltosGraph.java | 4 ++-- altosuilib/AltosGraphDataPoint.java | 4 ++-- altosuilib/AltosGraphDataSet.java | 4 ++-- altosuilib/AltosInfoTable.java | 4 ++-- altosuilib/AltosLed.java | 2 +- altosuilib/AltosLights.java | 2 +- altosuilib/AltosPositionListener.java | 2 +- altosuilib/AltosRomconfigUI.java | 4 ++-- altosuilib/AltosScanUI.java | 4 ++-- altosuilib/AltosSerial.java | 4 ++-- altosuilib/AltosSerialInUseException.java | 2 +- altosuilib/AltosUIAxis.java | 4 ++-- altosuilib/AltosUIConfigure.java | 2 +- altosuilib/AltosUIDataMissing.java | 2 +- altosuilib/AltosUIDataPoint.java | 2 +- altosuilib/AltosUIDataSet.java | 2 +- altosuilib/AltosUIDialog.java | 2 +- altosuilib/AltosUIEnable.java | 4 ++-- altosuilib/AltosUIFlightTab.java | 4 ++-- altosuilib/AltosUIFrame.java | 2 +- altosuilib/AltosUIGraph.java | 4 ++-- altosuilib/AltosUIGrapher.java | 4 ++-- altosuilib/AltosUIIndicator.java | 4 ++-- altosuilib/AltosUILatLon.java | 4 ++-- altosuilib/AltosUILib.java | 4 ++-- altosuilib/AltosUIListener.java | 2 +- altosuilib/AltosUIMap.java | 4 ++-- altosuilib/AltosUIMapCache.java | 2 +- altosuilib/AltosUIMapImage.java | 2 +- altosuilib/AltosUIMapLine.java | 4 ++-- altosuilib/AltosUIMapMark.java | 4 ++-- altosuilib/AltosUIMapPath.java | 4 ++-- altosuilib/AltosUIMapPreload.java | 4 ++-- altosuilib/AltosUIMapRectangle.java | 2 +- altosuilib/AltosUIMapStore.java | 2 +- altosuilib/AltosUIMapStoreListener.java | 2 +- altosuilib/AltosUIMapTile.java | 4 ++-- altosuilib/AltosUIMapTileListener.java | 2 +- altosuilib/AltosUIMapTransform.java | 4 ++-- altosuilib/AltosUIMapView.java | 4 ++-- altosuilib/AltosUIMapZoomListener.java | 2 +- altosuilib/AltosUIMarker.java | 4 ++-- altosuilib/AltosUIPreferences.java | 4 ++-- altosuilib/AltosUIPreferencesBackend.java | 4 ++-- altosuilib/AltosUISeries.java | 4 ++-- altosuilib/AltosUITelemetryMenu.java | 4 ++-- altosuilib/AltosUIUnitsIndicator.java | 4 ++-- altosuilib/AltosUIVersion.java.in | 2 +- altosuilib/AltosUIVoltageIndicator.java | 4 ++-- altosuilib/AltosUSBDevice.java | 2 +- altosuilib/AltosVoice.java | 2 +- altosuilib/GrabNDrag.java | 2 +- configure.ac | 6 +++--- micropeak/MicroData.java | 4 ++-- micropeak/MicroDataPoint.java | 2 +- micropeak/MicroDeviceDialog.java | 2 +- micropeak/MicroDownload.java | 4 ++-- micropeak/MicroExport.java | 4 ++-- micropeak/MicroFile.java | 4 ++-- micropeak/MicroFileChooser.java | 4 ++-- micropeak/MicroFrame.java | 2 +- micropeak/MicroGraph.java | 4 ++-- micropeak/MicroPeak.java | 4 ++-- micropeak/MicroRaw.java | 4 ++-- micropeak/MicroSave.java | 4 ++-- micropeak/MicroSerial.java | 2 +- micropeak/MicroSerialLog.java | 2 +- micropeak/MicroStats.java | 4 ++-- micropeak/MicroStatsTable.java | 4 ++-- micropeak/MicroUSB.java | 2 +- telegps/TeleGPS.java | 4 ++-- telegps/TeleGPSConfig.java | 4 ++-- telegps/TeleGPSConfigUI.java | 4 ++-- telegps/TeleGPSDisplayThread.java | 4 ++-- telegps/TeleGPSGraphUI.java | 4 ++-- telegps/TeleGPSInfo.java | 4 ++-- telegps/TeleGPSPreferences.java | 2 +- telegps/TeleGPSState.java | 4 ++-- telegps/TeleGPSStatus.java | 4 ++-- telegps/TeleGPSStatusUpdate.java | 2 +- 236 files changed, 321 insertions(+), 321 deletions(-) diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/AltosBluetooth.java b/altosdroid/src/org/altusmetrum/AltosDroid/AltosBluetooth.java index 1b4d45ed..a599698f 100644 --- a/altosdroid/src/org/altusmetrum/AltosDroid/AltosBluetooth.java +++ b/altosdroid/src/org/altusmetrum/AltosDroid/AltosBluetooth.java @@ -31,7 +31,7 @@ import android.os.Handler; //import android.os.Message; import android.util.Log; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class AltosBluetooth extends AltosLink { diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java b/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java index f61baf1e..1b49ba95 100644 --- a/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java +++ b/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java @@ -49,7 +49,7 @@ import android.widget.Toast; import android.app.AlertDialog; import android.location.Location; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class AltosDroid extends FragmentActivity { // Debugging diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroidPreferences.java b/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroidPreferences.java index f6e6881d..70d7def8 100644 --- a/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroidPreferences.java +++ b/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroidPreferences.java @@ -23,7 +23,7 @@ import android.content.Context; import android.content.SharedPreferences; import android.os.Environment; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class AltosDroidPreferences implements AltosPreferencesBackend { public final static String NAME = "org.altusmetrum.AltosDroid"; diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroidTab.java b/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroidTab.java index fac4b8d4..20593bd5 100644 --- a/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroidTab.java +++ b/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroidTab.java @@ -17,7 +17,7 @@ package org.altusmetrum.AltosDroid; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; import android.location.Location; public interface AltosDroidTab { diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/AltosVoice.java b/altosdroid/src/org/altusmetrum/AltosDroid/AltosVoice.java index 5e8515cb..147405f6 100644 --- a/altosdroid/src/org/altusmetrum/AltosDroid/AltosVoice.java +++ b/altosdroid/src/org/altusmetrum/AltosDroid/AltosVoice.java @@ -21,7 +21,7 @@ package org.altusmetrum.AltosDroid; import android.speech.tts.TextToSpeech; import android.speech.tts.TextToSpeech.OnInitListener; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class AltosVoice { diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/TabAscent.java b/altosdroid/src/org/altusmetrum/AltosDroid/TabAscent.java index e4a815eb..cb9fd5c8 100644 --- a/altosdroid/src/org/altusmetrum/AltosDroid/TabAscent.java +++ b/altosdroid/src/org/altusmetrum/AltosDroid/TabAscent.java @@ -17,7 +17,7 @@ package org.altusmetrum.AltosDroid; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; import android.app.Activity; import android.os.Bundle; diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/TabDescent.java b/altosdroid/src/org/altusmetrum/AltosDroid/TabDescent.java index cbbe4d44..2171afa4 100644 --- a/altosdroid/src/org/altusmetrum/AltosDroid/TabDescent.java +++ b/altosdroid/src/org/altusmetrum/AltosDroid/TabDescent.java @@ -17,7 +17,7 @@ package org.altusmetrum.AltosDroid; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; import android.app.Activity; import android.os.Bundle; diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/TabLanded.java b/altosdroid/src/org/altusmetrum/AltosDroid/TabLanded.java index b2e6fd20..47e41d59 100644 --- a/altosdroid/src/org/altusmetrum/AltosDroid/TabLanded.java +++ b/altosdroid/src/org/altusmetrum/AltosDroid/TabLanded.java @@ -17,7 +17,7 @@ package org.altusmetrum.AltosDroid; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; import android.app.Activity; import android.os.Bundle; diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/TabMap.java b/altosdroid/src/org/altusmetrum/AltosDroid/TabMap.java index 38922771..15dc8bf7 100644 --- a/altosdroid/src/org/altusmetrum/AltosDroid/TabMap.java +++ b/altosdroid/src/org/altusmetrum/AltosDroid/TabMap.java @@ -19,7 +19,7 @@ package org.altusmetrum.AltosDroid; import java.util.Arrays; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; import com.google.android.gms.maps.CameraUpdateFactory; import com.google.android.gms.maps.GoogleMap; diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/TabPad.java b/altosdroid/src/org/altusmetrum/AltosDroid/TabPad.java index 2d88974d..175a41de 100644 --- a/altosdroid/src/org/altusmetrum/AltosDroid/TabPad.java +++ b/altosdroid/src/org/altusmetrum/AltosDroid/TabPad.java @@ -17,7 +17,7 @@ package org.altusmetrum.AltosDroid; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; import android.app.Activity; import android.os.Bundle; diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryLogger.java b/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryLogger.java index 4215a330..49bcfb88 100644 --- a/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryLogger.java +++ b/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryLogger.java @@ -1,6 +1,6 @@ package org.altusmetrum.AltosDroid; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; import android.content.BroadcastReceiver; import android.content.Context; diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryReader.java b/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryReader.java index 5bc4b90d..3ba5afa9 100644 --- a/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryReader.java +++ b/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryReader.java @@ -25,7 +25,7 @@ import java.util.concurrent.*; import android.util.Log; import android.os.Handler; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class TelemetryReader extends Thread { diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java b/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java index da5e044f..f06ed213 100644 --- a/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java +++ b/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java @@ -44,7 +44,7 @@ import android.location.LocationManager; import android.location.LocationListener; import android.location.Criteria; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class TelemetryService extends Service implements LocationListener { diff --git a/altoslib/AltosAccel.java b/altoslib/AltosAccel.java index 3d340e5d..d91da4da 100644 --- a/altoslib/AltosAccel.java +++ b/altoslib/AltosAccel.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public class AltosAccel extends AltosUnits { diff --git a/altoslib/AltosCRCException.java b/altoslib/AltosCRCException.java index 253ca435..507c446b 100644 --- a/altoslib/AltosCRCException.java +++ b/altoslib/AltosCRCException.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public class AltosCRCException extends Exception { public int rssi; diff --git a/altoslib/AltosCSV.java b/altoslib/AltosCSV.java index 27e1fade..7e3d6d07 100644 --- a/altoslib/AltosCSV.java +++ b/altoslib/AltosCSV.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.io.*; import java.util.*; diff --git a/altoslib/AltosCompanion.java b/altoslib/AltosCompanion.java index 09bfe9f3..47deb2a3 100644 --- a/altoslib/AltosCompanion.java +++ b/altoslib/AltosCompanion.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public class AltosCompanion { public final static int board_id_telescience = 0x0a; diff --git a/altoslib/AltosConfigData.java b/altoslib/AltosConfigData.java index e1043958..d8b0b081 100644 --- a/altoslib/AltosConfigData.java +++ b/altoslib/AltosConfigData.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.util.*; import java.text.*; diff --git a/altoslib/AltosConfigDataException.java b/altoslib/AltosConfigDataException.java index ae5621cc..a932d3e3 100644 --- a/altoslib/AltosConfigDataException.java +++ b/altoslib/AltosConfigDataException.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public class AltosConfigDataException extends Exception { diff --git a/altoslib/AltosConfigValues.java b/altoslib/AltosConfigValues.java index 724ba7dc..dcb4d48f 100644 --- a/altoslib/AltosConfigValues.java +++ b/altoslib/AltosConfigValues.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public interface AltosConfigValues { /* set and get all of the dialog values */ diff --git a/altoslib/AltosConvert.java b/altoslib/AltosConvert.java index dc0fbb62..18878c02 100644 --- a/altoslib/AltosConvert.java +++ b/altoslib/AltosConvert.java @@ -18,7 +18,7 @@ /* * Sensor data conversion functions */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public class AltosConvert { /* diff --git a/altoslib/AltosDebug.java b/altoslib/AltosDebug.java index b0e52fc1..6784f60a 100644 --- a/altoslib/AltosDebug.java +++ b/altoslib/AltosDebug.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.io.*; diff --git a/altoslib/AltosDistance.java b/altoslib/AltosDistance.java index 76ca20c0..67bb58e9 100644 --- a/altoslib/AltosDistance.java +++ b/altoslib/AltosDistance.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public class AltosDistance extends AltosUnits { diff --git a/altoslib/AltosEeprom.java b/altoslib/AltosEeprom.java index 020590eb..532c9f1d 100644 --- a/altoslib/AltosEeprom.java +++ b/altoslib/AltosEeprom.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.io.*; import java.util.*; diff --git a/altoslib/AltosEepromChunk.java b/altoslib/AltosEepromChunk.java index 91eebc5a..4d12f564 100644 --- a/altoslib/AltosEepromChunk.java +++ b/altoslib/AltosEepromChunk.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.text.*; import java.util.concurrent.*; diff --git a/altoslib/AltosEepromDownload.java b/altoslib/AltosEepromDownload.java index a2dfc438..a448ee64 100644 --- a/altoslib/AltosEepromDownload.java +++ b/altoslib/AltosEepromDownload.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.io.*; import java.util.*; diff --git a/altoslib/AltosEepromFile.java b/altoslib/AltosEepromFile.java index b7e446ce..a1579b55 100644 --- a/altoslib/AltosEepromFile.java +++ b/altoslib/AltosEepromFile.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.io.*; import java.util.*; diff --git a/altoslib/AltosEepromGPS.java b/altoslib/AltosEepromGPS.java index 3c1852c0..2514b4fc 100644 --- a/altoslib/AltosEepromGPS.java +++ b/altoslib/AltosEepromGPS.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.io.*; import java.util.*; diff --git a/altoslib/AltosEepromHeader.java b/altoslib/AltosEepromHeader.java index 839aa06e..47e9eceb 100644 --- a/altoslib/AltosEepromHeader.java +++ b/altoslib/AltosEepromHeader.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.io.*; import java.util.*; diff --git a/altoslib/AltosEepromIterable.java b/altoslib/AltosEepromIterable.java index d6832c1b..dd0afd9f 100644 --- a/altoslib/AltosEepromIterable.java +++ b/altoslib/AltosEepromIterable.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.io.*; import java.util.*; diff --git a/altoslib/AltosEepromList.java b/altoslib/AltosEepromList.java index ab853a88..740499d3 100644 --- a/altoslib/AltosEepromList.java +++ b/altoslib/AltosEepromList.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.io.*; import java.util.*; diff --git a/altoslib/AltosEepromLog.java b/altoslib/AltosEepromLog.java index 1a430c03..5a11fa54 100644 --- a/altoslib/AltosEepromLog.java +++ b/altoslib/AltosEepromLog.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.text.*; import java.util.concurrent.*; diff --git a/altoslib/AltosEepromMega.java b/altoslib/AltosEepromMega.java index 71719a26..5d5f3fef 100644 --- a/altoslib/AltosEepromMega.java +++ b/altoslib/AltosEepromMega.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.io.*; import java.util.*; diff --git a/altoslib/AltosEepromMetrum2.java b/altoslib/AltosEepromMetrum2.java index d137614a..24277118 100644 --- a/altoslib/AltosEepromMetrum2.java +++ b/altoslib/AltosEepromMetrum2.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.io.*; import java.util.*; diff --git a/altoslib/AltosEepromMini.java b/altoslib/AltosEepromMini.java index 32985639..f197539e 100644 --- a/altoslib/AltosEepromMini.java +++ b/altoslib/AltosEepromMini.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.io.*; import java.util.*; diff --git a/altoslib/AltosEepromMonitor.java b/altoslib/AltosEepromMonitor.java index b97287c3..173a2cd8 100644 --- a/altoslib/AltosEepromMonitor.java +++ b/altoslib/AltosEepromMonitor.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public interface AltosEepromMonitor { diff --git a/altoslib/AltosEepromTM.java b/altoslib/AltosEepromTM.java index 77fe20c5..6d36cf47 100644 --- a/altoslib/AltosEepromTM.java +++ b/altoslib/AltosEepromTM.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.io.*; import java.util.*; diff --git a/altoslib/AltosEepromTm.java b/altoslib/AltosEepromTm.java index 6cbb7253..81b42f21 100644 --- a/altoslib/AltosEepromTm.java +++ b/altoslib/AltosEepromTm.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.io.*; import java.util.*; diff --git a/altoslib/AltosFile.java b/altoslib/AltosFile.java index 2a738996..ba639a04 100644 --- a/altoslib/AltosFile.java +++ b/altoslib/AltosFile.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.io.File; import java.util.*; diff --git a/altoslib/AltosFlash.java b/altoslib/AltosFlash.java index 8e8722c2..bd4fb6d0 100644 --- a/altoslib/AltosFlash.java +++ b/altoslib/AltosFlash.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.io.*; diff --git a/altoslib/AltosFlashListener.java b/altoslib/AltosFlashListener.java index 8bb86bba..7a51c330 100644 --- a/altoslib/AltosFlashListener.java +++ b/altoslib/AltosFlashListener.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public interface AltosFlashListener { public void position(String label, int percent); diff --git a/altoslib/AltosFlightReader.java b/altoslib/AltosFlightReader.java index 2fcd556e..ac151396 100644 --- a/altoslib/AltosFlightReader.java +++ b/altoslib/AltosFlightReader.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.text.*; import java.io.*; diff --git a/altoslib/AltosFlightStats.java b/altoslib/AltosFlightStats.java index 56feb848..1b88cb9f 100644 --- a/altoslib/AltosFlightStats.java +++ b/altoslib/AltosFlightStats.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.io.*; diff --git a/altoslib/AltosFrequency.java b/altoslib/AltosFrequency.java index d1ab847b..6093df49 100644 --- a/altoslib/AltosFrequency.java +++ b/altoslib/AltosFrequency.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public class AltosFrequency { public double frequency; diff --git a/altoslib/AltosGPS.java b/altoslib/AltosGPS.java index 2708d026..aabcfc5b 100644 --- a/altoslib/AltosGPS.java +++ b/altoslib/AltosGPS.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.text.*; import java.util.concurrent.*; diff --git a/altoslib/AltosGPSSat.java b/altoslib/AltosGPSSat.java index ef24d497..adbcbe61 100644 --- a/altoslib/AltosGPSSat.java +++ b/altoslib/AltosGPSSat.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public class AltosGPSSat { public int svid; diff --git a/altoslib/AltosGreatCircle.java b/altoslib/AltosGreatCircle.java index 4782c34d..716eeef9 100644 --- a/altoslib/AltosGreatCircle.java +++ b/altoslib/AltosGreatCircle.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.lang.Math; diff --git a/altoslib/AltosHeight.java b/altoslib/AltosHeight.java index 84981032..8c67e043 100644 --- a/altoslib/AltosHeight.java +++ b/altoslib/AltosHeight.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public class AltosHeight extends AltosUnits { diff --git a/altoslib/AltosHexfile.java b/altoslib/AltosHexfile.java index d5fa8f5f..9ee64bdc 100644 --- a/altoslib/AltosHexfile.java +++ b/altoslib/AltosHexfile.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.io.*; import java.util.LinkedList; diff --git a/altoslib/AltosHexsym.java b/altoslib/AltosHexsym.java index 403b5644..52eb81db 100644 --- a/altoslib/AltosHexsym.java +++ b/altoslib/AltosHexsym.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public class AltosHexsym { String name; diff --git a/altoslib/AltosIMU.java b/altoslib/AltosIMU.java index a22b3fed..89d7def4 100644 --- a/altoslib/AltosIMU.java +++ b/altoslib/AltosIMU.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.util.concurrent.*; diff --git a/altoslib/AltosIdle.java b/altoslib/AltosIdle.java index 55f6f5c9..0f723d14 100644 --- a/altoslib/AltosIdle.java +++ b/altoslib/AltosIdle.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.io.*; import java.util.*; diff --git a/altoslib/AltosIdleFetch.java b/altoslib/AltosIdleFetch.java index 5cd8bf36..1cb43d6d 100644 --- a/altoslib/AltosIdleFetch.java +++ b/altoslib/AltosIdleFetch.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.io.*; import java.util.*; diff --git a/altoslib/AltosIdleMonitor.java b/altoslib/AltosIdleMonitor.java index f81abdff..85bcff10 100644 --- a/altoslib/AltosIdleMonitor.java +++ b/altoslib/AltosIdleMonitor.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.io.*; import java.util.concurrent.*; diff --git a/altoslib/AltosIdleMonitorListener.java b/altoslib/AltosIdleMonitorListener.java index 6a9abea2..4382430c 100644 --- a/altoslib/AltosIdleMonitorListener.java +++ b/altoslib/AltosIdleMonitorListener.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public interface AltosIdleMonitorListener { public void update(AltosState state, AltosListenerState listener_state); diff --git a/altoslib/AltosIgnite.java b/altoslib/AltosIgnite.java index c21f17ac..b458911e 100644 --- a/altoslib/AltosIgnite.java +++ b/altoslib/AltosIgnite.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.util.*; import java.io.*; diff --git a/altoslib/AltosKML.java b/altoslib/AltosKML.java index d55da9ef..e31ddfba 100644 --- a/altoslib/AltosKML.java +++ b/altoslib/AltosKML.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.io.*; diff --git a/altoslib/AltosLatitude.java b/altoslib/AltosLatitude.java index 6156d6dc..2b507173 100644 --- a/altoslib/AltosLatitude.java +++ b/altoslib/AltosLatitude.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public class AltosLatitude extends AltosLocation { public String pos() { return "N"; } diff --git a/altoslib/AltosLib.java b/altoslib/AltosLib.java index 69c6d604..ec32fffc 100644 --- a/altoslib/AltosLib.java +++ b/altoslib/AltosLib.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.util.*; import java.io.*; diff --git a/altoslib/AltosLine.java b/altoslib/AltosLine.java index f9c712a3..f56938c6 100644 --- a/altoslib/AltosLine.java +++ b/altoslib/AltosLine.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public class AltosLine { public String line; diff --git a/altoslib/AltosLink.java b/altoslib/AltosLink.java index 7f434a06..08bca5fc 100644 --- a/altoslib/AltosLink.java +++ b/altoslib/AltosLink.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.io.*; import java.util.concurrent.*; diff --git a/altoslib/AltosListenerState.java b/altoslib/AltosListenerState.java index 5bf761b0..054ff1d0 100644 --- a/altoslib/AltosListenerState.java +++ b/altoslib/AltosListenerState.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public class AltosListenerState { public int crc_errors; diff --git a/altoslib/AltosLocation.java b/altoslib/AltosLocation.java index 725a02ba..9bbbb899 100644 --- a/altoslib/AltosLocation.java +++ b/altoslib/AltosLocation.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public abstract class AltosLocation extends AltosUnits { diff --git a/altoslib/AltosLog.java b/altoslib/AltosLog.java index c4e9e425..1cac6b52 100644 --- a/altoslib/AltosLog.java +++ b/altoslib/AltosLog.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.io.*; import java.text.*; diff --git a/altoslib/AltosLongitude.java b/altoslib/AltosLongitude.java index 29a5dcd4..dbcd6bf0 100644 --- a/altoslib/AltosLongitude.java +++ b/altoslib/AltosLongitude.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public class AltosLongitude extends AltosLocation { public String pos() { return "E"; } diff --git a/altoslib/AltosMag.java b/altoslib/AltosMag.java index 9262de2d..690241f1 100644 --- a/altoslib/AltosMag.java +++ b/altoslib/AltosMag.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.util.concurrent.*; diff --git a/altoslib/AltosMma655x.java b/altoslib/AltosMma655x.java index cb2e63d4..ea47cc9b 100644 --- a/altoslib/AltosMma655x.java +++ b/altoslib/AltosMma655x.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.util.concurrent.*; diff --git a/altoslib/AltosMs5607.java b/altoslib/AltosMs5607.java index 5aa3a7ec..81e0641c 100644 --- a/altoslib/AltosMs5607.java +++ b/altoslib/AltosMs5607.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.util.concurrent.*; diff --git a/altoslib/AltosNoSymbol.java b/altoslib/AltosNoSymbol.java index f5e53b8c..d436c3f1 100644 --- a/altoslib/AltosNoSymbol.java +++ b/altoslib/AltosNoSymbol.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public class AltosNoSymbol extends Exception { public AltosNoSymbol(String name) { diff --git a/altoslib/AltosOrient.java b/altoslib/AltosOrient.java index 5fcbe28d..348c6844 100644 --- a/altoslib/AltosOrient.java +++ b/altoslib/AltosOrient.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public class AltosOrient extends AltosUnits { diff --git a/altoslib/AltosParse.java b/altoslib/AltosParse.java index 1bff7682..9cb99a0d 100644 --- a/altoslib/AltosParse.java +++ b/altoslib/AltosParse.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.text.*; diff --git a/altoslib/AltosPreferences.java b/altoslib/AltosPreferences.java index d299f27b..159951e4 100644 --- a/altoslib/AltosPreferences.java +++ b/altoslib/AltosPreferences.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.io.*; import java.util.*; diff --git a/altoslib/AltosPreferencesBackend.java b/altoslib/AltosPreferencesBackend.java index 461b5c80..76a99acb 100644 --- a/altoslib/AltosPreferencesBackend.java +++ b/altoslib/AltosPreferencesBackend.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.io.File; diff --git a/altoslib/AltosProgrammer.java b/altoslib/AltosProgrammer.java index c96f04ca..443082d5 100644 --- a/altoslib/AltosProgrammer.java +++ b/altoslib/AltosProgrammer.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.io.*; diff --git a/altoslib/AltosPyro.java b/altoslib/AltosPyro.java index 9e47bc80..60b8fe52 100644 --- a/altoslib/AltosPyro.java +++ b/altoslib/AltosPyro.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.util.*; import java.text.*; diff --git a/altoslib/AltosReplayReader.java b/altoslib/AltosReplayReader.java index bf7e0e5b..15093af1 100644 --- a/altoslib/AltosReplayReader.java +++ b/altoslib/AltosReplayReader.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.io.*; import java.util.*; diff --git a/altoslib/AltosRomconfig.java b/altoslib/AltosRomconfig.java index 10df11af..d0de5492 100644 --- a/altoslib/AltosRomconfig.java +++ b/altoslib/AltosRomconfig.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.io.*; diff --git a/altoslib/AltosSelfFlash.java b/altoslib/AltosSelfFlash.java index 502c6d65..3ec69213 100644 --- a/altoslib/AltosSelfFlash.java +++ b/altoslib/AltosSelfFlash.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.io.*; diff --git a/altoslib/AltosSensorEMini.java b/altoslib/AltosSensorEMini.java index ee0238f9..53a8e998 100644 --- a/altoslib/AltosSensorEMini.java +++ b/altoslib/AltosSensorEMini.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.util.concurrent.TimeoutException; diff --git a/altoslib/AltosSensorMM.java b/altoslib/AltosSensorMM.java index e34e71b7..cdc2ac42 100644 --- a/altoslib/AltosSensorMM.java +++ b/altoslib/AltosSensorMM.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.util.concurrent.TimeoutException; diff --git a/altoslib/AltosSensorMega.java b/altoslib/AltosSensorMega.java index 02f3a256..3c7213eb 100644 --- a/altoslib/AltosSensorMega.java +++ b/altoslib/AltosSensorMega.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.util.concurrent.TimeoutException; diff --git a/altoslib/AltosSensorMetrum.java b/altoslib/AltosSensorMetrum.java index e5421ef5..d977e886 100644 --- a/altoslib/AltosSensorMetrum.java +++ b/altoslib/AltosSensorMetrum.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.util.concurrent.TimeoutException; diff --git a/altoslib/AltosSensorTM.java b/altoslib/AltosSensorTM.java index 2d60d8cf..344e7449 100644 --- a/altoslib/AltosSensorTM.java +++ b/altoslib/AltosSensorTM.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.util.concurrent.TimeoutException; diff --git a/altoslib/AltosSensorTMini.java b/altoslib/AltosSensorTMini.java index b9eeca0c..edd76da2 100644 --- a/altoslib/AltosSensorTMini.java +++ b/altoslib/AltosSensorTMini.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.util.concurrent.TimeoutException; diff --git a/altoslib/AltosSpeed.java b/altoslib/AltosSpeed.java index 9134f5f4..d2f86214 100644 --- a/altoslib/AltosSpeed.java +++ b/altoslib/AltosSpeed.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public class AltosSpeed extends AltosUnits { diff --git a/altoslib/AltosState.java b/altoslib/AltosState.java index b05cd358..e0c00602 100644 --- a/altoslib/AltosState.java +++ b/altoslib/AltosState.java @@ -19,7 +19,7 @@ * Track flight state from telemetry or eeprom data stream */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public class AltosState implements Cloneable { diff --git a/altoslib/AltosStateIterable.java b/altoslib/AltosStateIterable.java index be812095..f7cd424d 100644 --- a/altoslib/AltosStateIterable.java +++ b/altoslib/AltosStateIterable.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.io.*; import java.util.*; diff --git a/altoslib/AltosStateUpdate.java b/altoslib/AltosStateUpdate.java index ac4e963e..70530f75 100644 --- a/altoslib/AltosStateUpdate.java +++ b/altoslib/AltosStateUpdate.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public interface AltosStateUpdate { public void update_state(AltosState state) throws InterruptedException; diff --git a/altoslib/AltosTelemetry.java b/altoslib/AltosTelemetry.java index 8182ec6b..4d50a059 100644 --- a/altoslib/AltosTelemetry.java +++ b/altoslib/AltosTelemetry.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.text.*; diff --git a/altoslib/AltosTelemetryConfiguration.java b/altoslib/AltosTelemetryConfiguration.java index e3884051..f578e6ad 100644 --- a/altoslib/AltosTelemetryConfiguration.java +++ b/altoslib/AltosTelemetryConfiguration.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public class AltosTelemetryConfiguration extends AltosTelemetryStandard { diff --git a/altoslib/AltosTelemetryFile.java b/altoslib/AltosTelemetryFile.java index 3d3fa407..15344b8d 100644 --- a/altoslib/AltosTelemetryFile.java +++ b/altoslib/AltosTelemetryFile.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.io.*; import java.util.*; diff --git a/altoslib/AltosTelemetryIterable.java b/altoslib/AltosTelemetryIterable.java index cba97ddc..ac42597d 100644 --- a/altoslib/AltosTelemetryIterable.java +++ b/altoslib/AltosTelemetryIterable.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.io.*; import java.util.*; diff --git a/altoslib/AltosTelemetryLegacy.java b/altoslib/AltosTelemetryLegacy.java index 3367ece7..b7aae3c4 100644 --- a/altoslib/AltosTelemetryLegacy.java +++ b/altoslib/AltosTelemetryLegacy.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.text.*; diff --git a/altoslib/AltosTelemetryLocation.java b/altoslib/AltosTelemetryLocation.java index 8368188f..32ca7608 100644 --- a/altoslib/AltosTelemetryLocation.java +++ b/altoslib/AltosTelemetryLocation.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public class AltosTelemetryLocation extends AltosTelemetryStandard { diff --git a/altoslib/AltosTelemetryMap.java b/altoslib/AltosTelemetryMap.java index 8d0de355..758311eb 100644 --- a/altoslib/AltosTelemetryMap.java +++ b/altoslib/AltosTelemetryMap.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.text.*; import java.util.HashMap; diff --git a/altoslib/AltosTelemetryMegaData.java b/altoslib/AltosTelemetryMegaData.java index fac5695f..93610118 100644 --- a/altoslib/AltosTelemetryMegaData.java +++ b/altoslib/AltosTelemetryMegaData.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public class AltosTelemetryMegaData extends AltosTelemetryStandard { int state; diff --git a/altoslib/AltosTelemetryMegaSensor.java b/altoslib/AltosTelemetryMegaSensor.java index 9e73bc4e..1b568c88 100644 --- a/altoslib/AltosTelemetryMegaSensor.java +++ b/altoslib/AltosTelemetryMegaSensor.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public class AltosTelemetryMegaSensor extends AltosTelemetryStandard { int accel; diff --git a/altoslib/AltosTelemetryMetrumData.java b/altoslib/AltosTelemetryMetrumData.java index 96617306..3377d969 100644 --- a/altoslib/AltosTelemetryMetrumData.java +++ b/altoslib/AltosTelemetryMetrumData.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public class AltosTelemetryMetrumData extends AltosTelemetryStandard { diff --git a/altoslib/AltosTelemetryMetrumSensor.java b/altoslib/AltosTelemetryMetrumSensor.java index e7055404..3e0abedc 100644 --- a/altoslib/AltosTelemetryMetrumSensor.java +++ b/altoslib/AltosTelemetryMetrumSensor.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public class AltosTelemetryMetrumSensor extends AltosTelemetryStandard { diff --git a/altoslib/AltosTelemetryMini.java b/altoslib/AltosTelemetryMini.java index fbfaff8e..221bb67c 100644 --- a/altoslib/AltosTelemetryMini.java +++ b/altoslib/AltosTelemetryMini.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public class AltosTelemetryMini extends AltosTelemetryStandard { diff --git a/altoslib/AltosTelemetryRaw.java b/altoslib/AltosTelemetryRaw.java index 0dca62aa..2a535e84 100644 --- a/altoslib/AltosTelemetryRaw.java +++ b/altoslib/AltosTelemetryRaw.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public class AltosTelemetryRaw extends AltosTelemetryStandard { public AltosTelemetryRaw(int[] bytes) { diff --git a/altoslib/AltosTelemetryReader.java b/altoslib/AltosTelemetryReader.java index 3dff661a..589f57f2 100644 --- a/altoslib/AltosTelemetryReader.java +++ b/altoslib/AltosTelemetryReader.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; import java.text.*; import java.io.*; diff --git a/altoslib/AltosTelemetrySatellite.java b/altoslib/AltosTelemetrySatellite.java index d611e88c..d1cdaf6d 100644 --- a/altoslib/AltosTelemetrySatellite.java +++ b/altoslib/AltosTelemetrySatellite.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public class AltosTelemetrySatellite extends AltosTelemetryStandard { int channels; diff --git a/altoslib/AltosTelemetrySensor.java b/altoslib/AltosTelemetrySensor.java index ad4d9283..fc3fe858 100644 --- a/altoslib/AltosTelemetrySensor.java +++ b/altoslib/AltosTelemetrySensor.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public class AltosTelemetrySensor extends AltosTelemetryStandard { diff --git a/altoslib/AltosTelemetryStandard.java b/altoslib/AltosTelemetryStandard.java index 23ae9d21..f4dfd8e9 100644 --- a/altoslib/AltosTelemetryStandard.java +++ b/altoslib/AltosTelemetryStandard.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public abstract class AltosTelemetryStandard extends AltosTelemetry { int[] bytes; diff --git a/altoslib/AltosTemperature.java b/altoslib/AltosTemperature.java index 5fa71b86..e654fada 100644 --- a/altoslib/AltosTemperature.java +++ b/altoslib/AltosTemperature.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public class AltosTemperature extends AltosUnits { diff --git a/altoslib/AltosUnits.java b/altoslib/AltosUnits.java index d29cfae7..dbdb7882 100644 --- a/altoslib/AltosUnits.java +++ b/altoslib/AltosUnits.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public abstract class AltosUnits { diff --git a/altoslib/AltosUnitsListener.java b/altoslib/AltosUnitsListener.java index ca6faafd..664aed67 100644 --- a/altoslib/AltosUnitsListener.java +++ b/altoslib/AltosUnitsListener.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public interface AltosUnitsListener { public void units_changed(boolean imperial_units); diff --git a/altoslib/AltosVoltage.java b/altoslib/AltosVoltage.java index 351bf115..22bd1aee 100644 --- a/altoslib/AltosVoltage.java +++ b/altoslib/AltosVoltage.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public class AltosVoltage extends AltosUnits { diff --git a/altoslib/AltosWriter.java b/altoslib/AltosWriter.java index c3479a93..9df52250 100644 --- a/altoslib/AltosWriter.java +++ b/altoslib/AltosWriter.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_4; +package org.altusmetrum.altoslib_5; public interface AltosWriter { diff --git a/altosui/Altos.java b/altosui/Altos.java index 28038ad6..74b45f1c 100644 --- a/altosui/Altos.java +++ b/altosui/Altos.java @@ -20,8 +20,8 @@ package altosui; import java.awt.*; import libaltosJNI.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class Altos extends AltosUILib { diff --git a/altosui/AltosAscent.java b/altosui/AltosAscent.java index 3bc80406..24fc362f 100644 --- a/altosui/AltosAscent.java +++ b/altosui/AltosAscent.java @@ -21,8 +21,8 @@ import java.util.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class AltosAscent extends AltosUIFlightTab { JLabel cur, max; diff --git a/altosui/AltosCompanionInfo.java b/altosui/AltosCompanionInfo.java index e7b335ac..7ac53dd8 100644 --- a/altosui/AltosCompanionInfo.java +++ b/altosui/AltosCompanionInfo.java @@ -19,8 +19,8 @@ package altosui; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class AltosCompanionInfo extends JTable implements AltosFlightDisplay { private AltosFlightInfoTableModel model; diff --git a/altosui/AltosConfig.java b/altosui/AltosConfig.java index 6eb7d40c..40f7ebec 100644 --- a/altosui/AltosConfig.java +++ b/altosui/AltosConfig.java @@ -22,8 +22,8 @@ import javax.swing.*; import java.io.*; import java.util.concurrent.*; import java.text.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class AltosConfig implements ActionListener { diff --git a/altosui/AltosConfigPyroUI.java b/altosui/AltosConfigPyroUI.java index f0b4f0f9..dd4fb505 100644 --- a/altosui/AltosConfigPyroUI.java +++ b/altosui/AltosConfigPyroUI.java @@ -21,8 +21,8 @@ import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class AltosConfigPyroUI extends AltosUIDialog diff --git a/altosui/AltosConfigTD.java b/altosui/AltosConfigTD.java index bfbd2c77..2976657c 100644 --- a/altosui/AltosConfigTD.java +++ b/altosui/AltosConfigTD.java @@ -21,8 +21,8 @@ import java.awt.event.*; import javax.swing.*; import java.io.*; import java.util.concurrent.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class AltosConfigTD implements ActionListener { diff --git a/altosui/AltosConfigTDUI.java b/altosui/AltosConfigTDUI.java index 955c7dab..ca365718 100644 --- a/altosui/AltosConfigTDUI.java +++ b/altosui/AltosConfigTDUI.java @@ -21,8 +21,8 @@ import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class AltosConfigTDUI extends AltosUIDialog diff --git a/altosui/AltosConfigUI.java b/altosui/AltosConfigUI.java index 1b5ff988..4a33b64f 100644 --- a/altosui/AltosConfigUI.java +++ b/altosui/AltosConfigUI.java @@ -21,8 +21,8 @@ import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class AltosConfigUI extends AltosUIDialog diff --git a/altosui/AltosConfigureUI.java b/altosui/AltosConfigureUI.java index e61a4a5b..80d6d341 100644 --- a/altosui/AltosConfigureUI.java +++ b/altosui/AltosConfigureUI.java @@ -22,7 +22,7 @@ import java.awt.event.*; import java.beans.*; import javax.swing.*; import javax.swing.event.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altosuilib_3.*; public class AltosConfigureUI extends AltosUIConfigure diff --git a/altosui/AltosDescent.java b/altosui/AltosDescent.java index 36fc1613..e38b35ed 100644 --- a/altosui/AltosDescent.java +++ b/altosui/AltosDescent.java @@ -21,8 +21,8 @@ import java.util.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class AltosDescent extends AltosUIFlightTab { diff --git a/altosui/AltosFlightStatus.java b/altosui/AltosFlightStatus.java index 46c0b387..7e7efa64 100644 --- a/altosui/AltosFlightStatus.java +++ b/altosui/AltosFlightStatus.java @@ -19,8 +19,8 @@ package altosui; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class AltosFlightStatus extends JComponent implements AltosFlightDisplay { GridBagLayout layout; diff --git a/altosui/AltosFlightStatusTableModel.java b/altosui/AltosFlightStatusTableModel.java index b33f40a4..336b44aa 100644 --- a/altosui/AltosFlightStatusTableModel.java +++ b/altosui/AltosFlightStatusTableModel.java @@ -27,7 +27,7 @@ import java.util.*; import java.text.*; import java.util.prefs.*; import java.util.concurrent.LinkedBlockingQueue; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class AltosFlightStatusTableModel extends AbstractTableModel { private String[] columnNames = { diff --git a/altosui/AltosFlightStatusUpdate.java b/altosui/AltosFlightStatusUpdate.java index 0daec04e..3ba78c19 100644 --- a/altosui/AltosFlightStatusUpdate.java +++ b/altosui/AltosFlightStatusUpdate.java @@ -18,7 +18,7 @@ package altosui; import java.awt.event.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class AltosFlightStatusUpdate implements ActionListener { diff --git a/altosui/AltosFlightUI.java b/altosui/AltosFlightUI.java index 2e192c73..5aff1817 100644 --- a/altosui/AltosFlightUI.java +++ b/altosui/AltosFlightUI.java @@ -22,8 +22,8 @@ import java.awt.event.*; import javax.swing.*; import java.util.*; import java.util.concurrent.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class AltosFlightUI extends AltosUIFrame implements AltosFlightDisplay { AltosVoice voice; diff --git a/altosui/AltosGraphUI.java b/altosui/AltosGraphUI.java index 07fe9317..ddd281a6 100644 --- a/altosui/AltosGraphUI.java +++ b/altosui/AltosGraphUI.java @@ -23,8 +23,8 @@ import java.util.ArrayList; import java.awt.*; import java.awt.event.*; import javax.swing.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; import org.jfree.chart.ChartPanel; import org.jfree.chart.JFreeChart; diff --git a/altosui/AltosIdleMonitorUI.java b/altosui/AltosIdleMonitorUI.java index 042111ec..dd69b6f1 100644 --- a/altosui/AltosIdleMonitorUI.java +++ b/altosui/AltosIdleMonitorUI.java @@ -24,8 +24,8 @@ import javax.swing.event.*; import java.io.*; import java.util.concurrent.*; import java.util.Arrays; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class AltosIdleMonitorUI extends AltosUIFrame implements AltosFlightDisplay, AltosIdleMonitorListener, DocumentListener { AltosDevice device; diff --git a/altosui/AltosIgniteUI.java b/altosui/AltosIgniteUI.java index c251bbe2..15a81e57 100644 --- a/altosui/AltosIgniteUI.java +++ b/altosui/AltosIgniteUI.java @@ -24,8 +24,8 @@ import java.io.*; import java.text.*; import java.util.*; import java.util.concurrent.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class AltosIgniteUI extends AltosUIDialog diff --git a/altosui/AltosIgnitor.java b/altosui/AltosIgnitor.java index 990a87e6..117def09 100644 --- a/altosui/AltosIgnitor.java +++ b/altosui/AltosIgnitor.java @@ -20,8 +20,8 @@ package altosui; import java.awt.*; import java.awt.event.*; import javax.swing.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class AltosIgnitor extends AltosUIFlightTab { diff --git a/altosui/AltosLanded.java b/altosui/AltosLanded.java index dd5cf9ab..50c1ea31 100644 --- a/altosui/AltosLanded.java +++ b/altosui/AltosLanded.java @@ -21,8 +21,8 @@ import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.io.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class AltosLanded extends AltosUIFlightTab implements ActionListener { diff --git a/altosui/AltosLaunch.java b/altosui/AltosLaunch.java index 9ac1e44c..17178616 100644 --- a/altosui/AltosLaunch.java +++ b/altosui/AltosLaunch.java @@ -20,7 +20,7 @@ package altosui; import java.io.*; import java.util.concurrent.*; import java.awt.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altosuilib_3.*; public class AltosLaunch { AltosDevice device; diff --git a/altosui/AltosLaunchUI.java b/altosui/AltosLaunchUI.java index cc082542..3320e675 100644 --- a/altosui/AltosLaunchUI.java +++ b/altosui/AltosLaunchUI.java @@ -23,7 +23,7 @@ import javax.swing.*; import java.io.*; import java.text.*; import java.util.concurrent.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altosuilib_3.*; class FireButton extends JButton { protected void processMouseEvent(MouseEvent e) { diff --git a/altosui/AltosPad.java b/altosui/AltosPad.java index 6b5fd150..5c33fd16 100644 --- a/altosui/AltosPad.java +++ b/altosui/AltosPad.java @@ -18,8 +18,8 @@ package altosui; import java.util.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class AltosPad extends AltosUIFlightTab { diff --git a/altosui/AltosUI.java b/altosui/AltosUI.java index 6137487c..1eb03805 100644 --- a/altosui/AltosUI.java +++ b/altosui/AltosUI.java @@ -22,8 +22,8 @@ import java.awt.event.*; import javax.swing.*; import java.io.*; import java.util.concurrent.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class AltosUI extends AltosUIFrame { public AltosVoice voice = new AltosVoice(); diff --git a/altosui/AltosUIPreferencesBackend.java b/altosui/AltosUIPreferencesBackend.java index 28047086..b229d7b2 100644 --- a/altosui/AltosUIPreferencesBackend.java +++ b/altosui/AltosUIPreferencesBackend.java @@ -19,7 +19,7 @@ package altosui; import java.io.File; import java.util.prefs.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; import javax.swing.filechooser.FileSystemView; public class AltosUIPreferencesBackend implements AltosPreferencesBackend { diff --git a/altosuilib/AltosBTDevice.java b/altosuilib/AltosBTDevice.java index beefa532..2c085021 100644 --- a/altosuilib/AltosBTDevice.java +++ b/altosuilib/AltosBTDevice.java @@ -15,10 +15,10 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import libaltosJNI.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class AltosBTDevice extends altos_bt_device implements AltosDevice { diff --git a/altosuilib/AltosBTDeviceIterator.java b/altosuilib/AltosBTDeviceIterator.java index cad60ffb..c99b27f9 100644 --- a/altosuilib/AltosBTDeviceIterator.java +++ b/altosuilib/AltosBTDeviceIterator.java @@ -15,11 +15,11 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.util.*; import libaltosJNI.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class AltosBTDeviceIterator implements Iterator { AltosBTDevice current; diff --git a/altosuilib/AltosBTKnown.java b/altosuilib/AltosBTKnown.java index 02883c75..c526269d 100644 --- a/altosuilib/AltosBTKnown.java +++ b/altosuilib/AltosBTKnown.java @@ -15,10 +15,10 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.util.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class AltosBTKnown implements Iterable { LinkedList devices = new LinkedList(); diff --git a/altosuilib/AltosBTManage.java b/altosuilib/AltosBTManage.java index 6da0a3eb..b953ca92 100644 --- a/altosuilib/AltosBTManage.java +++ b/altosuilib/AltosBTManage.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.*; import java.awt.event.*; @@ -23,7 +23,7 @@ import javax.swing.*; import javax.swing.plaf.basic.*; import java.util.*; import java.util.concurrent.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class AltosBTManage extends AltosUIDialog implements ActionListener, Iterable { LinkedBlockingQueue found_devices; diff --git a/altosuilib/AltosCSVUI.java b/altosuilib/AltosCSVUI.java index 0a5e4fa2..6328d37d 100644 --- a/altosuilib/AltosCSVUI.java +++ b/altosuilib/AltosCSVUI.java @@ -15,13 +15,13 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.io.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class AltosCSVUI extends AltosUIDialog diff --git a/altosuilib/AltosConfigFreqUI.java b/altosuilib/AltosConfigFreqUI.java index 6dcd63b8..a0525a00 100644 --- a/altosuilib/AltosConfigFreqUI.java +++ b/altosuilib/AltosConfigFreqUI.java @@ -15,13 +15,13 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; class AltosEditFreqUI extends AltosUIDialog implements ActionListener { Frame frame; diff --git a/altosuilib/AltosDataChooser.java b/altosuilib/AltosDataChooser.java index 59891c4a..1990faf1 100644 --- a/altosuilib/AltosDataChooser.java +++ b/altosuilib/AltosDataChooser.java @@ -15,12 +15,12 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import javax.swing.*; import javax.swing.filechooser.FileNameExtensionFilter; import java.io.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class AltosDataChooser extends JFileChooser { JFrame frame; diff --git a/altosuilib/AltosDevice.java b/altosuilib/AltosDevice.java index 251ae994..1f5536ff 100644 --- a/altosuilib/AltosDevice.java +++ b/altosuilib/AltosDevice.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import libaltosJNI.*; diff --git a/altosuilib/AltosDeviceDialog.java b/altosuilib/AltosDeviceDialog.java index 0bedea97..0875bea7 100644 --- a/altosuilib/AltosDeviceDialog.java +++ b/altosuilib/AltosDeviceDialog.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import javax.swing.*; import java.awt.*; diff --git a/altosuilib/AltosDeviceUIDialog.java b/altosuilib/AltosDeviceUIDialog.java index 3013612a..80a76d6d 100644 --- a/altosuilib/AltosDeviceUIDialog.java +++ b/altosuilib/AltosDeviceUIDialog.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import javax.swing.*; import java.awt.*; diff --git a/altosuilib/AltosDisplayThread.java b/altosuilib/AltosDisplayThread.java index 06bc68a9..6b6e03e7 100644 --- a/altosuilib/AltosDisplayThread.java +++ b/altosuilib/AltosDisplayThread.java @@ -15,13 +15,13 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.*; import javax.swing.*; import java.io.*; import java.text.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class AltosDisplayThread extends Thread { diff --git a/altosuilib/AltosEepromDelete.java b/altosuilib/AltosEepromDelete.java index 981daddf..39585dad 100644 --- a/altosuilib/AltosEepromDelete.java +++ b/altosuilib/AltosEepromDelete.java @@ -15,13 +15,13 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.event.*; import javax.swing.*; import java.io.*; import java.util.concurrent.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class AltosEepromDelete implements Runnable { AltosEepromList flights; diff --git a/altosuilib/AltosEepromManage.java b/altosuilib/AltosEepromManage.java index 2b967339..81dd3d13 100644 --- a/altosuilib/AltosEepromManage.java +++ b/altosuilib/AltosEepromManage.java @@ -15,13 +15,13 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.event.*; import javax.swing.*; import java.io.*; import java.util.concurrent.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class AltosEepromManage implements ActionListener { diff --git a/altosuilib/AltosEepromMonitor.java b/altosuilib/AltosEepromMonitor.java index b1e85622..060d0474 100644 --- a/altosuilib/AltosEepromMonitor.java +++ b/altosuilib/AltosEepromMonitor.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.*; import java.awt.event.*; diff --git a/altosuilib/AltosEepromMonitorUI.java b/altosuilib/AltosEepromMonitorUI.java index 02c71cd9..11dd4adb 100644 --- a/altosuilib/AltosEepromMonitorUI.java +++ b/altosuilib/AltosEepromMonitorUI.java @@ -15,12 +15,12 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.*; import java.awt.event.*; import javax.swing.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class AltosEepromMonitorUI extends AltosUIDialog implements AltosEepromMonitor { JFrame owner; diff --git a/altosuilib/AltosEepromSelect.java b/altosuilib/AltosEepromSelect.java index 293d3045..1adfdab5 100644 --- a/altosuilib/AltosEepromSelect.java +++ b/altosuilib/AltosEepromSelect.java @@ -15,13 +15,13 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import javax.swing.*; import javax.swing.border.*; import java.awt.*; import java.awt.event.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; class AltosEepromItem implements ActionListener { AltosEepromLog log; diff --git a/altosuilib/AltosFlashUI.java b/altosuilib/AltosFlashUI.java index 3f120617..0ed4e75d 100644 --- a/altosuilib/AltosFlashUI.java +++ b/altosuilib/AltosFlashUI.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.*; import java.awt.event.*; @@ -23,7 +23,7 @@ import javax.swing.*; import javax.swing.filechooser.FileNameExtensionFilter; import java.io.*; import java.util.concurrent.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class AltosFlashUI extends AltosUIDialog diff --git a/altosuilib/AltosFlightDisplay.java b/altosuilib/AltosFlightDisplay.java index 55b74034..d0f20bb4 100644 --- a/altosuilib/AltosFlightDisplay.java +++ b/altosuilib/AltosFlightDisplay.java @@ -15,9 +15,9 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public interface AltosFlightDisplay extends AltosUnitsListener, AltosFontListener { void reset(); diff --git a/altosuilib/AltosFlightInfoTableModel.java b/altosuilib/AltosFlightInfoTableModel.java index 3995efb3..0bc4f847 100644 --- a/altosuilib/AltosFlightInfoTableModel.java +++ b/altosuilib/AltosFlightInfoTableModel.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import javax.swing.table.*; diff --git a/altosuilib/AltosFlightStatsTable.java b/altosuilib/AltosFlightStatsTable.java index 703dfb9d..1ec4a03e 100644 --- a/altosuilib/AltosFlightStatsTable.java +++ b/altosuilib/AltosFlightStatsTable.java @@ -15,12 +15,12 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.*; import javax.swing.*; import java.util.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class AltosFlightStatsTable extends JComponent implements AltosFontListener { GridBagLayout layout; diff --git a/altosuilib/AltosFontListener.java b/altosuilib/AltosFontListener.java index a98cc131..a1b2170b 100644 --- a/altosuilib/AltosFontListener.java +++ b/altosuilib/AltosFontListener.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; public interface AltosFontListener { void font_size_changed(int font_size); diff --git a/altosuilib/AltosFreqList.java b/altosuilib/AltosFreqList.java index a4c3e36a..293ce032 100644 --- a/altosuilib/AltosFreqList.java +++ b/altosuilib/AltosFreqList.java @@ -15,12 +15,12 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.util.*; import javax.swing.*; import java.awt.event.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; class FreqEntry extends JMenuItem { AltosFrequency frequency; diff --git a/altosuilib/AltosGraph.java b/altosuilib/AltosGraph.java index f8c8b27b..292437de 100644 --- a/altosuilib/AltosGraph.java +++ b/altosuilib/AltosGraph.java @@ -15,14 +15,14 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.io.*; import java.util.ArrayList; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; import org.jfree.ui.*; import org.jfree.chart.*; diff --git a/altosuilib/AltosGraphDataPoint.java b/altosuilib/AltosGraphDataPoint.java index 3aff1e82..14486abf 100644 --- a/altosuilib/AltosGraphDataPoint.java +++ b/altosuilib/AltosGraphDataPoint.java @@ -15,9 +15,9 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class AltosGraphDataPoint implements AltosUIDataPoint { diff --git a/altosuilib/AltosGraphDataSet.java b/altosuilib/AltosGraphDataSet.java index 36933e9b..0845f20e 100644 --- a/altosuilib/AltosGraphDataSet.java +++ b/altosuilib/AltosGraphDataSet.java @@ -15,12 +15,12 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.lang.*; import java.io.*; import java.util.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; class AltosGraphIterator implements Iterator { AltosGraphDataSet dataSet; diff --git a/altosuilib/AltosInfoTable.java b/altosuilib/AltosInfoTable.java index 23ae4ae5..ce986ac5 100644 --- a/altosuilib/AltosInfoTable.java +++ b/altosuilib/AltosInfoTable.java @@ -15,13 +15,13 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.table.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class AltosInfoTable extends JTable implements AltosFlightDisplay, HierarchyListener { private AltosFlightInfoTableModel model; diff --git a/altosuilib/AltosLed.java b/altosuilib/AltosLed.java index 2debb62a..0dd5740c 100644 --- a/altosuilib/AltosLed.java +++ b/altosuilib/AltosLed.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import javax.swing.*; diff --git a/altosuilib/AltosLights.java b/altosuilib/AltosLights.java index c91b70e9..30934d96 100644 --- a/altosuilib/AltosLights.java +++ b/altosuilib/AltosLights.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.*; import javax.swing.*; diff --git a/altosuilib/AltosPositionListener.java b/altosuilib/AltosPositionListener.java index 34cf1650..dfc3c649 100644 --- a/altosuilib/AltosPositionListener.java +++ b/altosuilib/AltosPositionListener.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; public interface AltosPositionListener { public void position_changed(int position); diff --git a/altosuilib/AltosRomconfigUI.java b/altosuilib/AltosRomconfigUI.java index 8f002c4a..481ce656 100644 --- a/altosuilib/AltosRomconfigUI.java +++ b/altosuilib/AltosRomconfigUI.java @@ -15,12 +15,12 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.*; import java.awt.event.*; import javax.swing.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class AltosRomconfigUI extends AltosUIDialog diff --git a/altosuilib/AltosScanUI.java b/altosuilib/AltosScanUI.java index b0cde059..7e1c7a97 100644 --- a/altosuilib/AltosScanUI.java +++ b/altosuilib/AltosScanUI.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.*; import java.awt.event.*; @@ -25,7 +25,7 @@ import java.io.*; import java.util.*; import java.text.*; import java.util.concurrent.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; class AltosScanResult { String callsign; diff --git a/altosuilib/AltosSerial.java b/altosuilib/AltosSerial.java index 60e15bdb..0eba55fd 100644 --- a/altosuilib/AltosSerial.java +++ b/altosuilib/AltosSerial.java @@ -19,13 +19,13 @@ * Deal with TeleDongle on a serial port */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.io.*; import java.util.*; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; import libaltosJNI.*; /* diff --git a/altosuilib/AltosSerialInUseException.java b/altosuilib/AltosSerialInUseException.java index 1e8207d1..cd19b101 100644 --- a/altosuilib/AltosSerialInUseException.java +++ b/altosuilib/AltosSerialInUseException.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; public class AltosSerialInUseException extends Exception { public AltosDevice device; diff --git a/altosuilib/AltosUIAxis.java b/altosuilib/AltosUIAxis.java index 74561673..1b5b9205 100644 --- a/altosuilib/AltosUIAxis.java +++ b/altosuilib/AltosUIAxis.java @@ -15,14 +15,14 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.io.*; import java.util.ArrayList; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; import org.jfree.ui.*; import org.jfree.chart.*; diff --git a/altosuilib/AltosUIConfigure.java b/altosuilib/AltosUIConfigure.java index 920ed8e2..9d54cfe5 100644 --- a/altosuilib/AltosUIConfigure.java +++ b/altosuilib/AltosUIConfigure.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.*; import java.awt.event.*; diff --git a/altosuilib/AltosUIDataMissing.java b/altosuilib/AltosUIDataMissing.java index 353ff30f..9a810a41 100644 --- a/altosuilib/AltosUIDataMissing.java +++ b/altosuilib/AltosUIDataMissing.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; public class AltosUIDataMissing extends Exception { public int id; diff --git a/altosuilib/AltosUIDataPoint.java b/altosuilib/AltosUIDataPoint.java index 3f16500e..f72bbcd5 100644 --- a/altosuilib/AltosUIDataPoint.java +++ b/altosuilib/AltosUIDataPoint.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; public interface AltosUIDataPoint { public abstract double x() throws AltosUIDataMissing; diff --git a/altosuilib/AltosUIDataSet.java b/altosuilib/AltosUIDataSet.java index ee70a3fd..9e048587 100644 --- a/altosuilib/AltosUIDataSet.java +++ b/altosuilib/AltosUIDataSet.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; public interface AltosUIDataSet { public abstract String name(); diff --git a/altosuilib/AltosUIDialog.java b/altosuilib/AltosUIDialog.java index dc737414..9fc5283e 100644 --- a/altosuilib/AltosUIDialog.java +++ b/altosuilib/AltosUIDialog.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.*; import java.awt.event.*; diff --git a/altosuilib/AltosUIEnable.java b/altosuilib/AltosUIEnable.java index da98797a..e227d2b7 100644 --- a/altosuilib/AltosUIEnable.java +++ b/altosuilib/AltosUIEnable.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.*; import java.awt.event.*; @@ -23,7 +23,7 @@ import javax.swing.*; import java.io.*; import java.util.concurrent.*; import java.util.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; import org.jfree.ui.*; import org.jfree.chart.*; diff --git a/altosuilib/AltosUIFlightTab.java b/altosuilib/AltosUIFlightTab.java index 039d83e0..74161634 100644 --- a/altosuilib/AltosUIFlightTab.java +++ b/altosuilib/AltosUIFlightTab.java @@ -15,13 +15,13 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.util.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public abstract class AltosUIFlightTab extends JComponent implements AltosFlightDisplay, HierarchyListener { public GridBagLayout layout; diff --git a/altosuilib/AltosUIFrame.java b/altosuilib/AltosUIFrame.java index 2de1fb1c..689ea7f3 100644 --- a/altosuilib/AltosUIFrame.java +++ b/altosuilib/AltosUIFrame.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.*; import java.awt.event.*; diff --git a/altosuilib/AltosUIGraph.java b/altosuilib/AltosUIGraph.java index 9cca088d..870c4e93 100644 --- a/altosuilib/AltosUIGraph.java +++ b/altosuilib/AltosUIGraph.java @@ -15,14 +15,14 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.io.*; import java.util.ArrayList; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; import org.jfree.ui.*; import org.jfree.chart.*; diff --git a/altosuilib/AltosUIGrapher.java b/altosuilib/AltosUIGrapher.java index 724fac18..39accab4 100644 --- a/altosuilib/AltosUIGrapher.java +++ b/altosuilib/AltosUIGrapher.java @@ -15,14 +15,14 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.io.*; import java.util.ArrayList; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; import org.jfree.ui.*; import org.jfree.chart.*; diff --git a/altosuilib/AltosUIIndicator.java b/altosuilib/AltosUIIndicator.java index b1626cba..d17078e7 100644 --- a/altosuilib/AltosUIIndicator.java +++ b/altosuilib/AltosUIIndicator.java @@ -15,11 +15,11 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public abstract class AltosUIIndicator implements AltosFontListener, AltosUnitsListener { JLabel label; diff --git a/altosuilib/AltosUILatLon.java b/altosuilib/AltosUILatLon.java index 688dd58b..a15bf19f 100644 --- a/altosuilib/AltosUILatLon.java +++ b/altosuilib/AltosUILatLon.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.*; import java.awt.event.*; @@ -25,7 +25,7 @@ import java.lang.Math; import java.awt.geom.*; import java.util.*; import java.util.concurrent.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class AltosUILatLon { public double lat; diff --git a/altosuilib/AltosUILib.java b/altosuilib/AltosUILib.java index b51c5963..0050f12c 100644 --- a/altosuilib/AltosUILib.java +++ b/altosuilib/AltosUILib.java @@ -15,12 +15,12 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.*; import libaltosJNI.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class AltosUILib extends AltosLib { diff --git a/altosuilib/AltosUIListener.java b/altosuilib/AltosUIListener.java index 75a0ad94..a32d310c 100644 --- a/altosuilib/AltosUIListener.java +++ b/altosuilib/AltosUIListener.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; public interface AltosUIListener { public void ui_changed(String look_and_feel); diff --git a/altosuilib/AltosUIMap.java b/altosuilib/AltosUIMap.java index aaa68f23..c22801f8 100644 --- a/altosuilib/AltosUIMap.java +++ b/altosuilib/AltosUIMap.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.*; import java.awt.event.*; @@ -25,7 +25,7 @@ import java.lang.Math; import java.awt.geom.*; import java.util.*; import java.util.concurrent.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class AltosUIMap extends JComponent implements AltosFlightDisplay, AltosUIMapZoomListener { diff --git a/altosuilib/AltosUIMapCache.java b/altosuilib/AltosUIMapCache.java index 55311d8c..3f1512df 100644 --- a/altosuilib/AltosUIMapCache.java +++ b/altosuilib/AltosUIMapCache.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import javax.swing.*; import javax.imageio.ImageIO; diff --git a/altosuilib/AltosUIMapImage.java b/altosuilib/AltosUIMapImage.java index 3819d079..77cd4299 100644 --- a/altosuilib/AltosUIMapImage.java +++ b/altosuilib/AltosUIMapImage.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import javax.swing.*; import javax.imageio.ImageIO; diff --git a/altosuilib/AltosUIMapLine.java b/altosuilib/AltosUIMapLine.java index e09a2d9f..86d2e6e2 100644 --- a/altosuilib/AltosUIMapLine.java +++ b/altosuilib/AltosUIMapLine.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.*; import java.awt.event.*; @@ -25,7 +25,7 @@ import java.lang.Math; import java.awt.geom.*; import java.util.*; import java.util.concurrent.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class AltosUIMapLine { AltosUILatLon start, end; diff --git a/altosuilib/AltosUIMapMark.java b/altosuilib/AltosUIMapMark.java index 8c640e5f..47fc4d5e 100644 --- a/altosuilib/AltosUIMapMark.java +++ b/altosuilib/AltosUIMapMark.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.*; import java.awt.event.*; @@ -25,7 +25,7 @@ import java.lang.Math; import java.awt.geom.*; import java.util.*; import java.util.concurrent.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class AltosUIMapMark { diff --git a/altosuilib/AltosUIMapPath.java b/altosuilib/AltosUIMapPath.java index ff17be67..705f4b6a 100644 --- a/altosuilib/AltosUIMapPath.java +++ b/altosuilib/AltosUIMapPath.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.*; import java.awt.event.*; @@ -25,7 +25,7 @@ import java.lang.Math; import java.awt.geom.*; import java.util.*; import java.util.concurrent.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; class PathPoint { AltosUILatLon lat_lon; diff --git a/altosuilib/AltosUIMapPreload.java b/altosuilib/AltosUIMapPreload.java index 56066d70..1c088a49 100644 --- a/altosuilib/AltosUIMapPreload.java +++ b/altosuilib/AltosUIMapPreload.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.*; import java.awt.event.*; @@ -26,7 +26,7 @@ import java.text.*; import java.lang.Math; import java.net.URL; import java.net.URLConnection; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; class AltosUIMapPos extends Box { AltosUIFrame owner; diff --git a/altosuilib/AltosUIMapRectangle.java b/altosuilib/AltosUIMapRectangle.java index 8a5b16e1..463ef3f2 100644 --- a/altosuilib/AltosUIMapRectangle.java +++ b/altosuilib/AltosUIMapRectangle.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; public class AltosUIMapRectangle { AltosUILatLon ul, lr; diff --git a/altosuilib/AltosUIMapStore.java b/altosuilib/AltosUIMapStore.java index 4cecb54f..dd8ace32 100644 --- a/altosuilib/AltosUIMapStore.java +++ b/altosuilib/AltosUIMapStore.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.io.*; import java.net.*; diff --git a/altosuilib/AltosUIMapStoreListener.java b/altosuilib/AltosUIMapStoreListener.java index 91aff00c..0bbd2bc9 100644 --- a/altosuilib/AltosUIMapStoreListener.java +++ b/altosuilib/AltosUIMapStoreListener.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; public interface AltosUIMapStoreListener { abstract void notify_store(AltosUIMapStore store, int status); diff --git a/altosuilib/AltosUIMapTile.java b/altosuilib/AltosUIMapTile.java index 7c823183..8b6a8f0a 100644 --- a/altosuilib/AltosUIMapTile.java +++ b/altosuilib/AltosUIMapTile.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.*; import java.awt.image.*; @@ -25,7 +25,7 @@ import java.awt.geom.*; import java.io.*; import java.util.*; import java.awt.RenderingHints.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class AltosUIMapTile { AltosUIMapTileListener listener; diff --git a/altosuilib/AltosUIMapTileListener.java b/altosuilib/AltosUIMapTileListener.java index 4ca13539..f58f55e0 100644 --- a/altosuilib/AltosUIMapTileListener.java +++ b/altosuilib/AltosUIMapTileListener.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; public interface AltosUIMapTileListener { abstract public void notify_tile(AltosUIMapTile tile, int status); diff --git a/altosuilib/AltosUIMapTransform.java b/altosuilib/AltosUIMapTransform.java index e6f1ffe3..89a3e9f6 100644 --- a/altosuilib/AltosUIMapTransform.java +++ b/altosuilib/AltosUIMapTransform.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.*; import java.awt.event.*; @@ -25,7 +25,7 @@ import java.lang.Math; import java.awt.geom.*; import java.util.*; import java.util.concurrent.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class AltosUIMapTransform { diff --git a/altosuilib/AltosUIMapView.java b/altosuilib/AltosUIMapView.java index a14fde65..1abd1731 100644 --- a/altosuilib/AltosUIMapView.java +++ b/altosuilib/AltosUIMapView.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.*; import java.awt.event.*; @@ -26,7 +26,7 @@ import java.lang.*; import java.awt.geom.*; import java.util.*; import java.util.concurrent.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class AltosUIMapView extends Component implements MouseMotionListener, MouseListener, MouseWheelListener, ComponentListener, AltosUIMapTileListener, AltosUIMapStoreListener { diff --git a/altosuilib/AltosUIMapZoomListener.java b/altosuilib/AltosUIMapZoomListener.java index 02e8bb51..23498c89 100644 --- a/altosuilib/AltosUIMapZoomListener.java +++ b/altosuilib/AltosUIMapZoomListener.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; public interface AltosUIMapZoomListener { abstract public void zoom_changed(int zoom); diff --git a/altosuilib/AltosUIMarker.java b/altosuilib/AltosUIMarker.java index cd6fa589..5e9809ee 100644 --- a/altosuilib/AltosUIMarker.java +++ b/altosuilib/AltosUIMarker.java @@ -15,14 +15,14 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.io.*; import java.util.ArrayList; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; import org.jfree.ui.*; import org.jfree.chart.*; diff --git a/altosuilib/AltosUIPreferences.java b/altosuilib/AltosUIPreferences.java index 7a582a7d..509faaff 100644 --- a/altosuilib/AltosUIPreferences.java +++ b/altosuilib/AltosUIPreferences.java @@ -15,13 +15,13 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.io.*; import java.util.*; import java.awt.Component; import javax.swing.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class AltosUIPreferences extends AltosPreferences { diff --git a/altosuilib/AltosUIPreferencesBackend.java b/altosuilib/AltosUIPreferencesBackend.java index da29253d..4048fd83 100644 --- a/altosuilib/AltosUIPreferencesBackend.java +++ b/altosuilib/AltosUIPreferencesBackend.java @@ -15,11 +15,11 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.io.File; import java.util.prefs.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; import javax.swing.filechooser.FileSystemView; public class AltosUIPreferencesBackend implements AltosPreferencesBackend { diff --git a/altosuilib/AltosUISeries.java b/altosuilib/AltosUISeries.java index b0632d18..809020c4 100644 --- a/altosuilib/AltosUISeries.java +++ b/altosuilib/AltosUISeries.java @@ -15,14 +15,14 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.io.*; import java.util.ArrayList; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; import org.jfree.ui.*; import org.jfree.chart.*; diff --git a/altosuilib/AltosUITelemetryMenu.java b/altosuilib/AltosUITelemetryMenu.java index fc4a91c5..893c3c44 100644 --- a/altosuilib/AltosUITelemetryMenu.java +++ b/altosuilib/AltosUITelemetryMenu.java @@ -15,12 +15,12 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.util.*; import javax.swing.*; import java.awt.event.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; class TelemetryMenuItem extends JMenuItem { public int telemetry; diff --git a/altosuilib/AltosUIUnitsIndicator.java b/altosuilib/AltosUIUnitsIndicator.java index 2285b6fc..50c30851 100644 --- a/altosuilib/AltosUIUnitsIndicator.java +++ b/altosuilib/AltosUIUnitsIndicator.java @@ -15,11 +15,11 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public abstract class AltosUIUnitsIndicator extends AltosUIIndicator { diff --git a/altosuilib/AltosUIVersion.java.in b/altosuilib/AltosUIVersion.java.in index 0edb5c04..9fd5757b 100644 --- a/altosuilib/AltosUIVersion.java.in +++ b/altosuilib/AltosUIVersion.java.in @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; public class AltosUIVersion { public final static String version = "@VERSION@"; diff --git a/altosuilib/AltosUIVoltageIndicator.java b/altosuilib/AltosUIVoltageIndicator.java index 3ff17213..8e991856 100644 --- a/altosuilib/AltosUIVoltageIndicator.java +++ b/altosuilib/AltosUIVoltageIndicator.java @@ -15,11 +15,11 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public abstract class AltosUIVoltageIndicator extends AltosUIUnitsIndicator { diff --git a/altosuilib/AltosUSBDevice.java b/altosuilib/AltosUSBDevice.java index b70b5e83..a8323704 100644 --- a/altosuilib/AltosUSBDevice.java +++ b/altosuilib/AltosUSBDevice.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.util.*; import libaltosJNI.*; diff --git a/altosuilib/AltosVoice.java b/altosuilib/AltosVoice.java index a3995f68..e02730ba 100644 --- a/altosuilib/AltosVoice.java +++ b/altosuilib/AltosVoice.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import com.sun.speech.freetts.Voice; import com.sun.speech.freetts.VoiceManager; diff --git a/altosuilib/GrabNDrag.java b/altosuilib/GrabNDrag.java index 4426f7a3..9bccb808 100644 --- a/altosuilib/GrabNDrag.java +++ b/altosuilib/GrabNDrag.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.*; import java.awt.event.*; diff --git a/configure.ac b/configure.ac index 23dc9d82..467a5286 100644 --- a/configure.ac +++ b/configure.ac @@ -18,7 +18,7 @@ dnl dnl Process this file with autoconf to create configure. AC_PREREQ(2.57) -AC_INIT([altos], 1.4) +AC_INIT([altos], 1.4.0.1) AC_CONFIG_SRCDIR([src/kernel/ao.h]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE @@ -29,8 +29,8 @@ AC_SUBST(VERSION_DASH) dnl ========================================================================== dnl Java library versions -ALTOSUILIB_VERSION=2 -ALTOSLIB_VERSION=4 +ALTOSUILIB_VERSION=3 +ALTOSLIB_VERSION=5 AC_SUBST(ALTOSLIB_VERSION) AC_DEFINE(ALTOSLIB_VERSION,$ALTOSLIB_VERSION,[Version of the AltosLib package]) diff --git a/micropeak/MicroData.java b/micropeak/MicroData.java index ca211f16..6c9447aa 100644 --- a/micropeak/MicroData.java +++ b/micropeak/MicroData.java @@ -20,8 +20,8 @@ package org.altusmetrum.micropeak; import java.lang.*; import java.io.*; import java.util.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; class MicroIterator implements Iterator { int i; diff --git a/micropeak/MicroDataPoint.java b/micropeak/MicroDataPoint.java index 5a5e8c37..849ae536 100644 --- a/micropeak/MicroDataPoint.java +++ b/micropeak/MicroDataPoint.java @@ -17,7 +17,7 @@ package org.altusmetrum.micropeak; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altosuilib_3.*; public class MicroDataPoint implements AltosUIDataPoint { public double time; diff --git a/micropeak/MicroDeviceDialog.java b/micropeak/MicroDeviceDialog.java index 305421a7..304eac7d 100644 --- a/micropeak/MicroDeviceDialog.java +++ b/micropeak/MicroDeviceDialog.java @@ -21,7 +21,7 @@ import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.util.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altosuilib_3.*; public class MicroDeviceDialog extends AltosDeviceDialog { diff --git a/micropeak/MicroDownload.java b/micropeak/MicroDownload.java index 1c70e1d1..32dd0450 100644 --- a/micropeak/MicroDownload.java +++ b/micropeak/MicroDownload.java @@ -23,8 +23,8 @@ import javax.swing.*; import java.io.*; import java.util.concurrent.*; import java.util.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class MicroDownload extends AltosUIDialog implements Runnable, ActionListener, MicroSerialLog, WindowListener { MicroPeak owner; diff --git a/micropeak/MicroExport.java b/micropeak/MicroExport.java index 87d5499b..8d62ace6 100644 --- a/micropeak/MicroExport.java +++ b/micropeak/MicroExport.java @@ -23,8 +23,8 @@ import java.util.ArrayList; import java.awt.*; import javax.swing.*; import javax.swing.filechooser.FileNameExtensionFilter; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class MicroExport extends JFileChooser { diff --git a/micropeak/MicroFile.java b/micropeak/MicroFile.java index 019346ae..d6abfcb7 100644 --- a/micropeak/MicroFile.java +++ b/micropeak/MicroFile.java @@ -19,8 +19,8 @@ package org.altusmetrum.micropeak; import java.io.*; import java.util.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class MicroFile { diff --git a/micropeak/MicroFileChooser.java b/micropeak/MicroFileChooser.java index 00b6690a..371c22d0 100644 --- a/micropeak/MicroFileChooser.java +++ b/micropeak/MicroFileChooser.java @@ -20,8 +20,8 @@ package org.altusmetrum.micropeak; import javax.swing.*; import javax.swing.filechooser.FileNameExtensionFilter; import java.io.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class MicroFileChooser extends JFileChooser { JFrame frame; diff --git a/micropeak/MicroFrame.java b/micropeak/MicroFrame.java index 5bfe5bf7..f82d1c5e 100644 --- a/micropeak/MicroFrame.java +++ b/micropeak/MicroFrame.java @@ -21,7 +21,7 @@ import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altosuilib_3.*; public class MicroFrame extends AltosUIFrame { static String[] micro_icon_names = { diff --git a/micropeak/MicroGraph.java b/micropeak/MicroGraph.java index f9968919..811b1e7c 100644 --- a/micropeak/MicroGraph.java +++ b/micropeak/MicroGraph.java @@ -22,8 +22,8 @@ import java.util.ArrayList; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; import org.jfree.ui.*; import org.jfree.chart.*; diff --git a/micropeak/MicroPeak.java b/micropeak/MicroPeak.java index 19e91660..d7d393ba 100644 --- a/micropeak/MicroPeak.java +++ b/micropeak/MicroPeak.java @@ -23,8 +23,8 @@ import javax.swing.*; import java.io.*; import java.util.concurrent.*; import java.util.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class MicroPeak extends MicroFrame implements ActionListener, ItemListener { diff --git a/micropeak/MicroRaw.java b/micropeak/MicroRaw.java index 26d62012..7a225dcb 100644 --- a/micropeak/MicroRaw.java +++ b/micropeak/MicroRaw.java @@ -20,8 +20,8 @@ package org.altusmetrum.micropeak; import java.awt.*; import java.io.*; import javax.swing.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class MicroRaw extends JTextArea { diff --git a/micropeak/MicroSave.java b/micropeak/MicroSave.java index 7c5d6abe..9497fb33 100644 --- a/micropeak/MicroSave.java +++ b/micropeak/MicroSave.java @@ -24,8 +24,8 @@ import javax.swing.filechooser.FileNameExtensionFilter; import java.io.*; import java.util.concurrent.*; import java.util.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class MicroSave extends JFileChooser { diff --git a/micropeak/MicroSerial.java b/micropeak/MicroSerial.java index 37b68636..f5108c22 100644 --- a/micropeak/MicroSerial.java +++ b/micropeak/MicroSerial.java @@ -20,7 +20,7 @@ package org.altusmetrum.micropeak; import java.util.*; import java.io.*; import libaltosJNI.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altosuilib_3.*; public class MicroSerial extends InputStream { SWIGTYPE_p_altos_file file; diff --git a/micropeak/MicroSerialLog.java b/micropeak/MicroSerialLog.java index 7300f06d..c49b69ab 100644 --- a/micropeak/MicroSerialLog.java +++ b/micropeak/MicroSerialLog.java @@ -20,7 +20,7 @@ package org.altusmetrum.micropeak; import java.util.*; import java.io.*; import libaltosJNI.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altosuilib_3.*; public interface MicroSerialLog { diff --git a/micropeak/MicroStats.java b/micropeak/MicroStats.java index 45c9f225..3fc05bd6 100644 --- a/micropeak/MicroStats.java +++ b/micropeak/MicroStats.java @@ -18,8 +18,8 @@ package org.altusmetrum.micropeak; import java.io.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class MicroStats { double coast_height; diff --git a/micropeak/MicroStatsTable.java b/micropeak/MicroStatsTable.java index 3b17e731..d6265fe8 100644 --- a/micropeak/MicroStatsTable.java +++ b/micropeak/MicroStatsTable.java @@ -19,8 +19,8 @@ package org.altusmetrum.micropeak; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class MicroStatsTable extends JComponent implements AltosFontListener { GridBagLayout layout; diff --git a/micropeak/MicroUSB.java b/micropeak/MicroUSB.java index 437fa0bc..24f6722b 100644 --- a/micropeak/MicroUSB.java +++ b/micropeak/MicroUSB.java @@ -19,7 +19,7 @@ package org.altusmetrum.micropeak; import java.util.*; import libaltosJNI.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altosuilib_3.*; public class MicroUSB extends altos_device implements AltosDevice { diff --git a/telegps/TeleGPS.java b/telegps/TeleGPS.java index 646495b6..f765ee23 100644 --- a/telegps/TeleGPS.java +++ b/telegps/TeleGPS.java @@ -23,8 +23,8 @@ import javax.swing.*; import java.io.*; import java.util.concurrent.*; import java.util.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class TeleGPS extends AltosUIFrame diff --git a/telegps/TeleGPSConfig.java b/telegps/TeleGPSConfig.java index 3505b0bb..e607a5a5 100644 --- a/telegps/TeleGPSConfig.java +++ b/telegps/TeleGPSConfig.java @@ -22,8 +22,8 @@ import javax.swing.*; import java.io.*; import java.util.concurrent.*; import java.text.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class TeleGPSConfig implements ActionListener { diff --git a/telegps/TeleGPSConfigUI.java b/telegps/TeleGPSConfigUI.java index 5f269fd3..7d28b371 100644 --- a/telegps/TeleGPSConfigUI.java +++ b/telegps/TeleGPSConfigUI.java @@ -21,8 +21,8 @@ import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class TeleGPSConfigUI extends AltosUIDialog diff --git a/telegps/TeleGPSDisplayThread.java b/telegps/TeleGPSDisplayThread.java index a3d4ea07..18b8d9fc 100644 --- a/telegps/TeleGPSDisplayThread.java +++ b/telegps/TeleGPSDisplayThread.java @@ -21,8 +21,8 @@ import java.awt.*; import javax.swing.*; import java.io.*; import java.text.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class TeleGPSDisplayThread extends Thread { diff --git a/telegps/TeleGPSGraphUI.java b/telegps/TeleGPSGraphUI.java index 244eb7b9..b59b122c 100644 --- a/telegps/TeleGPSGraphUI.java +++ b/telegps/TeleGPSGraphUI.java @@ -26,8 +26,8 @@ import javax.swing.*; import java.io.*; import java.util.concurrent.*; import java.util.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; import org.jfree.chart.ChartPanel; import org.jfree.chart.JFreeChart; diff --git a/telegps/TeleGPSInfo.java b/telegps/TeleGPSInfo.java index e87fea90..1b4751b9 100644 --- a/telegps/TeleGPSInfo.java +++ b/telegps/TeleGPSInfo.java @@ -21,8 +21,8 @@ import java.util.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class TeleGPSInfo extends AltosUIFlightTab { diff --git a/telegps/TeleGPSPreferences.java b/telegps/TeleGPSPreferences.java index 8bd371f4..2738ceea 100644 --- a/telegps/TeleGPSPreferences.java +++ b/telegps/TeleGPSPreferences.java @@ -22,7 +22,7 @@ import java.awt.event.*; import java.beans.*; import javax.swing.*; import javax.swing.event.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altosuilib_3.*; public class TeleGPSPreferences extends AltosUIConfigure diff --git a/telegps/TeleGPSState.java b/telegps/TeleGPSState.java index a76182ed..27321c73 100644 --- a/telegps/TeleGPSState.java +++ b/telegps/TeleGPSState.java @@ -21,8 +21,8 @@ import java.util.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class TeleGPSState extends AltosUIFlightTab { diff --git a/telegps/TeleGPSStatus.java b/telegps/TeleGPSStatus.java index f3951a37..1d4415d6 100644 --- a/telegps/TeleGPSStatus.java +++ b/telegps/TeleGPSStatus.java @@ -19,8 +19,8 @@ package org.altusmetrum.telegps; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class TeleGPSStatus extends JComponent implements AltosFlightDisplay { GridBagLayout layout; diff --git a/telegps/TeleGPSStatusUpdate.java b/telegps/TeleGPSStatusUpdate.java index e7684d88..3d2b7f34 100644 --- a/telegps/TeleGPSStatusUpdate.java +++ b/telegps/TeleGPSStatusUpdate.java @@ -18,7 +18,7 @@ package org.altusmetrum.telegps; import java.awt.event.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class TeleGPSStatusUpdate implements ActionListener { -- cgit v1.2.3 From b397e4ff45f054acb1347ffa5468950febc431f7 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 16 Jun 2014 23:03:49 -0700 Subject: altos/micropeak: Add load script template Signed-off-by: Keith Packard --- src/micropeak/micropeak-load.tmpl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/micropeak/micropeak-load.tmpl diff --git a/src/micropeak/micropeak-load.tmpl b/src/micropeak/micropeak-load.tmpl new file mode 100644 index 00000000..08236a15 --- /dev/null +++ b/src/micropeak/micropeak-load.tmpl @@ -0,0 +1,20 @@ +#!/bin/sh +dir=`dirname $0` + +HEX="$dir"/"%HEX%" +LOADCMD="%LOADCMD%" +LOADARG="%LOADARG%" +LOADSLOW="%LOADSLOW%" +LOADFAST="" + +case "$1" in +fast) + LOADSPEED="$LOADFAST" + ;; +*) + LOADSPEED="$LOADSLOW" + ;; +esac + +echo ${LOADCMD} ${LOADSPEED} ${LOADARG}${HEX} +${LOADCMD} ${LOADSPEED} ${LOADARG}${HEX} -- cgit v1.2.3 From 495e84540943cccb6d1cb965a772021f7dc5f639 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 17 Jun 2014 00:08:03 -0700 Subject: Sign our .inf file with the comodo key. Update signing-driver I've tested this on Windows 7 and it appears to work. No idea if it works on Windows 8 yet. Signed-off-by: Keith Packard --- altusmetrum.cat | Bin 6263 -> 8242 bytes signing-driver | 18 ++++++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/altusmetrum.cat b/altusmetrum.cat index 2d7e8b26..eb5dff98 100644 Binary files a/altusmetrum.cat and b/altusmetrum.cat differ diff --git a/signing-driver b/signing-driver index 177c5079..240609c4 100644 --- a/signing-driver +++ b/signing-driver @@ -2,19 +2,25 @@ Notes on getting a signing key for driver signing http://technet.microsoft.com/en-us/library/dd919238%28v=ws.10%29.aspx -# use MMC to add the certificates snap-in for ComputerAccount on Local computer +Start MMC as administrator (start a console as administrator, launch +mmc from there). -Run console as Administrator: +Use MMC to add the certificates snap-in for ComputerAccount on Local computer -makecert -r -n "CN=AltusMetrum" -ss AltusMetrumCertStore -sr LocalMachine +Create a key store for our keys called AltusMetrumCertStore + +Add our key from ~/altusmetrumllc/altusmetrum-key.p12 + +# Our cert is now called "Altus Metrum, LLC" + +Create a new directory with a simple path. Copy altusmetrum.inf to +that directory # contains the altusmetrum.inf file we ship. Make sure # is otherwise empty or inf2cat will get confused inf2cat /driver: /os:7_X86,7_X64,8_X86,8_X64 -signtool sign /s AltusMetrumCertStore /n “AltusMetrum" +signtool sign /s AltusMetrumCertStore /n “Altus Metrum, LLC" /t http://timestamp.verisign.com/scripts/timestamp.dll altusmetrum.cat - -pnputil -i -a altusmetrum.inf -- cgit v1.2.3 From 3f4e765c05ddbae83ca0c0176572cd698f285d08 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 17 Jun 2014 20:46:33 -0700 Subject: Fix java version detection and downloading Move java stuff to a common include file, java.nsh Let any version no older than 1.6 serve by using ${VersionCompare} Use version 6 downloads as those don't require a click-through agreement. Signed-off-by: Keith Packard --- altosui/Instdrv/NSIS/Includes/java.nsh | 50 ++++++++++++++++++++++++++++++++++ altosui/altos-windows.nsi.in | 47 ++------------------------------ micropeak/Makefile.am | 2 +- micropeak/micropeak-windows.nsi.in | 46 ++----------------------------- telegps/telegps-windows.nsi.in | 47 ++------------------------------ 5 files changed, 58 insertions(+), 134 deletions(-) create mode 100644 altosui/Instdrv/NSIS/Includes/java.nsh diff --git a/altosui/Instdrv/NSIS/Includes/java.nsh b/altosui/Instdrv/NSIS/Includes/java.nsh new file mode 100644 index 00000000..ebf1c5b9 --- /dev/null +++ b/altosui/Instdrv/NSIS/Includes/java.nsh @@ -0,0 +1,50 @@ +!include WordFunc.nsh + +; Definitions for Java Detection + +!define JRE_VERSION "1.6" +!define JRE32_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=52247&/jre-6u27-windows-i586.exe" +!define JRE64_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=52249&/jre-6u27-windows-x64.exe" + +Var JavaDownload +Var JavaBits + +Function GetJRE + ${If} ${RunningX64} + StrCpy $JavaDownload ${JRE64_URL} + StrCpy $JavaBits "64" + ${Else} + StrCpy $JavaDownload ${JRE32_URL} + StrCpy $JavaBits "32" + ${EndIf} + + MessageBox MB_OK "This product uses Java ${JRE_VERSION}, \ + $JavaBits bits, it will now \ + be downloaded and installed" + + StrCpy $2 "$TEMP\Java Runtime Environment.exe" + nsisdl::download /TIMEOUT=30000 $JavaDownload $2 + Pop $R0 ;Get the return value + StrCmp $R0 "success" +3 + MessageBox MB_OK "Download failed: $R0" + Quit + ExecWait $2 + Delete $2 +FunctionEnd + +Function DetectJRE + ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" \ + "CurrentVersion" + + DetailPrint "Desired Java version ${JRE_VERSION}" + DetailPrint "Actual Java version $2" + + ${VersionCompare} $2 ${JRE_VERSION} $3 + + IntCmp $3 1 done done + + Call GetJRE + +done: + +FunctionEnd diff --git a/altosui/altos-windows.nsi.in b/altosui/altos-windows.nsi.in index b72772e2..ab5ac453 100644 --- a/altosui/altos-windows.nsi.in +++ b/altosui/altos-windows.nsi.in @@ -1,10 +1,8 @@ !addplugindir Instdrv/NSIS/Plugins +!addincludedir Instdrv/NSIS/Includes !include x64.nsh -; Definitions for Java 1.7 Detection -!define JRE_VERSION "1.7" -!define JRE_ALTERNATE "1.6" -!define JRE32_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=83383&/jre-7u51-windows-i586.exe" -!define JRE64_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=83385&/jre-7u51-windows-x64.exe" +!include java.nsh + !define PRODUCT_NAME "Altus Metrum Windows Software" Name "Altus Metrum Installer" @@ -35,45 +33,6 @@ Function .onInit ${EndIf} FunctionEnd -Var JavaDownload -Var JavaBits - -Function GetJRE - ${If} ${RunningX64} - StrCpy $JavaDownload ${JRE64_URL} - StrCpy $JavaBits "64" - ${Else} - StrCpy $JavaDownload ${JRE32_URL} - StrCpy $JavaBits "32" - ${EndIf} - - MessageBox MB_OK "${PRODUCT_NAME} uses Java ${JRE_VERSION}, \ - $JavaBits bits, it will now \ - be downloaded and installed" - - StrCpy $2 "$TEMP\Java Runtime Environment.exe" - nsisdl::download /TIMEOUT=30000 $JavaDownload $2 - Pop $R0 ;Get the return value - StrCmp $R0 "success" +3 - MessageBox MB_OK "Download failed: $R0" - Quit - ExecWait $2 - Delete $2 -FunctionEnd - -Function DetectJRE - ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" \ - "CurrentVersion" - - StrCmp $2 ${JRE_VERSION} done - - StrCmp $2 ${JRE_ALTERNATE} done - - Call GetJRE - - done: -FunctionEnd - ; Pages to present Page license diff --git a/micropeak/Makefile.am b/micropeak/Makefile.am index 216874df..39ebc43a 100644 --- a/micropeak/Makefile.am +++ b/micropeak/Makefile.am @@ -272,7 +272,7 @@ $(MACOSX_DIST): $(MACOSX_FILES) $(WINDOWS_DIST): $(WINDOWS_FILES) micropeak-windows.nsi -rm -f $@ - makensis -Omicropeak-windows.log "-XOutFile $@" "-DVERSION=$(VERSION)" micropeak-windows.nsi + makensis -Omicropeak-windows.log "-XOutFile $@" "-DVERSION=$(VERSION)" micropeak-windows.nsi || (cat micropeak-windows.log && exit 1) Manifest.txt: Makefile echo 'Main-Class: org.altusmetrum.micropeak.MicroPeak' > $@ diff --git a/micropeak/micropeak-windows.nsi.in b/micropeak/micropeak-windows.nsi.in index 6dc9d8c1..bb5da1bb 100644 --- a/micropeak/micropeak-windows.nsi.in +++ b/micropeak/micropeak-windows.nsi.in @@ -1,11 +1,7 @@ !addplugindir Instdrv/NSIS/Plugins +!addincludedir ../altosui/Instdrv/NSIS/Includes !include x64.nsh -; Definitions for Java 1.7 Detection -!define JRE_VERSION "1.7" -!define JRE_ALTERNATE "1.6" -!define JRE32_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=83383&/jre-7u51-windows-i586.exe" -!define JRE64_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=83385&/jre-7u51-windows-x64.exe" -!define PRODUCT_NAME "Altus Metrum Windows Software" +!include java.nsh Name "Altus Metrum MicroPeak Installer" @@ -35,44 +31,6 @@ Function .onInit ${EndIf} FunctionEnd -Var JavaDownload -Var JavaBits - -Function GetJRE - ${If} ${RunningX64} - StrCpy $JavaDownload ${JRE64_URL} - StrCpy $JavaBits "64" - ${Else} - StrCpy $JavaDownload ${JRE32_URL} - StrCpy $JavaBits "32" - ${EndIf} - - MessageBox MB_OK "${PRODUCT_NAME} uses Java ${JRE_VERSION}, \ - $JavaBits bits, it will now \ - be downloaded and installed" - - StrCpy $2 "$TEMP\Java Runtime Environment.exe" - nsisdl::download /TIMEOUT=30000 $JavaDownload $2 - Pop $R0 ;Get the return value - StrCmp $R0 "success" +3 - MessageBox MB_OK "Download failed: $R0" - Quit - ExecWait $2 - Delete $2 -FunctionEnd - -Function DetectJRE - ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" \ - "CurrentVersion" - StrCmp $2 ${JRE_VERSION} done - - StrCmp $2 ${JRE_ALTERNATE} done - - Call GetJRE - - done: -FunctionEnd - ; Pages to present Page license diff --git a/telegps/telegps-windows.nsi.in b/telegps/telegps-windows.nsi.in index e6798c46..b4145520 100644 --- a/telegps/telegps-windows.nsi.in +++ b/telegps/telegps-windows.nsi.in @@ -1,11 +1,7 @@ !addplugindir ../altosui/Instdrv/NSIS/Plugins +!addincludedir ../altosui/Instdrv/NSIS/Includes !include x64.nsh -; Definitions for Java 1.7 Detection -!define JRE_VERSION "1.7" -!define JRE_ALTERNATE "1.6" -!define JRE32_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=83383&/jre-7u51-windows-i586.exe" -!define JRE64_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=83385&/jre-7u51-windows-x64.exe" -!define PRODUCT_NAME "TeleGPS Windows Software" +!include java.nsh Name "TeleGPS Installer" @@ -35,45 +31,6 @@ Function .onInit ${EndIf} FunctionEnd -Var JavaDownload -Var JavaBits - -Function GetJRE - ${If} ${RunningX64} - StrCpy $JavaDownload ${JRE64_URL} - StrCpy $JavaBits "64" - ${Else} - StrCpy $JavaDownload ${JRE32_URL} - StrCpy $JavaBits "32" - ${EndIf} - - MessageBox MB_OK "${PRODUCT_NAME} uses Java ${JRE_VERSION}, \ - $JavaBits bits, it will now \ - be downloaded and installed" - - StrCpy $2 "$TEMP\Java Runtime Environment.exe" - nsisdl::download /TIMEOUT=30000 $JavaDownload $2 - Pop $R0 ;Get the return value - StrCmp $R0 "success" +3 - MessageBox MB_OK "Download failed: $R0" - Quit - ExecWait $2 - Delete $2 -FunctionEnd - -Function DetectJRE - ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" \ - "CurrentVersion" - - StrCmp $2 ${JRE_VERSION} done - - StrCmp $2 ${JRE_ALTERNATE} done - - Call GetJRE - - done: -FunctionEnd - ; Pages to present Page license -- cgit v1.2.3 From c93c4efefee0dbf6d193466efd6761d9a1849ae9 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 18 Jun 2014 02:15:04 -0700 Subject: icon: Construct .exe files to hold windows icons for file associations It appears that creating an executable with an icon resource is the only way to display icons for files. Fortunately, that's not all that hard. Signed-off-by: Keith Packard --- Makefile.am | 1 + icon/.gitignore | 1 + icon/Makefile.am | 19 ++++++++++++++++++- icon/altus-metrum.rc | 1 + icon/micro-peak.rc | 1 + icon/telegps.rc | 1 + icon/windows-stub.c | 2 ++ 7 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 icon/altus-metrum.rc create mode 100644 icon/micro-peak.rc create mode 100644 icon/telegps.rc create mode 100644 icon/windows-stub.c diff --git a/Makefile.am b/Makefile.am index 15d2c82d..2f8a5ee1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -18,6 +18,7 @@ fat: cd libaltos && $(MAKE) all cd altoslib && $(MAKE) all cd altosuilib && $(MAKE) all + cd icon && $(MAKE) fat cd altosui && $(MAKE) fat cd micropeak && $(MAKE) fat cd telegps && $(MAKE) fat diff --git a/icon/.gitignore b/icon/.gitignore index e89555de..40cf2f3e 100644 --- a/icon/.gitignore +++ b/icon/.gitignore @@ -4,3 +4,4 @@ telegps-*.png *.ico *.icns *.build +*.exe diff --git a/icon/Makefile.am b/icon/Makefile.am index b1c00f4b..61a16914 100644 --- a/icon/Makefile.am +++ b/icon/Makefile.am @@ -34,7 +34,7 @@ res: all-local: $(ICO_FILES) $(ICNS_FILES) clean-local: - $(RM) altus-metrum-*.png telegps-*.png micropeak-*.png *.build *.ico *.icns + $(RM) altus-metrum-*.png telegps-*.png micropeak-*.png *.build *.ico *.icns *.o *.exe $(AM_FILES): altusmetrum.build @@ -71,3 +71,20 @@ TeleGPS.icns: $(MAC_TG_FILES) MicroPeak.icns: $(MAC_MP_FILES) png2icns $@ $(MAC_MP_FILES) + +MINGCC32=i686-w64-mingw32-gcc +MINGWINDRES=i686-w64-mingw32-windres + +SUFFIXES=.rc .exe + +fat: all micro-peak.exe altus-metrum.exe telegps.exe + +altus-metrum.o: altus-metrum.ico +micro-peak.o: micro-peak.ico +telegps.o: telegps.ico + +.rc.o: + $(MINGWINDRES) $*.rc $@ + +.o.exe: + $(MINGCC32) -o $@ windows-stub.c $*.o diff --git a/icon/altus-metrum.rc b/icon/altus-metrum.rc new file mode 100644 index 00000000..bbd03604 --- /dev/null +++ b/icon/altus-metrum.rc @@ -0,0 +1 @@ +101 ICON "altus-metrum.ico" diff --git a/icon/micro-peak.rc b/icon/micro-peak.rc new file mode 100644 index 00000000..4efe777d --- /dev/null +++ b/icon/micro-peak.rc @@ -0,0 +1 @@ +101 ICON "micro-peak.ico" diff --git a/icon/telegps.rc b/icon/telegps.rc new file mode 100644 index 00000000..7f5957f9 --- /dev/null +++ b/icon/telegps.rc @@ -0,0 +1 @@ +101 ICON "telegps.ico" diff --git a/icon/windows-stub.c b/icon/windows-stub.c new file mode 100644 index 00000000..8df3e0aa --- /dev/null +++ b/icon/windows-stub.c @@ -0,0 +1,2 @@ +__stdcall +WinMain(int a, int b, int c, int d) { return 0; } -- cgit v1.2.3 From 5871225a0c442cf5afa41a444ff8bfb8f4002721 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 18 Jun 2014 02:16:51 -0700 Subject: windows installer: Create file associations for Windows. This makes icons appear for the files in the file manager, and lets you double-click on the files to open the appropriate application. Signed-off-by: Keith Packard --- altosui/Makefile.am | 2 +- altosui/altos-windows.nsi.in | 118 ++++++++++++++++++++++++++++-------- micropeak/Makefile.am | 2 +- micropeak/micropeak-windows.nsi.in | 120 +++++++++++++++++++++++++++---------- telegps/Makefile.am | 2 +- telegps/telegps-windows.nsi.in | 118 ++++++++++++++++++++++++++++-------- 6 files changed, 277 insertions(+), 85 deletions(-) diff --git a/altosui/Makefile.am b/altosui/Makefile.am index 98a5e193..45f4467a 100644 --- a/altosui/Makefile.am +++ b/altosui/Makefile.am @@ -90,7 +90,7 @@ ICONJAR= -C $(ICONDIR) altus-metrum-16.png \ -C $(ICONDIR) altus-metrum-128.png \ -C $(ICONDIR) altus-metrum-256.png -WINDOWS_ICON=$(ICONDIR)/altus-metrum.ico +WINDOWS_ICON=$(ICONDIR)/altus-metrum.ico $(ICONDIR)/altus-metrum.exe MACOSX_ICON=$(ICONDIR)/AltosUIIcon.icns # Firmware diff --git a/altosui/altos-windows.nsi.in b/altosui/altos-windows.nsi.in index ab5ac453..da36ad90 100644 --- a/altosui/altos-windows.nsi.in +++ b/altosui/altos-windows.nsi.in @@ -2,16 +2,22 @@ !addincludedir Instdrv/NSIS/Includes !include x64.nsh !include java.nsh +!include refresh-sh.nsh -!define PRODUCT_NAME "Altus Metrum Windows Software" +!define REG_NAME "Altus Metrum" +!define PROG_ID "org.altusmetrum.altosui.1" +!define PROG_ALTOSUI "org.altusmetrum.altosui.1" +!define FAT_NAME "altosui-fat.jar" +!define ICO_ICO "altus-metrum.ico" +!define ICO_EXE "altus-metrum.exe" -Name "Altus Metrum Installer" +Name "${REG_NAME} Installer" ; Default install directory InstallDir "$PROGRAMFILES\AltusMetrum" ; Tell the installer where to re-install a new version -InstallDirRegKey HKLM "Software\AltusMetrum" "Install_Dir" +InstallDirRegKey HKLM "Software\${REG_NAME}" "Install_Dir" LicenseText "GNU General Public License Version 2" LicenseData "../COPYING" @@ -21,7 +27,7 @@ RequestExecutionLevel admin ShowInstDetails Show -ComponentText "Altus Metrum Software and Driver Installer" +ComponentText "${REG_NAME} Software and Driver Installer" Function .onInit DetailPrint "Checking host operating system" @@ -33,6 +39,16 @@ Function .onInit ${EndIf} FunctionEnd +Function un.onInit + DetailPrint "Checking host operating system" + ${If} ${RunningX64} + DetailPrint "Installer running on 64-bit host" + SetRegView 64 + StrCpy $INSTDIR "$PROGRAMFILES64\AltusMetrum" + ${DisableX64FSRedirection} + ${EndIf} +FunctionEnd + ; Pages to present Page license @@ -68,12 +84,12 @@ done: SectionEnd -Section "AltosUI Application" +Section "${REG_NAME} Application" Call DetectJRE SetOutPath $INSTDIR - File "altosui-fat.jar" + File "${FAT_NAME}" File "altoslib_@ALTOSLIB_VERSION@.jar" File "altosuilib_@ALTOSUILIB_VERSION@.jar" File "cmudict04.jar" @@ -88,13 +104,13 @@ Section "AltosUI Application" File "*.dll" - File "../icon/*.ico" + File "../icon/${ICO_ICO}" - CreateShortCut "$SMPROGRAMS\AltusMetrum.lnk" "$SYSDIR\javaw.exe" "-jar altosui-fat.jar" "$INSTDIR\altus-metrum.ico" + CreateShortCut "$SMPROGRAMS\${REG_NAME}.lnk" "$SYSDIR\javaw.exe" "-jar ${FAT_NAME}" "$INSTDIR\${ICO_ICO}" SectionEnd -Section "AltosUI Desktop Shortcut" - CreateShortCut "$DESKTOP\AltusMetrum.lnk" "$INSTDIR\altosui-fat.jar" "" "$INSTDIR\altus-metrum.ico" +Section "${REG_NAME} Desktop Shortcut" + CreateShortCut "$DESKTOP\${REG_NAME}.lnk" "$INSTDIR\${FAT_NAME}" "" "$INSTDIR\${ICO_ICO}" SectionEnd Section "TeleMetrum, TeleDongle and TeleBT Firmware" @@ -126,38 +142,88 @@ Section "Documentation" File "../doc/telemini.pdf" SectionEnd +Section "File Associations" + + SetOutPath $INSTDIR + + File "../icon/${ICO_EXE}" + + ; application elements + + WriteRegStr HKCR "${PROG_ID}" "" "Altus Metrum Data File" + WriteRegStr HKCR "${PROG_ID}" "FriendlyTypeName" "Altus Metrum Data File" + WriteRegStr HKCR "${PROG_ID}\CurVer" "" "${PROG_ID}" + WriteRegStr HKCR "${PROG_ID}\DefaultIcon" "" '"$INSTDIR\${ICO_EXE}",-101' + WriteRegExpandStr HKCR "${PROG_ID}\shell\play\command" "" '"%SYSTEMROOT%\System32\javaw.exe" -Djava.library.path="$INSTDIR" -jar "$INSTDIR\${FAT_NAME}" "%1"' + + ; .eeprom elements + + WriteRegStr HKCR ".eeprom" "" "${PROG_ALTOSUI}" + WriteRegStr HKCR ".eeprom" "PerceivedType" "Altus Metrum Log File" + WriteRegStr HKCR ".eeprom" "Content Type" "application/altosui" + + WriteRegStr HKCR ".eeprom\OpenWithProgids" "${PROG_ID}" "" + WriteRegStr HKCR ".eeprom\${PROG_ID}" "" "${REG_NAME}" + + ; .telem elements + + WriteRegStr HKCR ".telem" "" "${PROG_ALTOSUI}" + WriteRegStr HKCR ".telem" "PerceivedType" "Altus Metrum Telemetry File" + WriteRegStr HKCR ".telem" "Content Type" "application/altosui" + + WriteRegStr HKCR ".telem\OpenWithProgids" "${PROG_ID}" "" + WriteRegStr HKCR ".telem\${PROG_ID}" "" "${REG_NAME}" + + Call RefreshShellIcons +SectionEnd + Section "Uninstaller" ; Deal with the uninstaller + ${DisableX64FSRedirection} SetOutPath $INSTDIR ; Write the install path to the registry - WriteRegStr HKLM SOFTWARE\AltusMetrum "Install_Dir" "$INSTDIR" + WriteRegStr HKLM "SOFTWARE\${REG_NAME}" "Install_Dir" "$INSTDIR" ; Write the uninstall keys for windows - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "DisplayName" "Altus Metrum" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "UninstallString" '"$INSTDIR\uninstall.exe"' - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "NoModify" "1" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "NoRepair" "1" + WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_NAME}" "DisplayName" "${REG_NAME}" + WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_NAME}" "UninstallString" '"$INSTDIR\uninstall-${REG_NAME}.exe"' + WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_NAME}" "NoModify" "1" + WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_NAME}" "NoRepair" "1" - WriteUninstaller "uninstall.exe" + WriteUninstaller "uninstall-${REG_NAME}.exe" SectionEnd Section "Uninstall" - DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" - DeleteRegKey HKLM "Software\AltusMetrum" - Delete "$INSTDIR\*.*" - RMDir "$INSTDIR" + ${DisableX64FSRedirection} - ; Remove devices - InstDrv::InitDriverSetup /NOUNLOAD {4D36E96D-E325-11CE-BFC1-08002BE10318} AltusMetrumSerial - InstDrv::DeleteOemInfFiles /NOUNLOAD - InstDrv::RemoveAllDevices + DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_NAME}" + DeleteRegKey HKLM "SOFTWARE\${REG_NAME}" + + DetailPrint "Delete uninstall reg entries" + + DeleteRegKey HKCR "${PROG_ID}" + + DeleteRegKey HKCR ".eeprom\${PROG_ID}" + DeleteRegValue HKCR ".eeprom\OpenWithProgids" "${PROG_ID}" + + DeleteRegKey HKCR ".telem\${PROG_ID}" + DeleteRegValue HKCR ".telem\OpenWithProgids" "${PROG_ID}" + + DetailPrint "Delete file association reg entries" + + Delete "$INSTDIR\${FAT_NAME}" + Delete "$INSTDIR\uninstall-${REG_NAME}.exe" + + Delete "$INSTDIR\${ICO_ICO}" + Delete "$INSTDIR\${ICO_EXE}" ; Remove shortcuts, if any - Delete "$SMPROGRAMS\AltusMetrum.lnk" - Delete "$DESKTOP\AltusMetrum.lnk" + Delete "$SMPROGRAMS\${REG_NAME}.lnk" + Delete "$DESKTOP\${REG_NAME}.lnk" + Call un.RefreshShellIcons SectionEnd diff --git a/micropeak/Makefile.am b/micropeak/Makefile.am index 39ebc43a..1e09e523 100644 --- a/micropeak/Makefile.am +++ b/micropeak/Makefile.am @@ -71,7 +71,7 @@ ICONJAR= -C $(ICONDIR) micropeak-16.png \ -C $(ICONDIR) micropeak-128.png \ -C $(ICONDIR) micropeak-256.png -WINDOWS_ICON=$(ICONDIR)/micro-peak.ico +WINDOWS_ICON=$(ICONDIR)/micro-peak.ico $(ICONDIR)/micro-peak.exe MACOSX_ICON=$(ICONDIR)/MicroPeak.icns desktopdir = $(datadir)/applications diff --git a/micropeak/micropeak-windows.nsi.in b/micropeak/micropeak-windows.nsi.in index bb5da1bb..d8e47505 100644 --- a/micropeak/micropeak-windows.nsi.in +++ b/micropeak/micropeak-windows.nsi.in @@ -1,15 +1,22 @@ -!addplugindir Instdrv/NSIS/Plugins +!addplugindir ../altosui/Instdrv/NSIS/Plugins !addincludedir ../altosui/Instdrv/NSIS/Includes !include x64.nsh !include java.nsh +!include refresh-sh.nsh -Name "Altus Metrum MicroPeak Installer" +!define REG_NAME "MicroPeak" +!define PROG_ID "org.altusmetrum.micropeak.1" +!define FAT_NAME "micropeak-fat.jar" +!define ICO_ICO "micro-peak.ico" +!define ICO_EXE "micro-peak.exe" + +Name "${REG_NAME} Installer" ; Default install directory InstallDir "$PROGRAMFILES\AltusMetrum" ; Tell the installer where to re-install a new version -InstallDirRegKey HKLM "Software\AltusMetrum" "Install_Dir" +InstallDirRegKey HKLM "Software\${REG_NAME}" "Install_Dir" LicenseText "GNU General Public License Version 2" LicenseData "../COPYING" @@ -19,7 +26,7 @@ RequestExecutionLevel admin ShowInstDetails Show -ComponentText "Altus Metrum MicroPeak Software Installer" +ComponentText "${REG_NAME} Software and Driver Installer" Function .onInit DetailPrint "Checking host operating system" @@ -31,6 +38,16 @@ Function .onInit ${EndIf} FunctionEnd +Function un.onInit + DetailPrint "Checking host operating system" + ${If} ${RunningX64} + DetailPrint "Installer running on 64-bit host" + SetRegView 64 + StrCpy $INSTDIR "$PROGRAMFILES64\AltusMetrum" + ${DisableX64FSRedirection} + ${EndIf} +FunctionEnd + ; Pages to present Page license @@ -43,12 +60,21 @@ UninstPage instfiles ; And the stuff to install -Section "MicroPeak Application" +Section "FTDI USB Driver" + SetOutPath $INSTDIR + + File "CDM20824_Setup.exe" + + StrCpy $2 "$INSTDIR\CDM20824_Setup.exe" + ExecWait $2 +SectionEnd + +Section "${REG_NAME} Application" Call DetectJRE SetOutPath $INSTDIR - File "micropeak-fat.jar" + File "${FAT_NAME}" File "altoslib_@ALTOSLIB_VERSION@.jar" File "altosuilib_@ALTOSUILIB_VERSION@.jar" File "jfreechart.jar" @@ -56,22 +82,13 @@ Section "MicroPeak Application" File "*.dll" - File "../icon/*.ico" + File "../icon/${ICO_ICO}" - CreateShortCut "$SMPROGRAMS\MicroPeak.lnk" "$SYSDIR\javaw.exe" "-jar micropeak-fat.jar" "$INSTDIR\micro-peak.ico" + CreateShortCut "$SMPROGRAMS\${REG_NAME}.lnk" "$SYSDIR\javaw.exe" "-jar ${FAT_NAME}" "$INSTDIR\${ICO_ICO}" SectionEnd -Section "FTDI USB Driver" - SetOutPath $INSTDIR - - File "CDM20824_Setup.exe" - - StrCpy $2 "$INSTDIR\CDM20824_Setup.exe" - ExecWait $2 -SectionEnd - -Section "MicroPeak Desktop Shortcut" - CreateShortCut "$DESKTOP\MicroPeak.lnk" "$INSTDIR\micropeak-fat.jar" "" "$INSTDIR\micro-peak.ico" +Section "${REG_NAME} Desktop Shortcut" + CreateShortCut "$DESKTOP\${REG_NAME}.lnk" "$INSTDIR\${FAT_NAME}" "" "$INSTDIR\${ICO_ICO}" SectionEnd Section "Documentation" @@ -81,33 +98,74 @@ Section "Documentation" File "../doc/micropeak.pdf" SectionEnd +Section "File Associations" + + SetOutPath $INSTDIR + + File "../icon/${ICO_EXE}" + + ; application elements + + WriteRegStr HKCR "${PROG_ID}" "" "MicroPeak Data File" + WriteRegStr HKCR "${PROG_ID}" "FriendlyTypeName" "MicroPeak Data File" + WriteRegStr HKCR "${PROG_ID}\CurVer" "" "${PROG_ID}" + WriteRegStr HKCR "${PROG_ID}\DefaultIcon" "" '"$INSTDIR\${ICO_EXE}",-101' + WriteRegExpandStr HKCR "${PROG_ID}\shell\play\command" "" '"%SYSTEMROOT%\System32\javaw.exe" -Djava.library.path="$INSTDIR" -jar "$INSTDIR\${FAT_NAME}" "%1"' + + ; .mpd elements + + WriteRegStr HKCR ".mpd" "" "${PROG_ID}" + WriteRegStr HKCR ".mpd" "PerceivedType" "MicroPeak Data File" + WriteRegStr HKCR ".mpd" "Content Type" "application/micropeak" + + WriteRegStr HKCR ".mpd\OpenWithProgids" "${PROG_ID}" "" + WriteRegStr HKCR ".mpd\${PROG_ID}" "" "${REG_NAME}" + + Call RefreshShellIcons +SectionEnd + Section "Uninstaller" ; Deal with the uninstaller + ${DisableX64FSRedirection} SetOutPath $INSTDIR ; Write the install path to the registry - WriteRegStr HKLM SOFTWARE\AltusMetrum "Install_Dir" "$INSTDIR" + WriteRegStr HKLM "SOFTWARE\${REG_NAME}" "Install_Dir" "$INSTDIR" ; Write the uninstall keys for windows - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "DisplayName" "Altus Metrum" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "UninstallString" '"$INSTDIR\uninstall.exe"' - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "NoModify" "1" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "NoRepair" "1" + WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_NAME}" "DisplayName" "${REG_NAME}" + WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_NAME}" "UninstallString" '"$INSTDIR\uninstall-${REG_NAME}.exe"' + WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_NAME}" "NoModify" "1" + WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_NAME}" "NoRepair" "1" - WriteUninstaller "uninstall.exe" + WriteUninstaller "uninstall-${REG_NAME}.exe" SectionEnd Section "Uninstall" - DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" - DeleteRegKey HKLM "Software\AltusMetrum" - Delete "$INSTDIR\*.*" - RMDir "$INSTDIR" + ${DisableX64FSRedirection} + + DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_NAME}" + DeleteRegKey HKLM "SOFTWARE\${REG_NAME}" + + DetailPrint "Delete uninstall reg entries" + + DeleteRegKey HKCR "${PROG_ID}" + + DeleteRegKey HKCR ".mpd\${PROG_ID}" + DeleteRegValue HKCR ".mpd\OpenWithProgids" "${PROG_ID}" + + Delete "$INSTDIR\${FAT_NAME}" + Delete "$INSTDIR\uninstall-${REG_NAME}.exe" + + Delete "$INSTDIR\${ICO_ICO}" + Delete "$INSTDIR\${ICO_EXE}" ; Remove shortcuts, if any - Delete "$SMPROGRAMS\MicroPeak.lnk" - Delete "$DESKTOP\MicroPeak.lnk" + Delete "$SMPROGRAMS\${REG_NAME}.lnk" + Delete "$DESKTOP\${REG_NAME}.lnk" + Call un.RefreshShellIcons SectionEnd diff --git a/telegps/Makefile.am b/telegps/Makefile.am index 7b550e9e..8868c723 100644 --- a/telegps/Makefile.am +++ b/telegps/Makefile.am @@ -73,7 +73,7 @@ ICONJAR= -C $(ICONDIR) telegps-16.png \ -C $(ICONDIR) telegps-128.png \ -C $(ICONDIR) telegps-256.png -WINDOWS_ICON=$(ICONDIR)/telegps.ico +WINDOWS_ICON=$(ICONDIR)/telegps.ico $(ICONDIR)/telegps.exe MACOSX_ICON=$(ICONDIR)/TeleGPS.icns # Firmware diff --git a/telegps/telegps-windows.nsi.in b/telegps/telegps-windows.nsi.in index b4145520..3f9648f9 100644 --- a/telegps/telegps-windows.nsi.in +++ b/telegps/telegps-windows.nsi.in @@ -2,14 +2,22 @@ !addincludedir ../altosui/Instdrv/NSIS/Includes !include x64.nsh !include java.nsh +!include refresh-sh.nsh -Name "TeleGPS Installer" +!define REG_NAME "TeleGPS" +!define PROG_ID "org.altusmetrum.telegps.1" +!define PROG_ALTOSUI "org.altusmetrum.altosui.1" +!define FAT_NAME "telegps-fat.jar" +!define ICO_ICO "telegps.ico" +!define ICO_EXE "telegps.exe" + +Name "${REG_NAME} Installer" ; Default install directory InstallDir "$PROGRAMFILES\AltusMetrum" ; Tell the installer where to re-install a new version -InstallDirRegKey HKLM "Software\AltusMetrum" "Install_Dir" +InstallDirRegKey HKLM "Software\${REG_NAME}" "Install_Dir" LicenseText "GNU General Public License Version 2" LicenseData "../COPYING" @@ -19,7 +27,7 @@ RequestExecutionLevel admin ShowInstDetails Show -ComponentText "TeleGPS Software Installer" +ComponentText "${REG_NAME} Software and Driver Installer" Function .onInit DetailPrint "Checking host operating system" @@ -31,6 +39,16 @@ Function .onInit ${EndIf} FunctionEnd +Function un.onInit + DetailPrint "Checking host operating system" + ${If} ${RunningX64} + DetailPrint "Installer running on 64-bit host" + SetRegView 64 + StrCpy $INSTDIR "$PROGRAMFILES64\AltusMetrum" + ${DisableX64FSRedirection} + ${EndIf} +FunctionEnd + ; Pages to present Page license @@ -66,12 +84,12 @@ done: SectionEnd -Section "TeleGPS Application" +Section "${REG_NAME} Application" Call DetectJRE SetOutPath $INSTDIR - File "telegps-fat.jar" + File "${FAT_NAME}" File "altoslib_@ALTOSLIB_VERSION@.jar" File "altosuilib_@ALTOSUILIB_VERSION@.jar" File "cmudict04.jar" @@ -86,13 +104,13 @@ Section "TeleGPS Application" File "*.dll" - File "../icon/*.ico" + File "../icon/${ICO_ICO}" - CreateShortCut "$SMPROGRAMS\TeleGPS.lnk" "$SYSDIR\javaw.exe" "-jar telegps-fat.jar" "$INSTDIR\telegps.ico" + CreateShortCut "$SMPROGRAMS\${REG_NAME}.lnk" "$SYSDIR\javaw.exe" "-jar ${FAT_NAME}" "$INSTDIR\${ICO_ICO}" SectionEnd -Section "TeleGPS Desktop Shortcut" - CreateShortCut "$DESKTOP\TeleGPS.lnk" "$INSTDIR\telegps-fat.jar" "" "$INSTDIR\telegps.ico" +Section "${REG_NAME} Desktop Shortcut" + CreateShortCut "$DESKTOP\${REG_NAME}.lnk" "$INSTDIR\${FAT_NAME}" "" "$INSTDIR\${ICO_ICO}" SectionEnd Section "TeleGPS, TeleDongle and TeleBT Firmware" @@ -114,38 +132,88 @@ Section "Documentation" File "../doc/telemetry.pdf" SectionEnd +Section "File Associations" + + SetOutPath $INSTDIR + + File "../icon/${ICO_EXE}" + + ; application elements + + WriteRegStr HKCR "${PROG_ID}" "" "Altus Metrum Data File" + WriteRegStr HKCR "${PROG_ID}" "FriendlyTypeName" "Altus Metrum Data File" + WriteRegStr HKCR "${PROG_ID}\CurVer" "" "${PROG_ID}" + WriteRegStr HKCR "${PROG_ID}\DefaultIcon" "" '"$INSTDIR\${ICO_EXE}",-101' + WriteRegExpandStr HKCR "${PROG_ID}\shell\play\command" "" '"%SYSTEMROOT%\System32\javaw.exe" -Djava.library.path="$INSTDIR" -jar "$INSTDIR\${FAT_NAME}" "%1"' + + ; .eeprom elements + + WriteRegStr HKCR ".eeprom" "" "${PROG_ALTOSUI}" + WriteRegStr HKCR ".eeprom" "PerceivedType" "Altus Metrum Log File" + WriteRegStr HKCR ".eeprom" "Content Type" "application/altosui" + + WriteRegStr HKCR ".eeprom\OpenWithProgids" "${PROG_ID}" "" + WriteRegStr HKCR ".eeprom\${PROG_ID}" "" "${REG_NAME}" + + ; .telem elements + + WriteRegStr HKCR ".telem" "" "${PROG_ALTOSUI}" + WriteRegStr HKCR ".telem" "PerceivedType" "Altus Metrum Telemetry File" + WriteRegStr HKCR ".telem" "Content Type" "application/altosui" + + WriteRegStr HKCR ".telem\OpenWithProgids" "${PROG_ID}" "" + WriteRegStr HKCR ".telem\${PROG_ID}" "" "${REG_NAME}" + + Call RefreshShellIcons +SectionEnd + Section "Uninstaller" ; Deal with the uninstaller + ${DisableX64FSRedirection} SetOutPath $INSTDIR ; Write the install path to the registry - WriteRegStr HKLM SOFTWARE\AltusMetrum "Install_Dir" "$INSTDIR" + WriteRegStr HKLM "SOFTWARE\${REG_NAME}" "Install_Dir" "$INSTDIR" ; Write the uninstall keys for windows - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "DisplayName" "Altus Metrum" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "UninstallString" '"$INSTDIR\uninstall.exe"' - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "NoModify" "1" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "NoRepair" "1" + WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_NAME}" "DisplayName" "${REG_NAME}" + WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_NAME}" "UninstallString" '"$INSTDIR\uninstall-${REG_NAME}.exe"' + WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_NAME}" "NoModify" "1" + WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_NAME}" "NoRepair" "1" - WriteUninstaller "uninstall.exe" + WriteUninstaller "uninstall-${REG_NAME}.exe" SectionEnd Section "Uninstall" - DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" - DeleteRegKey HKLM "Software\AltusMetrum" - Delete "$INSTDIR\*.*" - RMDir "$INSTDIR" + ${DisableX64FSRedirection} - ; Remove devices - InstDrv::InitDriverSetup /NOUNLOAD {4D36E96D-E325-11CE-BFC1-08002BE10318} AltusMetrumSerial - InstDrv::DeleteOemInfFiles /NOUNLOAD - InstDrv::RemoveAllDevices + DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_NAME}" + DeleteRegKey HKLM "SOFTWARE\${REG_NAME}" + + DetailPrint "Delete uninstall reg entries" + + DeleteRegKey HKCR "${PROG_ID}" + + DeleteRegKey HKCR ".eeprom\${PROG_ID}" + DeleteRegValue HKCR ".eeprom\OpenWithProgids" "${PROG_ID}" + + DeleteRegKey HKCR ".telem\${PROG_ID}" + DeleteRegValue HKCR ".telem\OpenWithProgids" "${PROG_ID}" + + DetailPrint "Delete file association reg entries" + + Delete "$INSTDIR\${FAT_NAME}" + Delete "$INSTDIR\uninstall-${REG_NAME}.exe" + + Delete "$INSTDIR\${ICO_ICO}" + Delete "$INSTDIR\${ICO_EXE}" ; Remove shortcuts, if any - Delete "$SMPROGRAMS\TeleGPS.lnk" - Delete "$DESKTOP\TeleGPS.lnk" + Delete "$SMPROGRAMS\${REG_NAME}.lnk" + Delete "$DESKTOP\${REG_NAME}.lnk" + Call un.RefreshShellIcons SectionEnd -- cgit v1.2.3 From fac94c593285eacda57de257fa2be0548341b567 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 18 Jun 2014 14:15:27 -0700 Subject: macosx: Define icons for our file types on OS X Adds definitions to the Info.plist files shipped to specify which icons to show for .telem, .eeprom and .mpd files. Note that the applications don't respond to open apple events, so double clicking on a file only starts the application. Signed-off-by: Keith Packard --- altosui/Info.plist.in | 27 +++++++++++++++++++++++++++ micropeak/Info.plist.in | 15 +++++++++++++++ telegps/Info.plist.in | 27 +++++++++++++++++++++++++++ 3 files changed, 69 insertions(+) diff --git a/altosui/Info.plist.in b/altosui/Info.plist.in index 46dea171..bae6d52c 100644 --- a/altosui/Info.plist.in +++ b/altosui/Info.plist.in @@ -24,6 +24,33 @@ 6.0 CFBundleIconFile AltosUIIcon.icns + CFBundleDocumentTypes + + + CFBundleTypeName + Telemetry + CFBundleTypeIconFile + AltosUIIcon.icns + CFBundleTypeExtensions + + telem + + CFBundleTypeRole + Editor + + + CFBundleTypeName + Eeprom + CFBundleTypeIconFile + AltosUIIcon.icns + CFBundleTypeExtensions + + eeprom + + CFBundleTypeRole + Editor + + Java MainClass diff --git a/micropeak/Info.plist.in b/micropeak/Info.plist.in index 40984c5a..8f751079 100644 --- a/micropeak/Info.plist.in +++ b/micropeak/Info.plist.in @@ -24,6 +24,21 @@ 6.0 CFBundleIconFile MicroPeak.icns + CFBundleDocumentTypes + + + CFBundleTypeName + MicroPeak data file + CFBundleTypeIconFile + MicroPeak.icns + CFBundleTypeExtensions + + mpd + + CFBundleTypeRole + Editor + + Java MainClass diff --git a/telegps/Info.plist.in b/telegps/Info.plist.in index df05bb6e..7dbb77d1 100644 --- a/telegps/Info.plist.in +++ b/telegps/Info.plist.in @@ -24,6 +24,33 @@ 6.0 CFBundleIconFile TeleGPS.icns + CFBundleDocumentTypes + + + CFBundleTypeName + Telemetry + CFBundleTypeIconFile + TeleGPS.icns + CFBundleTypeExtensions + + telem + + CFBundleTypeRole + Editor + + + CFBundleTypeName + Eeprom + CFBundleTypeIconFile + TeleGPS.icns + CFBundleTypeExtensions + + eeprom + + CFBundleTypeRole + Editor + + Java MainClass -- cgit v1.2.3 From e3eab18682e77c5394918448409d383a28ba23ad Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 18 Jun 2014 14:16:36 -0700 Subject: altosui: Ship TeleMetrum v2.0 firmware with AltosUI Signed-off-by: Keith Packard --- altosui/Makefile.am | 3 ++- altosui/altos-windows.nsi.in | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/altosui/Makefile.am b/altosui/Makefile.am index 45f4467a..352fb430 100644 --- a/altosui/Makefile.am +++ b/altosui/Makefile.am @@ -100,7 +100,8 @@ FIRMWARE_TD=$(FIRMWARE_TD_0_2) FIRMWARE_TM_1_0=$(top_srcdir)/src/telemetrum-v1.0/telemetrum-v1.0-$(VERSION).ihx FIRMWARE_TM_1_1=$(top_srcdir)/src/telemetrum-v1.1/telemetrum-v1.1-$(VERSION).ihx FIRMWARE_TM_1_2=$(top_srcdir)/src/telemetrum-v1.2/telemetrum-v1.2-$(VERSION).ihx -FIRMWARE_TM=$(FIRMWARE_TM_1_0) $(FIRMWARE_TM_1_1) $(FIRMWARE_TM_1_2) +FIRMWARE_TM_2_0=$(top_srcdir)/src/telemetrum-v2.0/telemetrum-v2.0-$(VERSION).ihx +FIRMWARE_TM=$(FIRMWARE_TM_1_0) $(FIRMWARE_TM_1_1) $(FIRMWARE_TM_1_2) $(FIRMWARE_TM_2_0) FIRMWARE_TELEMINI_1_0=$(top_srcdir)/src/telemini-v1.0/telemini-v1.0-$(VERSION).ihx FIRMWARE_TELEMINI=$(FIRMWARE_TELEMINI_1_0) diff --git a/altosui/altos-windows.nsi.in b/altosui/altos-windows.nsi.in index da36ad90..c6da097e 100644 --- a/altosui/altos-windows.nsi.in +++ b/altosui/altos-windows.nsi.in @@ -120,6 +120,7 @@ Section "TeleMetrum, TeleDongle and TeleBT Firmware" File "../src/telemetrum-v1.0/telemetrum-v1.0-${VERSION}.ihx" File "../src/telemetrum-v1.1/telemetrum-v1.1-${VERSION}.ihx" File "../src/telemetrum-v1.2/telemetrum-v1.2-${VERSION}.ihx" + File "../src/telemetrum-v2.0/telemetrum-v2.0-${VERSION}.ihx" File "../src/telemini-v1.0/telemini-v1.0-${VERSION}.ihx" File "../src/telegps-v1.0/telegps-v1.0-${VERSION}.ihx" File "../src/teledongle-v0.2/teledongle-v0.2-${VERSION}.ihx" -- cgit v1.2.3 From d5bdb1c5974788b9569897435808fd01b04b0c4d Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 18 Jun 2014 16:14:44 -0700 Subject: altosuilib: Hook up apple messages to callbacks This supports open, quit and preferences. I'm leaving 'about' to the existing stuff until I decide it's worth the effort to create a fancy about dialog. Signed-off-by: Keith Packard --- altosuilib/AltosUIFrame.java | 46 +++++++++- altosuilib/Makefile.am | 3 +- altosuilib/OSXAdapter.java | 206 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 253 insertions(+), 2 deletions(-) create mode 100755 altosuilib/OSXAdapter.java diff --git a/altosuilib/AltosUIFrame.java b/altosuilib/AltosUIFrame.java index 689ea7f3..5b915e85 100644 --- a/altosuilib/AltosUIFrame.java +++ b/altosuilib/AltosUIFrame.java @@ -163,6 +163,50 @@ public class AltosUIFrame extends JFrame implements AltosUIListener, AltosPositi return "Altus Metrum"; } + public void macosx_quit_handler() { + System.out.printf("Got quit handler\n"); + } + + public void macosx_about_handler() { + System.out.printf("Got about handler\n"); + } + + public void macosx_preferences_handler() { + System.out.printf("Got preferences handler\n"); + } + + public void macosx_file_handler(String path) { + System.out.printf("Got file handler with \"%s\"\n", path); + } + + /* Check that we are on Mac OS X. This is crucial to loading and using the OSXAdapter class. + */ + public static boolean MAC_OS_X = (System.getProperty("os.name").toLowerCase().startsWith("mac os x")); + + private static boolean registered_for_macosx_events; + + /* Generic registration with the Mac OS X application menu + * Checks the platform, then attempts to register with the Apple EAWT + * See OSXAdapter.java to see how this is done without directly referencing any Apple APIs + */ + public synchronized void register_for_macosx_events() { + if (registered_for_macosx_events) + return; + registered_for_macosx_events = true; + if (MAC_OS_X) { + try { + // Generate and register the OSXAdapter, passing it a hash of all the methods we wish to + // use as delegates for various com.apple.eawt.ApplicationListener methods + OSXAdapter.setQuitHandler(this, getClass().getDeclaredMethod("macosx_quit_handler", (Class[])null)); +// OSXAdapter.setAboutHandler(this, getClass().getDeclaredMethod("macosx_about_handler", (Class[])null)); + OSXAdapter.setPreferencesHandler(this, getClass().getDeclaredMethod("macosx_preferences_handler", (Class[])null)); + OSXAdapter.setFileHandler(this, getClass().getDeclaredMethod("macosx_file_handler", new Class[] { String.class })); + } catch (Exception e) { + System.err.println("Error while loading the OSXAdapter:"); + e.printStackTrace(); + } + } + } void init() { AltosUIPreferences.register_ui_listener(this); AltosUIPreferences.register_position_listener(this); @@ -175,7 +219,7 @@ public class AltosUIFrame extends JFrame implements AltosUIListener, AltosPositi global_settings_done = true; System.setProperty("com.apple.mrj.application.apple.menu.about.name", getName()); System.setProperty("com.apple.macos.useScreenMenuBar", "true"); - System.setProperty( "apple.laf.useScreenMenuBar", "true" ); // for older versions of Java + System.setProperty("apple.laf.useScreenMenuBar", "true" ); // for older versions of Java } catch (Exception e) { } } diff --git a/altosuilib/Makefile.am b/altosuilib/Makefile.am index 157cd5e8..bbee6a45 100644 --- a/altosuilib/Makefile.am +++ b/altosuilib/Makefile.am @@ -81,7 +81,8 @@ altosuilib_JAVA = \ AltosUIIndicator.java \ AltosUIUnitsIndicator.java \ AltosUIVoltageIndicator.java \ - AltosUITelemetryMenu.java + AltosUITelemetryMenu.java \ + OSXAdapter.java JAR=altosuilib_$(ALTOSUILIB_VERSION).jar diff --git a/altosuilib/OSXAdapter.java b/altosuilib/OSXAdapter.java new file mode 100755 index 00000000..23aacd78 --- /dev/null +++ b/altosuilib/OSXAdapter.java @@ -0,0 +1,206 @@ +/* + +File: OSXAdapter.java + +Abstract: Hooks existing preferences/about/quit functionality from an + existing Java app into handlers for the Mac OS X application menu. + Uses a Proxy object to dynamically implement the + com.apple.eawt.ApplicationListener interface and register it with the + com.apple.eawt.Application object. This allows the complete project + to be both built and run on any platform without any stubs or + placeholders. Useful for developers looking to implement Mac OS X + features while supporting multiple platforms with minimal impact. + +Version: 2.0 + +Disclaimer: IMPORTANT: This Apple software is supplied to you by +Apple Inc. ("Apple") in consideration of your agreement to the +following terms, and your use, installation, modification or +redistribution of this Apple software constitutes acceptance of these +terms. If you do not agree with these terms, please do not use, +install, modify or redistribute this Apple software. + +In consideration of your agreement to abide by the following terms, and +subject to these terms, Apple grants you a personal, non-exclusive +license, under Apple's copyrights in this original Apple software (the +"Apple Software"), to use, reproduce, modify and redistribute the Apple +Software, with or without modifications, in source and/or binary forms; +provided that if you redistribute the Apple Software in its entirety and +without modifications, you must retain this notice and the following +text and disclaimers in all such redistributions of the Apple Software. +Neither the name, trademarks, service marks or logos of Apple Inc. +may be used to endorse or promote products derived from the Apple +Software without specific prior written permission from Apple. Except +as expressly stated in this notice, no other rights or licenses, express +or implied, are granted by Apple herein, including but not limited to +any patent rights that may be infringed by your derivative works or by +other works in which the Apple Software may be incorporated. + +The Apple Software is provided by Apple on an "AS IS" basis. APPLE +MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION +THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND +OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. + +IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL +OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, +MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED +AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), +STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +Copyright © 2003-2007 Apple, Inc., All Rights Reserved + +*/ + +package org.altusmetrum.altosuilib_3; + +import java.lang.reflect.*; +import java.util.HashMap; + + +public class OSXAdapter implements InvocationHandler { + + protected Object targetObject; + protected Method targetMethod; + protected String proxySignature; + + static Object macOSXApplication; + + // Pass this method an Object and Method equipped to perform application shutdown logic + // The method passed should return a boolean stating whether or not the quit should occur + public static void setQuitHandler(Object target, Method quitHandler) { + setHandler(new OSXAdapter("handleQuit", target, quitHandler)); + } + + // Pass this method an Object and Method equipped to display application info + // They will be called when the About menu item is selected from the application menu + public static void setAboutHandler(Object target, Method aboutHandler) { + boolean enableAboutMenu = (target != null && aboutHandler != null); + if (enableAboutMenu) { + setHandler(new OSXAdapter("handleAbout", target, aboutHandler)); + } + // If we're setting a handler, enable the About menu item by calling + // com.apple.eawt.Application reflectively + try { + Method enableAboutMethod = macOSXApplication.getClass().getDeclaredMethod("setEnabledAboutMenu", new Class[] { boolean.class }); + enableAboutMethod.invoke(macOSXApplication, new Object[] { Boolean.valueOf(enableAboutMenu) }); + } catch (Exception ex) { + System.err.println("OSXAdapter could not access the About Menu"); + ex.printStackTrace(); + } + } + + // Pass this method an Object and a Method equipped to display application options + // They will be called when the Preferences menu item is selected from the application menu + public static void setPreferencesHandler(Object target, Method prefsHandler) { + boolean enablePrefsMenu = (target != null && prefsHandler != null); + if (enablePrefsMenu) { + setHandler(new OSXAdapter("handlePreferences", target, prefsHandler)); + } + // If we're setting a handler, enable the Preferences menu item by calling + // com.apple.eawt.Application reflectively + try { + Method enablePrefsMethod = macOSXApplication.getClass().getDeclaredMethod("setEnabledPreferencesMenu", new Class[] { boolean.class }); + enablePrefsMethod.invoke(macOSXApplication, new Object[] { Boolean.valueOf(enablePrefsMenu) }); + } catch (Exception ex) { + System.err.println("OSXAdapter could not access the About Menu"); + ex.printStackTrace(); + } + } + + // Pass this method an Object and a Method equipped to handle document events from the Finder + // Documents are registered with the Finder via the CFBundleDocumentTypes dictionary in the + // application bundle's Info.plist + public static void setFileHandler(Object target, Method fileHandler) { + setHandler(new OSXAdapter("handleOpenFile", target, fileHandler) { + // Override OSXAdapter.callTarget to send information on the + // file to be opened + public boolean callTarget(Object appleEvent) { + if (appleEvent != null) { + try { + Method getFilenameMethod = appleEvent.getClass().getDeclaredMethod("getFilename", (Class[])null); + String filename = (String) getFilenameMethod.invoke(appleEvent, (Object[])null); + this.targetMethod.invoke(this.targetObject, new Object[] { filename }); + } catch (Exception ex) { + + } + } + return true; + } + }); + } + + // setHandler creates a Proxy object from the passed OSXAdapter and adds it as an ApplicationListener + public static void setHandler(OSXAdapter adapter) { + try { + Class applicationClass = Class.forName("com.apple.eawt.Application"); + if (macOSXApplication == null) { + macOSXApplication = applicationClass.getConstructor((Class[])null).newInstance((Object[])null); + } + Class applicationListenerClass = Class.forName("com.apple.eawt.ApplicationListener"); + Method addListenerMethod = applicationClass.getDeclaredMethod("addApplicationListener", new Class[] { applicationListenerClass }); + // Create a proxy object around this handler that can be reflectively added as an Apple ApplicationListener + Object osxAdapterProxy = Proxy.newProxyInstance(OSXAdapter.class.getClassLoader(), new Class[] { applicationListenerClass }, adapter); + addListenerMethod.invoke(macOSXApplication, new Object[] { osxAdapterProxy }); + } catch (ClassNotFoundException cnfe) { + System.err.println("This version of Mac OS X does not support the Apple EAWT. ApplicationEvent handling has been disabled (" + cnfe + ")"); + } catch (Exception ex) { // Likely a NoSuchMethodException or an IllegalAccessException loading/invoking eawt.Application methods + System.err.println("Mac OS X Adapter could not talk to EAWT:"); + ex.printStackTrace(); + } + } + + // Each OSXAdapter has the name of the EAWT method it intends to listen for (handleAbout, for example), + // the Object that will ultimately perform the task, and the Method to be called on that Object + protected OSXAdapter(String proxySignature, Object target, Method handler) { + this.proxySignature = proxySignature; + this.targetObject = target; + this.targetMethod = handler; + } + + // Override this method to perform any operations on the event + // that comes with the various callbacks + // See setFileHandler above for an example + public boolean callTarget(Object appleEvent) throws InvocationTargetException, IllegalAccessException { + Object result = targetMethod.invoke(targetObject, (Object[])null); + if (result == null) { + return true; + } + return Boolean.valueOf(result.toString()).booleanValue(); + } + + // InvocationHandler implementation + // This is the entry point for our proxy object; it is called every time an ApplicationListener method is invoked + public Object invoke (Object proxy, Method method, Object[] args) throws Throwable { + if (isCorrectMethod(method, args)) { + boolean handled = callTarget(args[0]); + setApplicationEventHandled(args[0], handled); + } + // All of the ApplicationListener methods are void; return null regardless of what happens + return null; + } + + // Compare the method that was called to the intended method when the OSXAdapter instance was created + // (e.g. handleAbout, handleQuit, handleOpenFile, etc.) + protected boolean isCorrectMethod(Method method, Object[] args) { + return (targetMethod != null && proxySignature.equals(method.getName()) && args.length == 1); + } + + // It is important to mark the ApplicationEvent as handled and cancel the default behavior + // This method checks for a boolean result from the proxy method and sets the event accordingly + protected void setApplicationEventHandled(Object event, boolean handled) { + if (event != null) { + try { + Method setHandledMethod = event.getClass().getDeclaredMethod("setHandled", new Class[] { boolean.class }); + // If the target method returns a boolean, use that as a hint + setHandledMethod.invoke(event, new Object[] { Boolean.valueOf(handled) }); + } catch (Exception ex) { + System.err.println("OSXAdapter was unable to handle an ApplicationEvent: " + event); + ex.printStackTrace(); + } + } + } +} -- cgit v1.2.3 From 7767a045d446ea2bc5fe1ec98d89274155f956c4 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 18 Jun 2014 16:18:05 -0700 Subject: macosx: Respond to apple messages in all apps This connects the callbacks in AltosUIFrame to actually do something useful with them. Signed-off-by: Keith Packard --- altosui/AltosUI.java | 15 +++++++++++++++ micropeak/MicroPeak.java | 15 +++++++++++++++ telegps/TeleGPS.java | 24 +++++++++++++++++++++++- 3 files changed, 53 insertions(+), 1 deletion(-) diff --git a/altosui/AltosUI.java b/altosui/AltosUI.java index 1eb03805..0aa5d03c 100644 --- a/altosui/AltosUI.java +++ b/altosui/AltosUI.java @@ -99,10 +99,25 @@ public class AltosUI extends AltosUIFrame { return b; } + /* OSXAdapter interfaces */ + public void macosx_file_handler(String path) { + process_graph(new File(path)); + } + + public void macosx_quit_handler() { + System.exit(0); + } + + public void macosx_preferences_handler() { + ConfigureAltosUI(); + } + public AltosUI() { load_library(null); + register_for_macosx_events(); + AltosUIPreferences.set_component(this); pane = getContentPane(); diff --git a/micropeak/MicroPeak.java b/micropeak/MicroPeak.java index d7d393ba..8bdf4b77 100644 --- a/micropeak/MicroPeak.java +++ b/micropeak/MicroPeak.java @@ -190,10 +190,25 @@ public class MicroPeak extends MicroFrame implements ActionListener, ItemListene public void itemStateChanged(ItemEvent e) { } + /* OSXAdapter interfaces */ + public void macosx_file_handler(String path) { + CommandGraph(new File(path)); + } + + public void macosx_quit_handler() { + System.exit(0); + } + + public void macosx_preferences_handler() { + Preferences(); + } + public MicroPeak() { ++number_of_windows; + register_for_macosx_events(); + AltosUIPreferences.set_component(this); container = getContentPane(); diff --git a/telegps/TeleGPS.java b/telegps/TeleGPS.java index f765ee23..e78c2124 100644 --- a/telegps/TeleGPS.java +++ b/telegps/TeleGPS.java @@ -410,16 +410,38 @@ public class TeleGPS private JMenu make_menu(String label, String[][] items) { JMenu menu = new JMenu(label); - for (int i = 0; i < items.length; i++) + for (int i = 0; i < items.length; i++) { + if (MAC_OS_X) { + if (items[i][1].equals("exit")) + continue; + if (items[i][1].equals("preferences")) + continue; + } add_menu(menu, items[i][0], items[i][1]); + } menu_bar.add(menu); return menu; } + /* OSXAdapter interfaces */ + public void macosx_file_handler(String path) { + process_graph(new File(path)); + } + + public void macosx_quit_handler() { + System.exit(0); + } + + public void macosx_preferences_handler() { + preferences(); + } + public TeleGPS() { AltosUIPreferences.set_component(this); + register_for_macosx_events(); + reader = null; bag = getContentPane(); -- cgit v1.2.3 From 1d773cb8921848c99f12b8cd9840cb0267b66e1f Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 18 Jun 2014 20:35:12 -0700 Subject: windows: Missed adding 'refresh-sh.nsh' This script forces windows explorer to reload icons. Signed-off-by: Keith Packard --- altosui/Instdrv/NSIS/Includes/refresh-sh.nsh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 altosui/Instdrv/NSIS/Includes/refresh-sh.nsh diff --git a/altosui/Instdrv/NSIS/Includes/refresh-sh.nsh b/altosui/Instdrv/NSIS/Includes/refresh-sh.nsh new file mode 100644 index 00000000..23d8e5e4 --- /dev/null +++ b/altosui/Instdrv/NSIS/Includes/refresh-sh.nsh @@ -0,0 +1,14 @@ +!define SHCNE_ASSOCCHANGED 0x08000000 +!define SHCNF_IDLIST 0 + +Function RefreshShellIcons + ; By jerome tremblay - april 2003 + ${DisableX64FSRedirection} + System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (${SHCNE_ASSOCCHANGED}, ${SHCNF_IDLIST}, 0, 0)' +FunctionEnd + +Function un.RefreshShellIcons + ; By jerome tremblay - april 2003 + ${DisableX64FSRedirection} + System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (${SHCNE_ASSOCCHANGED}, ${SHCNF_IDLIST}, 0, 0)' +FunctionEnd -- cgit v1.2.3 From 37856672c57f2fd91184c2391a201bbbdc48545e Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 19 Jun 2014 10:25:07 -0700 Subject: linux: .desktop files must begin with organization name The spec requires that .desktop files start with the organization name, so I've renamed all of them to altusmetrum-.desktop Signed-off-by: Keith Packard --- altosui/Makefile.am | 6 +++--- altosui/altos.desktop.in | 10 ---------- altosui/altusmetrum-altosui.desktop.in | 11 +++++++++++ micropeak/Makefile.am | 4 ++-- micropeak/altusmetrum-micropeak.desktop.in | 10 ++++++++++ micropeak/micropeak.desktop.in | 10 ---------- telegps/Makefile.am | 8 ++++---- telegps/altusmetrum-telegps.desktop.in | 10 ++++++++++ telegps/telegps.desktop.in | 10 ---------- 9 files changed, 40 insertions(+), 39 deletions(-) delete mode 100644 altosui/altos.desktop.in create mode 100644 altosui/altusmetrum-altosui.desktop.in create mode 100644 micropeak/altusmetrum-micropeak.desktop.in delete mode 100644 micropeak/micropeak.desktop.in create mode 100644 telegps/altusmetrum-telegps.desktop.in delete mode 100644 telegps/telegps.desktop.in diff --git a/altosui/Makefile.am b/altosui/Makefile.am index 352fb430..bc074a95 100644 --- a/altosui/Makefile.am +++ b/altosui/Makefile.am @@ -64,7 +64,7 @@ LIBALTOS= \ altos.dll desktopdir = $(datadir)/applications -desktop_file = altos.desktop +desktop_file = altusmetrum-altosui.desktop desktop_SCRIPTS = $(desktop_file) JAR=altosui.jar @@ -141,7 +141,7 @@ FAT_FILES=$(FATJAR) $(ALTOSLIB_CLASS) $(ALTOSUILIB_CLASS) $(FREETTS_CLASS) $(JFR LINUX_LIBS=libaltos32.so libaltos64.so -LINUX_FILES=$(FAT_FILES) $(LINUX_LIBS) $(FIRMWARE) $(DOC) altos.desktop.in ../icon/altusmetrum.svg +LINUX_FILES=$(FAT_FILES) $(LINUX_LIBS) $(FIRMWARE) $(DOC) $(desktop_file).in ../icon/altusmetrum.svg LINUX_EXTRA=altosui-fat MACOSX_INFO_PLIST=Info.plist @@ -161,7 +161,7 @@ clean-local: EXTRA_DIST = $(desktop_file).in $(desktop_file): $(desktop_file).in - sed -e 's#%bindir%#@bindir@#' -e 's#%icondir%#$(datadir)/icons/hicolor/scalable/apps#' ${srcdir}/altos.desktop.in > $@ + sed -e 's#%bindir%#@bindir@#' -e 's#%icondir%#$(datadir)/icons/hicolor/scalable/apps#' ${srcdir}/$(desktop_file).in > $@ chmod +x $@ if FATINSTALL diff --git a/altosui/altos.desktop.in b/altosui/altos.desktop.in deleted file mode 100644 index 66114348..00000000 --- a/altosui/altos.desktop.in +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Type=Application -Name=AltOS UI -GenericName=Altus Metrum Ground Station -Comment=View and log downlink data from Altus Metrum products -Icon=%icondir%/altusmetrum.svg -Exec=%bindir%/altosui %f -Terminal=false -MimeType=text/plain; -Categories=Education;Electronics;Science; diff --git a/altosui/altusmetrum-altosui.desktop.in b/altosui/altusmetrum-altosui.desktop.in new file mode 100644 index 00000000..716571ce --- /dev/null +++ b/altosui/altusmetrum-altosui.desktop.in @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Application +Version=1.0 +Name=AltOS UI +GenericName=Altus Metrum Ground Station +Comment=View and log downlink data from Altus Metrum products +Icon=%icondir%/altusmetrum.svg +Exec=%bindir%/altosui %f +Terminal=false +MimeType=application/vnd.altusmetrum.telemetry;application/vnd.altusmetrum.eeprom +Categories=Education;Electronics;Science; diff --git a/micropeak/Makefile.am b/micropeak/Makefile.am index 1e09e523..37d5ca63 100644 --- a/micropeak/Makefile.am +++ b/micropeak/Makefile.am @@ -75,7 +75,7 @@ WINDOWS_ICON=$(ICONDIR)/micro-peak.ico $(ICONDIR)/micro-peak.exe MACOSX_ICON=$(ICONDIR)/MicroPeak.icns desktopdir = $(datadir)/applications -desktop_file = micropeak.desktop +desktop_file = altusmetrum-micropeak.desktop desktop_SCRIPTS = $(desktop_file) all-local: micropeak-test micropeak-jdb $(JAR) @@ -92,7 +92,7 @@ clean-local: EXTRA_DIST = $(desktop_file).in $(desktop_file): $(desktop_file).in - sed -e 's#%bindir%#@bindir@#' -e 's#%icondir%#$(datadir)/icons/hicolor/scalable/apps#' ${srcdir}/micropeak.desktop.in > $@ + sed -e 's#%bindir%#@bindir@#' -e 's#%icondir%#$(datadir)/icons/hicolor/scalable/apps#' ${srcdir}/$(desktop_file).in > $@ chmod +x $@ LINUX_DIST=MicroPeak-Linux-$(VERSION).tar.bz2 diff --git a/micropeak/altusmetrum-micropeak.desktop.in b/micropeak/altusmetrum-micropeak.desktop.in new file mode 100644 index 00000000..f7d258ec --- /dev/null +++ b/micropeak/altusmetrum-micropeak.desktop.in @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Application +Name=MicroPeak +GenericName=MicroPeak Download and Analysis +Comment=View and log data from MicroPeak altimeters +Icon=%icondir%/micropeak.svg +Exec=%bindir%/micropeak %f +Terminal=false +MimeType=application/vnd.altusmetrum.micropeak +Categories=Education;Electronics;Science; diff --git a/micropeak/micropeak.desktop.in b/micropeak/micropeak.desktop.in deleted file mode 100644 index abdf286f..00000000 --- a/micropeak/micropeak.desktop.in +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Type=Application -Name=MicroPeak -GenericName=MicroPeak download and analysis -Comment=View and log data from MicroPeak altimeters -Icon=%icondir%/micropeak.svg -Exec=%bindir%/micropeak %f -Terminal=false -MimeType=text/plain; -Categories=Education;Electronics;Science; diff --git a/telegps/Makefile.am b/telegps/Makefile.am index 8868c723..c4f6a58b 100644 --- a/telegps/Makefile.am +++ b/telegps/Makefile.am @@ -89,7 +89,7 @@ FIRMWARE_TG=$(FIRMWARE_TG_1_0) FIRMWARE=$(FIRMWARE_TG) $(FIRMWARE_TD) $(FIRMWARE_TBT) desktopdir = $(datadir)/applications -desktop_file = telegps.desktop +desktop_file = altusmetrum-telegps.desktop desktop_SCRIPTS = $(desktop_file) all-local: telegps-test telegps-jdb $(JAR) @@ -106,7 +106,7 @@ clean-local: EXTRA_DIST = $(desktop_file).in $(desktop_file): $(desktop_file).in - sed -e 's#%bindir%#@bindir@#' -e 's#%icondir%#$(datadir)/icons/hicolor/scalable/apps#' ${srcdir}/telegps.desktop.in > $@ + sed -e 's#%bindir%#@bindir@#' -e 's#%icondir%#$(datadir)/icons/hicolor/scalable/apps#' ${srcdir}/$(desktop_file).in > $@ chmod +x $@ LINUX_DIST=TeleGPS-Linux-$(VERSION).tar.bz2 @@ -120,8 +120,8 @@ DOC=$(TELEGPS_DOC) FAT_FILES=$(FATJAR) $(ALTOSLIB_CLASS) $(ALTOSUILIB_CLASS) $(FREETTS_CLASS) $(JFREECHART_CLASS) $(JCOMMON_CLASS) -LINUX_FILES=$(FAT_FILES) libaltos.so $(FIRMWARE) $(DOC) telegps.desktop.in ../icon/telegps.svg -LINUX_EXTRA=telegps-fat telegps.desktop.in +LINUX_FILES=$(FAT_FILES) libaltos.so $(FIRMWARE) $(DOC) $(desktop_file).in ../icon/telegps.svg +LINUX_EXTRA=telegps-fat $(desktop_file).in MACOSX_INFO_PLIST=Info.plist MACOSX_README=ReadMe-Mac.rtf diff --git a/telegps/altusmetrum-telegps.desktop.in b/telegps/altusmetrum-telegps.desktop.in new file mode 100644 index 00000000..76c1eb42 --- /dev/null +++ b/telegps/altusmetrum-telegps.desktop.in @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Application +Name=TeleGPS +GenericName=TeleGPS monitor, download and analysis +Comment=View and log data from TeleGPS tracking devices +Icon=%icondir%/telegps.svg +Exec=%bindir%/telegps %f +Terminal=false +MimeType=application/vnd.altusmetrum.telemetry;application/vnd.altusmetrum.eeprom +Categories=Education;Electronics;Science; diff --git a/telegps/telegps.desktop.in b/telegps/telegps.desktop.in deleted file mode 100644 index 3d249d8a..00000000 --- a/telegps/telegps.desktop.in +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Type=Application -Name=TeleGPS -GenericName=TeleGPS monitor, download and analysis -Comment=View and log data from TeleGPS tracking devices -Icon=%icondir%/telegps.svg -Exec=%bindir%/telegps %f -Terminal=false -MimeType=text/plain; -Categories=Education;Electronics;Science; -- cgit v1.2.3 From 1b0f56ddb2b85b68232c22a7a8b8744cb9ad76f9 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 19 Jun 2014 14:33:27 -0700 Subject: Rename icon files to fit XDG specifications. Add file icons. Add mime types Our SVG icons now follow XDG standards by including a vendor prefix. The new file type icons include application-vnd.altusmetrum as a prefix so that they match the mime types declared. Signed-off-by: Keith Packard --- altosui/.gitignore | 2 +- altosui/Info.plist.in | 6 +- altosui/Makefile.am | 52 +-- altosui/altos-windows.nsi.in | 83 +++-- altosui/altusmetrum-altosui.desktop.in | 2 +- icon/.gitignore | 6 +- icon/Makefile.am | 156 +++++--- icon/altus-metrum.rc | 1 - icon/altusmetrum-altosui.svg | 250 +++++++++++++ icon/altusmetrum-micropeak.svg | 219 ++++++++++++ icon/altusmetrum-telegps.svg | 324 +++++++++++++++++ icon/altusmetrum.svg | 250 ------------- icon/application-vnd.altusmetrum.eeprom.svg | 397 +++++++++++++++++++++ icon/application-vnd.altusmetrum.micropeak.svg | 1 + icon/application-vnd.altusmetrum.telemetry.svg | 397 +++++++++++++++++++++ icon/creating-linux-icons | 29 ++ icon/micro-peak.rc | 1 - icon/micropeak.svg | 219 ------------ icon/org-altusmetrum-mimetypes.xml | 16 + icon/telegps.rc | 1 - icon/telegps.svg | 324 ----------------- micropeak/.gitignore | 2 +- micropeak/Info.plist.in | 4 +- micropeak/Makefile.am | 48 +-- .../Contents/Resources/MicroPeak.icns | Bin 133711 -> 0 bytes micropeak/altusmetrum-micropeak.desktop.in | 2 +- micropeak/micropeak-windows.nsi.in | 51 +-- telegps/.gitignore | 2 +- telegps/Info.plist.in | 6 +- telegps/Makefile.am | 51 +-- telegps/altusmetrum-telegps.desktop.in | 2 +- telegps/telegps-windows.nsi.in | 83 +++-- 32 files changed, 1975 insertions(+), 1012 deletions(-) delete mode 100644 icon/altus-metrum.rc create mode 100644 icon/altusmetrum-altosui.svg create mode 100644 icon/altusmetrum-micropeak.svg create mode 100644 icon/altusmetrum-telegps.svg delete mode 100644 icon/altusmetrum.svg create mode 100644 icon/application-vnd.altusmetrum.eeprom.svg create mode 120000 icon/application-vnd.altusmetrum.micropeak.svg create mode 100644 icon/application-vnd.altusmetrum.telemetry.svg create mode 100644 icon/creating-linux-icons delete mode 100644 icon/micro-peak.rc delete mode 100644 icon/micropeak.svg create mode 100644 icon/org-altusmetrum-mimetypes.xml delete mode 100644 icon/telegps.rc delete mode 100644 icon/telegps.svg delete mode 100644 micropeak/MicroPeak.app/Contents/Resources/MicroPeak.icns diff --git a/altosui/.gitignore b/altosui/.gitignore index 10b600e4..b0c8264b 100644 --- a/altosui/.gitignore +++ b/altosui/.gitignore @@ -17,7 +17,7 @@ Altos-Linux-*.tar.bz2 Altos-Linux-*.sh Altos-Mac-*.zip Altos-Windows-*.exe -altos.desktop +altusmetrum-altosui.desktop *.dll *.dylib *.so diff --git a/altosui/Info.plist.in b/altosui/Info.plist.in index bae6d52c..8dc797d6 100644 --- a/altosui/Info.plist.in +++ b/altosui/Info.plist.in @@ -23,14 +23,14 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleIconFile - AltosUIIcon.icns + altusmetrum-altosui.icns CFBundleDocumentTypes CFBundleTypeName Telemetry CFBundleTypeIconFile - AltosUIIcon.icns + application-vnd.altusmetrum.telemetry.icns CFBundleTypeExtensions telem @@ -42,7 +42,7 @@ CFBundleTypeName Eeprom CFBundleTypeIconFile - AltosUIIcon.icns + application-vnd.altusmetrum.eeprom.icns CFBundleTypeExtensions eeprom diff --git a/altosui/Makefile.am b/altosui/Makefile.am index bc074a95..45d75699 100644 --- a/altosui/Makefile.am +++ b/altosui/Makefile.am @@ -72,26 +72,37 @@ JAR=altosui.jar FATJAR=altosui-fat.jar # Icons -ICONDIR=$(top_srcdir)/icon +ICONDIR=../icon JAVA_ICONS=\ - $(ICONDIR)/altus-metrum-16.png \ - $(ICONDIR)/altus-metrum-32.png \ - $(ICONDIR)/altus-metrum-48.png \ - $(ICONDIR)/altus-metrum-64.png \ - $(ICONDIR)/altus-metrum-128.png \ - $(ICONDIR)/altus-metrum-256.png + $(ICONDIR)/altusmetrum-altosui-16.png \ + $(ICONDIR)/altusmetrum-altosui-32.png \ + $(ICONDIR)/altusmetrum-altosui-48.png \ + $(ICONDIR)/altusmetrum-altosui-64.png \ + $(ICONDIR)/altusmetrum-altosui-128.png\ + $(ICONDIR)/altusmetrum-altosui-256.png # icon base names for jar -ICONJAR= -C $(ICONDIR) altus-metrum-16.png \ - -C $(ICONDIR) altus-metrum-32.png \ - -C $(ICONDIR) altus-metrum-48.png \ - -C $(ICONDIR) altus-metrum-64.png \ - -C $(ICONDIR) altus-metrum-128.png \ - -C $(ICONDIR) altus-metrum-256.png - -WINDOWS_ICON=$(ICONDIR)/altus-metrum.ico $(ICONDIR)/altus-metrum.exe -MACOSX_ICON=$(ICONDIR)/AltosUIIcon.icns +ICONJAR= \ + -C $(ICONDIR) altusmetrum-altosui-16.png \ + -C $(ICONDIR) altusmetrum-altosui-32.png \ + -C $(ICONDIR) altusmetrum-altosui-48.png \ + -C $(ICONDIR) altusmetrum-altosui-64.png \ + -C $(ICONDIR) altusmetrum-altosui-128.png\ + -C $(ICONDIR) altusmetrum-altosui-256.png + +WINDOWS_ICONS =\ + $(ICONDIR)/altusmetrum-altosui.ico \ + $(ICONDIR)/altusmetrum-altosui.exe + $(ICONDIR)/application-vnd.altusmetrum.eeprom.ico \ + $(ICONDIR)/application-vnd.altusmetrum.eeprom.exe \ + $(ICONDIR)/application-vnd.altusmetrum.telemetry.ico \ + $(ICONDIR)/application-vnd.altusmetrum.telemetry.exe + +MACOSX_ICONS =\ + $(ICONDIR)/altusmetrum-altosui.icns \ + $(ICONDIR)/application-vnd.altusmetrum.eeprom.icns \ + $(ICONDIR)/application-vnd.altusmetrum.telemetry.icns # Firmware FIRMWARE_TD_0_2=$(top_srcdir)/src/teledongle-v0.2/teledongle-v0.2-$(VERSION).ihx @@ -141,14 +152,14 @@ FAT_FILES=$(FATJAR) $(ALTOSLIB_CLASS) $(ALTOSUILIB_CLASS) $(FREETTS_CLASS) $(JFR LINUX_LIBS=libaltos32.so libaltos64.so -LINUX_FILES=$(FAT_FILES) $(LINUX_LIBS) $(FIRMWARE) $(DOC) $(desktop_file).in ../icon/altusmetrum.svg +LINUX_FILES=$(FAT_FILES) $(LINUX_LIBS) $(FIRMWARE) $(DOC) $(desktop_file).in $(ICONDIR)/altusmetrum-altosui.svg LINUX_EXTRA=altosui-fat MACOSX_INFO_PLIST=Info.plist -MACOSX_FILES=$(FAT_FILES) libaltos.dylib $(MACOSX_INFO_PLIST) $(DOC) ReadMe-Mac.rtf $(MACOSX_ICON) +MACOSX_FILES=$(FAT_FILES) libaltos.dylib $(MACOSX_INFO_PLIST) $(DOC) ReadMe-Mac.rtf $(MACOSX_ICONS) MACOSX_EXTRA=$(FIRMWARE) -WINDOWS_FILES=$(FAT_FILES) $(FIRMWARE) altos.dll altos64.dll $(top_srcdir)/altusmetrum.inf $(top_srcdir)/altusmetrum.cat $(WINDOWS_ICON) +WINDOWS_FILES=$(FAT_FILES) $(FIRMWARE) altos.dll altos64.dll $(top_srcdir)/altusmetrum.inf $(top_srcdir)/altusmetrum.cat $(WINDOWS_ICONS) all-local: classes/altosui $(JAR) altosui altosui-test altosui-jdb @@ -195,7 +206,6 @@ else fat: $(LINUX_DIST) $(LINUX_SH) $(MACOSX_DIST) $(WINDOWS_DIST) endif - altosuidir=$(datadir)/java install-altosuiJAVA: altosui.jar @@ -325,7 +335,7 @@ $(MACOSX_DIST): $(MACOSX_FILES) $(MACOSX_EXTRA) Makefile cp -a $(DOC) macosx/Doc cp -p Info.plist macosx/AltosUI.app/Contents mkdir -p macosx/AltOS-$(VERSION) macosx/AltosUI.app/Contents/Resources/Java - cp -p $(MACOSX_ICON) macosx/AltosUI.app/Contents/Resources + cp -p $(MACOSX_ICONS) macosx/AltosUI.app/Contents/Resources cp -p $(FATJAR) macosx/AltosUI.app/Contents/Resources/Java/altosui.jar cp -p libaltos.dylib macosx/AltosUI.app/Contents/Resources/Java cp -p $(ALTOSLIB_CLASS) macosx/AltosUI.app/Contents/Resources/Java diff --git a/altosui/altos-windows.nsi.in b/altosui/altos-windows.nsi.in index c6da097e..07de5b13 100644 --- a/altosui/altos-windows.nsi.in +++ b/altosui/altos-windows.nsi.in @@ -4,12 +4,14 @@ !include java.nsh !include refresh-sh.nsh -!define REG_NAME "Altus Metrum" -!define PROG_ID "org.altusmetrum.altosui.1" -!define PROG_ALTOSUI "org.altusmetrum.altosui.1" -!define FAT_NAME "altosui-fat.jar" -!define ICO_ICO "altus-metrum.ico" -!define ICO_EXE "altus-metrum.exe" +!define REG_NAME "Altus Metrum" +!define PROG_ID_TELEM "altusmetrum.altosui.telem.1" +!define PROG_ID_EEPROM "altusmetrum.altosui.eeprom.1" +!define FAT_NAME "altosui-fat.jar" +!define WIN_APP_ICON "altusmetrum-altosui.ico" +!define WIN_APP_EXE "altusmetrum-altosui.exe" +!define WIN_TELEM_EXE "application-vnd.altusmetrum.telemetry.exe" +!define WIN_EEPROM_EXE "application-vnd.altusmetrum.eeprom.exe" Name "${REG_NAME} Installer" @@ -104,13 +106,13 @@ Section "${REG_NAME} Application" File "*.dll" - File "../icon/${ICO_ICO}" + File "../icon/${WIN_APP_ICON}" - CreateShortCut "$SMPROGRAMS\${REG_NAME}.lnk" "$SYSDIR\javaw.exe" "-jar ${FAT_NAME}" "$INSTDIR\${ICO_ICO}" + CreateShortCut "$SMPROGRAMS\${REG_NAME}.lnk" "$SYSDIR\javaw.exe" "-jar ${FAT_NAME}" "$INSTDIR\${WIN_APP_ICON}" SectionEnd Section "${REG_NAME} Desktop Shortcut" - CreateShortCut "$DESKTOP\${REG_NAME}.lnk" "$INSTDIR\${FAT_NAME}" "" "$INSTDIR\${ICO_ICO}" + CreateShortCut "$DESKTOP\${REG_NAME}.lnk" "$INSTDIR\${FAT_NAME}" "" "$INSTDIR\${WIN_APP_ICON}" SectionEnd Section "TeleMetrum, TeleDongle and TeleBT Firmware" @@ -145,35 +147,51 @@ SectionEnd Section "File Associations" + ${DisableX64FSRedirection} + SetOutPath $INSTDIR - File "../icon/${ICO_EXE}" + File "../icon/${WIN_APP_EXE}" + File "../icon/${WIN_TELEM_EXE}" + File "../icon/${WIN_EEPROM_EXE}" - ; application elements - - WriteRegStr HKCR "${PROG_ID}" "" "Altus Metrum Data File" - WriteRegStr HKCR "${PROG_ID}" "FriendlyTypeName" "Altus Metrum Data File" - WriteRegStr HKCR "${PROG_ID}\CurVer" "" "${PROG_ID}" - WriteRegStr HKCR "${PROG_ID}\DefaultIcon" "" '"$INSTDIR\${ICO_EXE}",-101' - WriteRegExpandStr HKCR "${PROG_ID}\shell\play\command" "" '"%SYSTEMROOT%\System32\javaw.exe" -Djava.library.path="$INSTDIR" -jar "$INSTDIR\${FAT_NAME}" "%1"' + DeleteRegKey HKCR "${PROG_ID_TELEM}" + DeleteRegKey HKCR "${PROG_ID_EEPROM}" + + DeleteRegKey HKCR ".eeprom\${PROG_ID_EEPROM}" + DeleteRegValue HKCR ".eeprom\OpenWithProgids" "${PROG_ID_EEPROM}" + DeleteRegKey HKCR ".telem\${PROG_ID_EEPROM}" + DeleteRegValue HKCR ".telem\OpenWithProgids" "${PROG_ID_EEPROM}" ; .eeprom elements - WriteRegStr HKCR ".eeprom" "" "${PROG_ALTOSUI}" + WriteRegStr HKCR "${PROG_ID_EEPROM}" "" "Altus Metrum Log File" + WriteRegStr HKCR "${PROG_ID_EEPROM}" "FriendlyTypeName" "Altus Metrum Log File" + WriteRegStr HKCR "${PROG_ID_EEPROM}\CurVer" "" "${PROG_ID_EEPROM}" + WriteRegStr HKCR "${PROG_ID_EEPROM}\DefaultIcon" "" '"$INSTDIR\${WIN_EEPROM_EXE}",-101' + WriteRegExpandStr HKCR "${PROG_ID_EEPROM}\shell\open\command" "" '"%SYSTEMROOT%\System32\javaw.exe" -Djava.library.path="$INSTDIR" -jar "$INSTDIR\${FAT_NAME}" "%1"' + + WriteRegStr HKCR ".eeprom" "" "${PROG_ID_EEPROM}" WriteRegStr HKCR ".eeprom" "PerceivedType" "Altus Metrum Log File" - WriteRegStr HKCR ".eeprom" "Content Type" "application/altosui" + WriteRegStr HKCR ".eeprom" "Content Type" "application/vnd.altusmetrum.eeprom" - WriteRegStr HKCR ".eeprom\OpenWithProgids" "${PROG_ID}" "" - WriteRegStr HKCR ".eeprom\${PROG_ID}" "" "${REG_NAME}" + WriteRegStr HKCR ".eeprom\OpenWithProgids" "${PROG_ID_EEPROM}" "" + WriteRegStr HKCR ".eeprom\${PROG_ID_EEPROM}" "" "${REG_NAME}" ; .telem elements - WriteRegStr HKCR ".telem" "" "${PROG_ALTOSUI}" + WriteRegStr HKCR "${PROG_ID_TELEM}" "" "Altus Metrum Telemetry File" + WriteRegStr HKCR "${PROG_ID_TELEM}" "FriendlyTypeName" "Altus Metrum Telemetry File" + WriteRegStr HKCR "${PROG_ID_TELEM}\CurVer" "" "${PROG_ID_TELEM}" + WriteRegStr HKCR "${PROG_ID_TELEM}\DefaultIcon" "" '"$INSTDIR\${WIN_TELEM_EXE}",-101' + WriteRegExpandStr HKCR "${PROG_ID_TELEM}\shell\open\command" "" '"%SYSTEMROOT%\System32\javaw.exe" -Djava.library.path="$INSTDIR" -jar "$INSTDIR\${FAT_NAME}" "%1"' + + WriteRegStr HKCR ".telem" "" "${PROG_ID_TELEM}" WriteRegStr HKCR ".telem" "PerceivedType" "Altus Metrum Telemetry File" - WriteRegStr HKCR ".telem" "Content Type" "application/altosui" + WriteRegStr HKCR ".telem" "Content Type" "application/vnd.altusmetrum.telemetry" - WriteRegStr HKCR ".telem\OpenWithProgids" "${PROG_ID}" "" - WriteRegStr HKCR ".telem\${PROG_ID}" "" "${REG_NAME}" + WriteRegStr HKCR ".telem\OpenWithProgids" "${PROG_ID_TELEM}" "" + WriteRegStr HKCR ".telem\${PROG_ID_TELEM}" "" "${REG_NAME}" Call RefreshShellIcons SectionEnd @@ -206,21 +224,22 @@ Section "Uninstall" DetailPrint "Delete uninstall reg entries" - DeleteRegKey HKCR "${PROG_ID}" + DeleteRegKey HKCR "${PROG_ID_EEPROM}" + DeleteRegKey HKCR "${PROG_ID_TELEM}" - DeleteRegKey HKCR ".eeprom\${PROG_ID}" - DeleteRegValue HKCR ".eeprom\OpenWithProgids" "${PROG_ID}" + DeleteRegKey HKCR ".eeprom\${PROG_ID_EEPROM}" + DeleteRegValue HKCR ".eeprom\OpenWithProgids" "${PROG_ID_EEPROM}" - DeleteRegKey HKCR ".telem\${PROG_ID}" - DeleteRegValue HKCR ".telem\OpenWithProgids" "${PROG_ID}" + DeleteRegKey HKCR ".telem\${PROG_ID_TELEM}" + DeleteRegValue HKCR ".telem\OpenWithProgids" "${PROG_ID_TELEM}" DetailPrint "Delete file association reg entries" Delete "$INSTDIR\${FAT_NAME}" Delete "$INSTDIR\uninstall-${REG_NAME}.exe" - Delete "$INSTDIR\${ICO_ICO}" - Delete "$INSTDIR\${ICO_EXE}" + Delete "$INSTDIR\${WIN_APP_ICON}" + Delete "$INSTDIR\${WIN_APP_EXE}" ; Remove shortcuts, if any Delete "$SMPROGRAMS\${REG_NAME}.lnk" diff --git a/altosui/altusmetrum-altosui.desktop.in b/altosui/altusmetrum-altosui.desktop.in index 716571ce..10fd9e9d 100644 --- a/altosui/altusmetrum-altosui.desktop.in +++ b/altosui/altusmetrum-altosui.desktop.in @@ -4,7 +4,7 @@ Version=1.0 Name=AltOS UI GenericName=Altus Metrum Ground Station Comment=View and log downlink data from Altus Metrum products -Icon=%icondir%/altusmetrum.svg +Icon=%icondir%/altusmetrum-altosui.svg Exec=%bindir%/altosui %f Terminal=false MimeType=application/vnd.altusmetrum.telemetry;application/vnd.altusmetrum.eeprom diff --git a/icon/.gitignore b/icon/.gitignore index 40cf2f3e..94c7c70c 100644 --- a/icon/.gitignore +++ b/icon/.gitignore @@ -1,6 +1,6 @@ -altus-metrum-*.png -micropeak-*.png -telegps-*.png +application-*.png +altusmetrum-*.png +*.rc *.ico *.icns *.build diff --git a/icon/Makefile.am b/icon/Makefile.am index 61a16914..516c547c 100644 --- a/icon/Makefile.am +++ b/icon/Makefile.am @@ -3,85 +3,137 @@ MAC_RES=16 32 128 256 512 WIN_RES=16 24 32 48 64 72 96 128 180 256 RES=$(shell echo $(JAVA_RES) $(MAC_RES) $(WIN_RES) | awk '{ for (i = 1; i <= NF; i++) printf("%s\n", $$i); }' | sort -n -u) -AM_FILES=$(shell for i in $(RES); do echo altus-metrum-$$i.png; done) -MP_FILES=$(shell for i in $(RES); do echo micropeak-$$i.png; done) -TG_FILES=$(shell for i in $(RES); do echo telegps-$$i.png; done) +# Application icon base names -MAC_TG_FILES=$(shell for i in $(MAC_RES); do echo telegps-$$i.png; done) -MAC_MP_FILES=$(shell for i in $(MAC_RES); do echo micropeak-$$i.png; done) -MAC_AM_FILES=$(shell for i in $(MAC_RES); do echo altus-metrum-$$i.png; done) +AM_NAME = altusmetrum-altosui +MP_NAME = altusmetrum-micropeak +TG_NAME = altusmetrum-telegps -WIN_TG_FILES=$(shell for i in $(WIN_RES); do echo telegps-$$i.png; done) -WIN_MP_FILES=$(shell for i in $(WIN_RES); do echo micropeak-$$i.png; done) -WIN_AM_FILES=$(shell for i in $(WIN_RES); do echo altus-metrum-$$i.png; done) +# File icon base names -ICO_FILES=altus-metrum.ico micro-peak.ico telegps.ico -ICNS_FILES=AltosUIIcon.icns TeleGPS.icns MicroPeak.icns +EEPROM_NAME = application-vnd.altusmetrum.eeprom +TELEM_NAME = application-vnd.altusmetrum.telemetry +MPD_NAME = application-vnd.altusmetrum.micropeak -icondir = $(datadir)/icons/hicolor/scalable/apps +# Application icons -AM_ICON = altusmetrum.svg -MP_ICON = micropeak.svg -TG_ICON = telegps.svg +AM_ICON = $(AM_NAME).svg +MP_ICON = $(MP_NAME).svg +TG_ICON = $(TG_NAME).svg -icon_DATA = $(AM_ICON) $(MP_ICON) $(TG_ICON) +# File icons (note that MicroPeak uses the application icon for files) -EXTRA_DIST = $(icon_DATA) $(AM_FILES) $(MP_FILES) $(TG_FILES) +EEPROM_ICON = $(EEPROM_NAME).svg +TELEM_ICON = $(TELEM_NAME).svg +MPD_ICON = $(MPD_NAME).svg -res: - echo $(RES) +# Files needed for Mac OSX icons -all-local: $(ICO_FILES) $(ICNS_FILES) +MAC_AM_FILES = $(shell for i in $(MAC_RES); do echo $(AM_NAME)-$$i.png; done) +MAC_MP_FILES = $(shell for i in $(MAC_RES); do echo $(MP_NAME)-$$i.png; done) +MAC_TG_FILES = $(shell for i in $(MAC_RES); do echo $(TG_NAME)-$$i.png; done) +MAC_EEPROM_FILES= $(shell for i in $(MAC_RES); do echo $(EEPROM_NAME)-$$i.png; done) +MAC_TELEM_FILES = $(shell for i in $(MAC_RES); do echo $(TELEM_NAME)-$$i.png; done) +MAC_MPD_FILES = $(shell for i in $(MAC_RES); do echo $(MPD_NAME)-$$i.png; done) -clean-local: - $(RM) altus-metrum-*.png telegps-*.png micropeak-*.png *.build *.ico *.icns *.o *.exe +ICNS_FILES = $(AM_NAME).icns $(MP_NAME).icns $(TG_NAME).icns \ + $(EEPROM_NAME).icns $(TELEM_NAME).icns $(MPD_NAME).icns -$(AM_FILES): altusmetrum.build +# Files needed for Windows icons -altusmetrum.build: altusmetrum.svg - for i in $(RES); do rsvg-convert -w $$i -h $$i -o altus-metrum-$$i.png altusmetrum.svg; done && touch $@ +WIN_AM_FILES = $(shell for i in $(WIN_RES); do echo $(AM_NAME)-$$i.png; done) +WIN_MP_FILES = $(shell for i in $(WIN_RES); do echo $(MP_NAME)-$$i.png; done) +WIN_TG_FILES = $(shell for i in $(WIN_RES); do echo $(TG_NAME)-$$i.png; done) +WIN_EEPROM_FILES= $(shell for i in $(WIN_RES); do echo $(EEPROM_NAME)-$$i.png; done) +WIN_TELEM_FILES = $(shell for i in $(WIN_RES); do echo $(TELEM_NAME)-$$i.png; done) +WIN_MPD_FILES = $(shell for i in $(WIN_RES); do echo $(MPD_NAME)-$$i.png; done) -$(TG_FILES): telegps.build +ICO_FILES = $(AM_NAME).ico $(MP_NAME).ico $(TG_NAME).ico \ + $(EEPROM_NAME).ico $(TELEM_NAME).ico $(MPD_NAME).ico -telegps.build: telegps.svg - for i in $(RES); do rsvg-convert -w $$i -h $$i -o telegps-$$i.png telegps.svg; done && touch $@ +EXE_FILES = $(AM_NAME).exe $(MP_NAME).exe $(TG_NAME).exe \ + $(EEPROM_NAME).exe $(TELEM_NAME).exe $(MPD_NAME).exe -$(MP_FILES): micropeak.build +# Files needed for Java internal icons -micropeak.build: micropeak.svg - for i in $(RES); do rsvg-convert -w $$i -h $$i -o micropeak-$$i.png micropeak.svg; done && touch $@ +JAVA_AM_FILES = $(shell for i in $(JAVA_RES); do echo $(AM_NAME)-$$i.png; done) +JAVA_MP_FILES = $(shell for i in $(JAVA_RES); do echo $(MP_NAME)-$$i.png; done) +JAVA_TG_FILES = $(shell for i in $(JAVA_RES); do echo $(TG_NAME)-$$i.png; done) -#clean-local: -# $(RM) -f $(ICO_FILES) +JAVA_FILES = $(JAVA_AM_FILES) $(JAVA_MP_FILES) $(JAVA_TG_FILES) -altus-metrum.ico: $(WIN_AM_FILES) - icotool -c -o $@ $(WIN_AM_FILES) +# PNG files needed by anyone -micro-peak.ico: $(WIN_MP_FILES) - icotool -c -o $@ $(WIN_MP_FILES) +AM_FILES = $(shell for i in $(RES); do echo $(AM_NAME)-$$i.png; done) +MP_FILES = $(shell for i in $(RES); do echo $(MP_NAME)-$$i.png; done) +TG_FILES = $(shell for i in $(RES); do echo $(TG_NAME)-$$i.png; done) +EEPROM_FILES = $(shell for i in $(RES); do echo $(EEPROM_NAME)-$$i.png; done) +TELEM_FILES = $(shell for i in $(RES); do echo $(TELEM_NAME)-$$i.png; done) +IN_MPD_FILES = $(shell for i in $(RES); do echo $(MPD_NAME)-$$i.png; done) -telegps.ico: $(WIN_TG_FILES) - icotool -c -o $@ $(WIN_TG_FILES) +ICON_THEME=$(datadir)/icons/hicolor -AltosUIIcon.icns: $(MAC_AM_FILES) - png2icns $@ $(MAC_AM_FILES) +appicondir = $(ICON_THEME)/scalable/apps +appicon_DATA = $(AM_ICON) $(MP_ICON) $(TG_ICON) -TeleGPS.icns: $(MAC_TG_FILES) - png2icns $@ $(MAC_TG_FILES) +MIME_ICONS = $(EEPROM_ICON) $(TELEM_ICON) $(MPD_ICON) -MicroPeak.icns: $(MAC_MP_FILES) - png2icns $@ $(MAC_MP_FILES) +mimeicondir = $(ICON_THEME)/scalable/mimetypes +mimeicon_DATA = $(MIME_ICONS) -MINGCC32=i686-w64-mingw32-gcc -MINGWINDRES=i686-w64-mingw32-windres +mimedir = $(datadir)/mime/packages +mime_DATA = org-altusmetrum-mimetypes.xml + +EXTRA_DIST = $(appicon_DATA) $(mimeicon_DATA) $(mime_DATA) windows-stub.c + +res: + echo $(RES) + +java-altosui: + @echo $(JAVA_AM_FILES) + +java-micropeak: + @echo $(JAVA_MP_FILES) + +java-telegps: + @echo $(JAVA_TG_FILES) -SUFFIXES=.rc .exe +fat: all $(ICO_FILES) $(ICNS_FILES) $(EXE_FILES) -fat: all micro-peak.exe altus-metrum.exe telegps.exe +all-local: $(JAVA_FILES) -altus-metrum.o: altus-metrum.ico -micro-peak.o: micro-peak.ico -telegps.o: telegps.ico +clean-local: + $(RM) $(AM_NAME)-*.png $(TG_NAME)-*.png $(MP_NAME)-*.png + $(RM) $(EEPROM_NAME)-*.png $(TELEM_NAME)-*.png $(MPD_NAME)-*.png + $(RM) *.build *.ico *.rc *.icns *.o *.exe $(MPD_ICON) + +install-data-hook: + update-mime-database $(datadir)/mime + update-icon-caches $(ICON_THEME) + +$(MPD_ICON): $(MP_ICON) + $(LN_S) $(MP_ICON) $@ + +$(AM_FILES): $(AM_NAME).build +$(MP_FILES): $(MP_NAME).build +$(TG_FILES): $(TG_NAME).build + +SUFFIXES=.svg .build .icns .ico .rc .o .exe + +.svg.build: + for i in $(RES); do rsvg-convert -w $$i -h $$i -o $*-$$i.png $*.svg; done && touch $@ + +.build.icns: + png2icns $@ $(shell for i in $(MAC_RES); do echo $*-$$i.png; done) + +.build.ico: + icotool -c -o $@ $(shell for i in $(WIN_RES); do echo $*-$$i.png; done) + +.ico.rc: + echo '101 ICON "$*.ico"' > $@ + +MINGCC32=i686-w64-mingw32-gcc +MINGWINDRES=i686-w64-mingw32-windres .rc.o: $(MINGWINDRES) $*.rc $@ diff --git a/icon/altus-metrum.rc b/icon/altus-metrum.rc deleted file mode 100644 index bbd03604..00000000 --- a/icon/altus-metrum.rc +++ /dev/null @@ -1 +0,0 @@ -101 ICON "altus-metrum.ico" diff --git a/icon/altusmetrum-altosui.svg b/icon/altusmetrum-altosui.svg new file mode 100644 index 00000000..e8935a65 --- /dev/null +++ b/icon/altusmetrum-altosui.svg @@ -0,0 +1,250 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icon/altusmetrum-micropeak.svg b/icon/altusmetrum-micropeak.svg new file mode 100644 index 00000000..d37130f5 --- /dev/null +++ b/icon/altusmetrum-micropeak.svg @@ -0,0 +1,219 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/icon/altusmetrum-telegps.svg b/icon/altusmetrum-telegps.svg new file mode 100644 index 00000000..1e390f3b --- /dev/null +++ b/icon/altusmetrum-telegps.svg @@ -0,0 +1,324 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/icon/altusmetrum.svg b/icon/altusmetrum.svg deleted file mode 100644 index e8935a65..00000000 --- a/icon/altusmetrum.svg +++ /dev/null @@ -1,250 +0,0 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/icon/application-vnd.altusmetrum.eeprom.svg b/icon/application-vnd.altusmetrum.eeprom.svg new file mode 100644 index 00000000..7b481cdc --- /dev/null +++ b/icon/application-vnd.altusmetrum.eeprom.svg @@ -0,0 +1,397 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icon/application-vnd.altusmetrum.micropeak.svg b/icon/application-vnd.altusmetrum.micropeak.svg new file mode 120000 index 00000000..6efd3200 --- /dev/null +++ b/icon/application-vnd.altusmetrum.micropeak.svg @@ -0,0 +1 @@ +altusmetrum-micropeak.svg \ No newline at end of file diff --git a/icon/application-vnd.altusmetrum.telemetry.svg b/icon/application-vnd.altusmetrum.telemetry.svg new file mode 100644 index 00000000..4bcc0850 --- /dev/null +++ b/icon/application-vnd.altusmetrum.telemetry.svg @@ -0,0 +1,397 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icon/creating-linux-icons b/icon/creating-linux-icons new file mode 100644 index 00000000..5b034c09 --- /dev/null +++ b/icon/creating-linux-icons @@ -0,0 +1,29 @@ +# To create linux icons and file associations + +1) Create mime type and install + + http://www.freedesktop.org/wiki/Specifications/AddingMIMETutor/ + + # xdg-mime install --mode system org-altusmetrum-mimetypes.xml + # update-mime-database /usr/local/share/mime + + On debian, + +2) Create icons and install + + For mime type application/vnd.altusmetrum.telemetry + icon name application-vnd.altusmetrum.telemetry.svg + + All mime icons go in + + /usr/share/icons/hicolor/scalable/mimetypes + + Update the icon database + + # update-icon-caches /usr/share/icons/hicolor + +3) Create .desktop file and install + + # xdg-desktop-menu install --mode system altusmetrum-altosui.desktop + + # update-desktop-database diff --git a/icon/micro-peak.rc b/icon/micro-peak.rc deleted file mode 100644 index 4efe777d..00000000 --- a/icon/micro-peak.rc +++ /dev/null @@ -1 +0,0 @@ -101 ICON "micro-peak.ico" diff --git a/icon/micropeak.svg b/icon/micropeak.svg deleted file mode 100644 index d37130f5..00000000 --- a/icon/micropeak.svg +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff --git a/icon/org-altusmetrum-mimetypes.xml b/icon/org-altusmetrum-mimetypes.xml new file mode 100644 index 00000000..e8103c03 --- /dev/null +++ b/icon/org-altusmetrum-mimetypes.xml @@ -0,0 +1,16 @@ + + + + Altus Metrum Telemetry File + + + + Altus Metrum Eeprom Log File + + + + Altus Metrum MicroPeak Log File + + + diff --git a/icon/telegps.rc b/icon/telegps.rc deleted file mode 100644 index 7f5957f9..00000000 --- a/icon/telegps.rc +++ /dev/null @@ -1 +0,0 @@ -101 ICON "telegps.ico" diff --git a/icon/telegps.svg b/icon/telegps.svg deleted file mode 100644 index 1e390f3b..00000000 --- a/icon/telegps.svg +++ /dev/null @@ -1,324 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - diff --git a/micropeak/.gitignore b/micropeak/.gitignore index f9a61359..81dd0749 100644 --- a/micropeak/.gitignore +++ b/micropeak/.gitignore @@ -11,7 +11,7 @@ micropeak-windows.nsi MicroPeak-Linux-* MicroPeak-Mac-* MicroPeak-Windows-* -micropeak.desktop +altusmetrum-micropeak.desktop *.dll *.dylib *.so diff --git a/micropeak/Info.plist.in b/micropeak/Info.plist.in index 8f751079..b1dc6cea 100644 --- a/micropeak/Info.plist.in +++ b/micropeak/Info.plist.in @@ -23,14 +23,14 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleIconFile - MicroPeak.icns + altusmetrum-micropeak.icns CFBundleDocumentTypes CFBundleTypeName MicroPeak data file CFBundleTypeIconFile - MicroPeak.icns + application-vnd.altusmetrum.micropeak.icns CFBundleTypeExtensions mpd diff --git a/micropeak/Makefile.am b/micropeak/Makefile.am index 37d5ca63..6270fd74 100644 --- a/micropeak/Makefile.am +++ b/micropeak/Makefile.am @@ -56,23 +56,31 @@ ALTOSUILIB_CLASS=\ ICONDIR=$(top_srcdir)/icon JAVA_ICONS=\ - $(ICONDIR)/micropeak-16.png \ - $(ICONDIR)/micropeak-32.png \ - $(ICONDIR)/micropeak-48.png \ - $(ICONDIR)/micropeak-64.png \ - $(ICONDIR)/micropeak-128.png \ - $(ICONDIR)/micropeak-256.png + $(ICONDIR)/altusmetrum-micropeak-16.png \ + $(ICONDIR)/altusmetrum-micropeak-32.png \ + $(ICONDIR)/altusmetrum-micropeak-48.png \ + $(ICONDIR)/altusmetrum-micropeak-64.png \ + $(ICONDIR)/altusmetrum-micropeak-128.png\ + $(ICONDIR)/altusmetrum-micropeak-256.png # icon base names for jar -ICONJAR= -C $(ICONDIR) micropeak-16.png \ - -C $(ICONDIR) micropeak-32.png \ - -C $(ICONDIR) micropeak-48.png \ - -C $(ICONDIR) micropeak-64.png \ - -C $(ICONDIR) micropeak-128.png \ - -C $(ICONDIR) micropeak-256.png - -WINDOWS_ICON=$(ICONDIR)/micro-peak.ico $(ICONDIR)/micro-peak.exe -MACOSX_ICON=$(ICONDIR)/MicroPeak.icns +ICONJAR= \ + -C $(ICONDIR) altusmetrum-micropeak-16.png \ + -C $(ICONDIR) altusmetrum-micropeak-32.png \ + -C $(ICONDIR) altusmetrum-micropeak-48.png \ + -C $(ICONDIR) altusmetrum-micropeak-64.png \ + -C $(ICONDIR) altusmetrum-micropeak-128.png\ + -C $(ICONDIR) altusmetrum-micropeak-256.png + +WINDOWS_ICONS =\ + ../icon/altusmetrum-micropeak.ico \ + ../icon/altusmetrum-micropeak.exe + ../icon/application-vnd.altusmetrum.micropeak.ico \ + ../icon/application-vnd.altusmetrum.micropeak.ico + +MACOSX_ICONS =\ + ../icon/altusmetrum-micropeak.icns \ + ../icon/application-vnd.altusmetrum.micropeak.icns desktopdir = $(datadir)/applications desktop_file = altusmetrum-micropeak.desktop @@ -106,14 +114,14 @@ DOC=$(MICROPEAK_DOC) FAT_FILES=$(FATJAR) $(ALTOSLIB_CLASS) $(ALTOSUILIB_CLASS) $(FREETTS_CLASS) $(JFREECHART_CLASS) $(JCOMMON_CLASS) -LINUX_FILES=$(FAT_FILES) libaltos.so $(FIRMWARE) $(DOC) micropeak.desktop.in ../icon/micropeak.svg -LINUX_EXTRA=micropeak-fat micropeak.desktop.in +LINUX_FILES=$(FAT_FILES) libaltos.so $(FIRMWARE) $(DOC) $(desktop_file).in ../icon/altusmetrum-micropeak.svg +LINUX_EXTRA=micropeak-fat $(desktop_file).in MACOSX_DRIVER_URL=http://www.ftdichip.com/Drivers/VCP/MacOSX/FTDIUSBSerialDriver_v2_2_18.dmg MACOSX_DRIVER=FTDIUSBSerialDriver_v2_2_18.dmg MACOSX_INFO_PLIST=Info.plist MACOSX_README=ReadMe-Mac.rtf -MACOSX_FILES=$(FAT_FILES) libaltos.dylib $(MACOSX_INFO_PLIST) $(MACOSX_DRIVER) $(MACOSX_README) $(DOC) $(MACOSX_ICON) +MACOSX_FILES=$(FAT_FILES) libaltos.dylib $(MACOSX_INFO_PLIST) $(MACOSX_DRIVER) $(MACOSX_README) $(DOC) $(MACOSX_ICONS) $(MACOSX_DRIVER): wget $(MACOSX_DRIVER_URL) @@ -124,7 +132,7 @@ WINDOWS_DRIVER=CDM20824_Setup.exe $(WINDOWS_DRIVER): wget $(WINDOWS_DRIVER_URL) -WINDOWS_FILES=$(FAT_FILES) altos.dll altos64.dll $(DOC) $(WINDOWS_ICON) $(WINDOWS_DRIVER) +WINDOWS_FILES=$(FAT_FILES) altos.dll altos64.dll $(DOC) $(WINDOWS_ICONS) $(WINDOWS_DRIVER) if FATINSTALL @@ -261,7 +269,7 @@ $(MACOSX_DIST): $(MACOSX_FILES) cp -p Info.plist macosx/MicroPeak.app/Contents cp -p $(MACOSX_DRIVER) macosx mkdir -p macosx/MicroPeak.app/Contents/Resources/Java - cp -p $(MACOSX_ICON) macosx/MicroPeak.app/Contents/Resources + cp -p $(MACOSX_ICONS) macosx/MicroPeak.app/Contents/Resources cp -p $(FATJAR) macosx/MicroPeak.app/Contents/Resources/Java/micropeak.jar cp -p libaltos.dylib macosx/MicroPeak.app/Contents/Resources/Java cp -p $(ALTOSLIB_CLASS) macosx/MicroPeak.app/Contents/Resources/Java diff --git a/micropeak/MicroPeak.app/Contents/Resources/MicroPeak.icns b/micropeak/MicroPeak.app/Contents/Resources/MicroPeak.icns deleted file mode 100644 index 9ba83bf5..00000000 Binary files a/micropeak/MicroPeak.app/Contents/Resources/MicroPeak.icns and /dev/null differ diff --git a/micropeak/altusmetrum-micropeak.desktop.in b/micropeak/altusmetrum-micropeak.desktop.in index f7d258ec..782b4704 100644 --- a/micropeak/altusmetrum-micropeak.desktop.in +++ b/micropeak/altusmetrum-micropeak.desktop.in @@ -3,7 +3,7 @@ Type=Application Name=MicroPeak GenericName=MicroPeak Download and Analysis Comment=View and log data from MicroPeak altimeters -Icon=%icondir%/micropeak.svg +Icon=%icondir%/altusmetrum-micropeak.svg Exec=%bindir%/micropeak %f Terminal=false MimeType=application/vnd.altusmetrum.micropeak diff --git a/micropeak/micropeak-windows.nsi.in b/micropeak/micropeak-windows.nsi.in index d8e47505..848523b0 100644 --- a/micropeak/micropeak-windows.nsi.in +++ b/micropeak/micropeak-windows.nsi.in @@ -4,11 +4,13 @@ !include java.nsh !include refresh-sh.nsh -!define REG_NAME "MicroPeak" -!define PROG_ID "org.altusmetrum.micropeak.1" -!define FAT_NAME "micropeak-fat.jar" -!define ICO_ICO "micro-peak.ico" -!define ICO_EXE "micro-peak.exe" +!define REG_NAME "MicroPeak" +!define PROG_ID "org.altusmetrum.micropeak.1" +!define PROG_ID_MPD "org.altusmetrum.micropeak.mpd.1" +!define FAT_NAME "micropeak-fat.jar" +!define WIN_APP_ICON "altusmetrum-micropeak.ico" +!define WIN_APP_EXE "altusmetrum-micropeak.exe" +!define WIN_MPD_EXE "application-vnd.altusmetrum.micropeak.exe" Name "${REG_NAME} Installer" @@ -82,13 +84,13 @@ Section "${REG_NAME} Application" File "*.dll" - File "../icon/${ICO_ICO}" + File "../icon/${WIN_APP_ICON}" - CreateShortCut "$SMPROGRAMS\${REG_NAME}.lnk" "$SYSDIR\javaw.exe" "-jar ${FAT_NAME}" "$INSTDIR\${ICO_ICO}" + CreateShortCut "$SMPROGRAMS\${REG_NAME}.lnk" "$SYSDIR\javaw.exe" "-jar ${FAT_NAME}" "$INSTDIR\${WIN_APP_ICON}" SectionEnd Section "${REG_NAME} Desktop Shortcut" - CreateShortCut "$DESKTOP\${REG_NAME}.lnk" "$INSTDIR\${FAT_NAME}" "" "$INSTDIR\${ICO_ICO}" + CreateShortCut "$DESKTOP\${REG_NAME}.lnk" "$INSTDIR\${FAT_NAME}" "" "$INSTDIR\${WIN_APP_ICON}" SectionEnd Section "Documentation" @@ -102,24 +104,28 @@ Section "File Associations" SetOutPath $INSTDIR - File "../icon/${ICO_EXE}" + File "../icon/${WIN_APP_EXE}" + File "../icon/${WIN_MPD_EXE}" ; application elements - WriteRegStr HKCR "${PROG_ID}" "" "MicroPeak Data File" - WriteRegStr HKCR "${PROG_ID}" "FriendlyTypeName" "MicroPeak Data File" - WriteRegStr HKCR "${PROG_ID}\CurVer" "" "${PROG_ID}" - WriteRegStr HKCR "${PROG_ID}\DefaultIcon" "" '"$INSTDIR\${ICO_EXE}",-101' - WriteRegExpandStr HKCR "${PROG_ID}\shell\play\command" "" '"%SYSTEMROOT%\System32\javaw.exe" -Djava.library.path="$INSTDIR" -jar "$INSTDIR\${FAT_NAME}" "%1"' + DeleteRegKey HKCR "${PROG_ID}" + DeleteRegKey HKCR "${PROG_ID_MPD}" + + WriteRegStr HKCR "${PROG_ID_MPD}" "" "MicroPeak Data File" + WriteRegStr HKCR "${PROG_ID_MPD}" "FriendlyTypeName" "MicroPeak Data File" + WriteRegStr HKCR "${PROG_ID_MPD}\CurVer" "" "${PROG_ID_MPD}" + WriteRegStr HKCR "${PROG_ID_MPD}\DefaultIcon" "" '"$INSTDIR\${WIN_MPD_EXE}",-101' + WriteRegExpandStr HKCR "${PROG_ID_MPD}\shell\play\command" "" '"%SYSTEMROOT%\System32\javaw.exe" -Djava.library.path="$INSTDIR" -jar "$INSTDIR\${FAT_NAME}" "%1"' ; .mpd elements - WriteRegStr HKCR ".mpd" "" "${PROG_ID}" + WriteRegStr HKCR ".mpd" "" "${PROG_ID_MPD}" WriteRegStr HKCR ".mpd" "PerceivedType" "MicroPeak Data File" - WriteRegStr HKCR ".mpd" "Content Type" "application/micropeak" + WriteRegStr HKCR ".mpd" "Content Type" "application/vnd.altusmetrum.micropeak" - WriteRegStr HKCR ".mpd\OpenWithProgids" "${PROG_ID}" "" - WriteRegStr HKCR ".mpd\${PROG_ID}" "" "${REG_NAME}" + WriteRegStr HKCR ".mpd\OpenWithProgids" "${PROG_ID_MPD}" "" + WriteRegStr HKCR ".mpd\${PROG_ID_MPD}" "" "${REG_NAME}" Call RefreshShellIcons SectionEnd @@ -153,15 +159,16 @@ Section "Uninstall" DetailPrint "Delete uninstall reg entries" DeleteRegKey HKCR "${PROG_ID}" + DeleteRegKey HKCR "${PROG_ID_MPD}" - DeleteRegKey HKCR ".mpd\${PROG_ID}" - DeleteRegValue HKCR ".mpd\OpenWithProgids" "${PROG_ID}" + DeleteRegKey HKCR ".mpd\${PROG_ID_MPD}" + DeleteRegValue HKCR ".mpd\OpenWithProgids" "${PROG_ID_MPD}" Delete "$INSTDIR\${FAT_NAME}" Delete "$INSTDIR\uninstall-${REG_NAME}.exe" - Delete "$INSTDIR\${ICO_ICO}" - Delete "$INSTDIR\${ICO_EXE}" + Delete "$INSTDIR\${WIN_APP_ICON}" + Delete "$INSTDIR\${WIN_APP_EXE}" ; Remove shortcuts, if any Delete "$SMPROGRAMS\${REG_NAME}.lnk" diff --git a/telegps/.gitignore b/telegps/.gitignore index edb509f2..37e46ad1 100644 --- a/telegps/.gitignore +++ b/telegps/.gitignore @@ -17,7 +17,7 @@ TeleGPS-Linux-*.tar.bz2 TeleGPS-Linux-*.sh TeleGPS-Mac-*.zip TeleGPS-Windows-*.exe -telegps.desktop +altusmetrum-telegps.desktop telegps-windows.log *.dll *.dylib diff --git a/telegps/Info.plist.in b/telegps/Info.plist.in index 7dbb77d1..89870a8c 100644 --- a/telegps/Info.plist.in +++ b/telegps/Info.plist.in @@ -23,14 +23,14 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleIconFile - TeleGPS.icns + altusmetrum-telegps.icns CFBundleDocumentTypes CFBundleTypeName Telemetry CFBundleTypeIconFile - TeleGPS.icns + application-vnd.altusmetrum.telemetry.icns CFBundleTypeExtensions telem @@ -42,7 +42,7 @@ CFBundleTypeName Eeprom CFBundleTypeIconFile - TeleGPS.icns + application-vnd.altusmetrum.eeprom.icns CFBundleTypeExtensions eeprom diff --git a/telegps/Makefile.am b/telegps/Makefile.am index c4f6a58b..a7defb8a 100644 --- a/telegps/Makefile.am +++ b/telegps/Makefile.am @@ -58,23 +58,34 @@ ALTOSUILIB_CLASS=\ ICONDIR=$(top_srcdir)/icon JAVA_ICONS=\ - $(ICONDIR)/telegps-16.png \ - $(ICONDIR)/telegps-32.png \ - $(ICONDIR)/telegps-48.png \ - $(ICONDIR)/telegps-64.png \ - $(ICONDIR)/telegps-128.png \ - $(ICONDIR)/telegps-256.png + $(ICONDIR)/altusmetrum-telegps-16.png \ + $(ICONDIR)/altusmetrum-telegps-32.png \ + $(ICONDIR)/altusmetrum-telegps-48.png \ + $(ICONDIR)/altusmetrum-telegps-64.png \ + $(ICONDIR)/altusmetrum-telegps-128.png\ + $(ICONDIR)/altusmetrum-telegps-256.png # icon base names for jar -ICONJAR= -C $(ICONDIR) telegps-16.png \ - -C $(ICONDIR) telegps-32.png \ - -C $(ICONDIR) telegps-48.png \ - -C $(ICONDIR) telegps-64.png \ - -C $(ICONDIR) telegps-128.png \ - -C $(ICONDIR) telegps-256.png - -WINDOWS_ICON=$(ICONDIR)/telegps.ico $(ICONDIR)/telegps.exe -MACOSX_ICON=$(ICONDIR)/TeleGPS.icns +ICONJAR= \ + -C $(ICONDIR) altusmetrum-telegps-16.png \ + -C $(ICONDIR) altusmetrum-telegps-32.png \ + -C $(ICONDIR) altusmetrum-telegps-48.png \ + -C $(ICONDIR) altusmetrum-telegps-64.png \ + -C $(ICONDIR) altusmetrum-telegps-128.png\ + -C $(ICONDIR) altusmetrum-telegps-256.png + +WINDOWS_ICONS =\ + ../icon/altusmetrum-telegps.ico \ + ../icon/altusmetrum-telegps.exe + ../icon/application-vnd.altusmetrum.eeprom.ico \ + ../icon/application-vnd.altusmetrum.eeprom.exe \ + ../icon/application-vnd.altusmetrum.telemetry.ico \ + ../icon/application-vnd.altusmetrum.telemetry.exe + +MACOSX_ICONS =\ + ../icon/altusmetrum-telegps.icns \ + ../icon/application-vnd.altusmetrum.eeprom.icns \ + ../icon/application-vnd.altusmetrum.telemetry.icns # Firmware FIRMWARE_TD_0_2=$(top_srcdir)/src/teledongle-v0.2/teledongle-v0.2-$(VERSION).ihx @@ -120,15 +131,15 @@ DOC=$(TELEGPS_DOC) FAT_FILES=$(FATJAR) $(ALTOSLIB_CLASS) $(ALTOSUILIB_CLASS) $(FREETTS_CLASS) $(JFREECHART_CLASS) $(JCOMMON_CLASS) -LINUX_FILES=$(FAT_FILES) libaltos.so $(FIRMWARE) $(DOC) $(desktop_file).in ../icon/telegps.svg +LINUX_FILES=$(FAT_FILES) libaltos.so $(FIRMWARE) $(DOC) $(desktop_file).in ../icon/altusmetrum-telegps.svg LINUX_EXTRA=telegps-fat $(desktop_file).in MACOSX_INFO_PLIST=Info.plist MACOSX_README=ReadMe-Mac.rtf -MACOSX_FILES=$(FAT_FILES) libaltos.dylib $(MACOSX_INFO_PLIST) $(MACOSX_README) $(DOC) $(MACOSX_ICON) +MACOSX_FILES=$(FAT_FILES) libaltos.dylib $(MACOSX_INFO_PLIST) $(MACOSX_README) $(DOC) $(MACOSX_ICONS) MACOSX_EXTRA=$(FIRMWARE) -WINDOWS_FILES=$(FAT_FILES) altos.dll altos64.dll $(top_srcdir)/altusmetrum.inf $(top_srcdir)/altusmetrum.cat $(DOC) $(WINDOWS_ICON) +WINDOWS_FILES=$(FAT_FILES) altos.dll altos64.dll $(top_srcdir)/altusmetrum.inf $(top_srcdir)/altusmetrum.cat $(DOC) $(WINDOWS_ICONS) if FATINSTALL @@ -194,7 +205,7 @@ $(FATJAR): classtelegps.stamp Manifest-fat.txt $(ALTOSLIB_CLASS) $(ALTOSUILIB_CL -C classes org \ -C ../libaltos libaltosJNI -classaltosui.stamp: $(ALTOSLIB_CLASS) $(ALTOSUILIB_CLASS) +classtelegps.stamp: $(ALTOSLIB_CLASS) $(ALTOSUILIB_CLASS) libaltos.so: build-libaltos -rm -f "$@" @@ -269,7 +280,7 @@ $(MACOSX_DIST): $(MACOSX_FILES) $(MACOSX_EXTRA) Makefile cp -a $(DOC) macosx/Doc cp -p Info.plist macosx/TeleGPS.app/Contents mkdir -p macosx/AltOS-$(VERSION) macosx/TeleGPS.app/Contents/Resources/Java - cp -p $(MACOSX_ICON) macosx/TeleGPS.app/Contents/Resources + cp -p $(MACOSX_ICONS) macosx/TeleGPS.app/Contents/Resources cp -p $(FATJAR) macosx/TeleGPS.app/Contents/Resources/Java/telegps.jar cp -p libaltos.dylib macosx/TeleGPS.app/Contents/Resources/Java cp -p $(ALTOSLIB_CLASS) macosx/TeleGPS.app/Contents/Resources/Java diff --git a/telegps/altusmetrum-telegps.desktop.in b/telegps/altusmetrum-telegps.desktop.in index 76c1eb42..7a1b3536 100644 --- a/telegps/altusmetrum-telegps.desktop.in +++ b/telegps/altusmetrum-telegps.desktop.in @@ -3,7 +3,7 @@ Type=Application Name=TeleGPS GenericName=TeleGPS monitor, download and analysis Comment=View and log data from TeleGPS tracking devices -Icon=%icondir%/telegps.svg +Icon=%icondir%/altusmetrum-telegps.svg Exec=%bindir%/telegps %f Terminal=false MimeType=application/vnd.altusmetrum.telemetry;application/vnd.altusmetrum.eeprom diff --git a/telegps/telegps-windows.nsi.in b/telegps/telegps-windows.nsi.in index 3f9648f9..603d4971 100644 --- a/telegps/telegps-windows.nsi.in +++ b/telegps/telegps-windows.nsi.in @@ -4,12 +4,14 @@ !include java.nsh !include refresh-sh.nsh -!define REG_NAME "TeleGPS" -!define PROG_ID "org.altusmetrum.telegps.1" -!define PROG_ALTOSUI "org.altusmetrum.altosui.1" -!define FAT_NAME "telegps-fat.jar" -!define ICO_ICO "telegps.ico" -!define ICO_EXE "telegps.exe" +!define REG_NAME "TeleGPS" +!define PROG_ID_TELEM "altusmetrum.telegps.telem.1" +!define PROG_ID_EEPROM "altusmetrum.telegps.eeprom.1" +!define FAT_NAME "telegps-fat.jar" +!define WIN_APP_ICON "altusmetrum-telegps.ico" +!define WIN_APP_EXE "altusmetrum-telegps.exe" +!define WIN_TELEM_EXE "application-vnd.altusmetrum.telemetry.exe" +!define WIN_EEPROM_EXE "application-vnd.altusmetrum.eeprom.exe" Name "${REG_NAME} Installer" @@ -104,13 +106,13 @@ Section "${REG_NAME} Application" File "*.dll" - File "../icon/${ICO_ICO}" + File "../icon/${WIN_APP_ICON}" - CreateShortCut "$SMPROGRAMS\${REG_NAME}.lnk" "$SYSDIR\javaw.exe" "-jar ${FAT_NAME}" "$INSTDIR\${ICO_ICO}" + CreateShortCut "$SMPROGRAMS\${REG_NAME}.lnk" "$SYSDIR\javaw.exe" "-jar ${FAT_NAME}" "$INSTDIR\${WIN_APP_ICON}" SectionEnd Section "${REG_NAME} Desktop Shortcut" - CreateShortCut "$DESKTOP\${REG_NAME}.lnk" "$INSTDIR\${FAT_NAME}" "" "$INSTDIR\${ICO_ICO}" + CreateShortCut "$DESKTOP\${REG_NAME}.lnk" "$INSTDIR\${FAT_NAME}" "" "$INSTDIR\${WIN_APP_ICON}" SectionEnd Section "TeleGPS, TeleDongle and TeleBT Firmware" @@ -134,35 +136,51 @@ SectionEnd Section "File Associations" + ${DisableX64FSRedirection} + SetOutPath $INSTDIR - File "../icon/${ICO_EXE}" + File "../icon/${WIN_APP_EXE}" + File "../icon/${WIN_TELEM_EXE}" + File "../icon/${WIN_EEPROM_EXE}" - ; application elements - - WriteRegStr HKCR "${PROG_ID}" "" "Altus Metrum Data File" - WriteRegStr HKCR "${PROG_ID}" "FriendlyTypeName" "Altus Metrum Data File" - WriteRegStr HKCR "${PROG_ID}\CurVer" "" "${PROG_ID}" - WriteRegStr HKCR "${PROG_ID}\DefaultIcon" "" '"$INSTDIR\${ICO_EXE}",-101' - WriteRegExpandStr HKCR "${PROG_ID}\shell\play\command" "" '"%SYSTEMROOT%\System32\javaw.exe" -Djava.library.path="$INSTDIR" -jar "$INSTDIR\${FAT_NAME}" "%1"' + DeleteRegKey HKCR "${PROG_ID_TELEM}" + DeleteRegKey HKCR "${PROG_ID_EEPROM}" + + DeleteRegKey HKCR ".eeprom\${PROG_ID_EEPROM}" + DeleteRegValue HKCR ".eeprom\OpenWithProgids" "${PROG_ID_EEPROM}" + DeleteRegKey HKCR ".telem\${PROG_ID_EEPROM}" + DeleteRegValue HKCR ".telem\OpenWithProgids" "${PROG_ID_EEPROM}" ; .eeprom elements - WriteRegStr HKCR ".eeprom" "" "${PROG_ALTOSUI}" + WriteRegStr HKCR "${PROG_ID_EEPROM}" "" "Altus Metrum Log File" + WriteRegStr HKCR "${PROG_ID_EEPROM}" "FriendlyTypeName" "Altus Metrum Log File" + WriteRegStr HKCR "${PROG_ID_EEPROM}\CurVer" "" "${PROG_ID_EEPROM}" + WriteRegStr HKCR "${PROG_ID_EEPROM}\DefaultIcon" "" '"$INSTDIR\${WIN_EEPROM_EXE}",-101' + WriteRegExpandStr HKCR "${PROG_ID_EEPROM}\shell\open\command" "" '"%SYSTEMROOT%\System32\javaw.exe" -Djava.library.path="$INSTDIR" -jar "$INSTDIR\${FAT_NAME}" "%1"' + + WriteRegStr HKCR ".eeprom" "" "${PROG_ID_EEPROM}" WriteRegStr HKCR ".eeprom" "PerceivedType" "Altus Metrum Log File" - WriteRegStr HKCR ".eeprom" "Content Type" "application/altosui" + WriteRegStr HKCR ".eeprom" "Content Type" "application/vnd.altusmetrum.eeprom" - WriteRegStr HKCR ".eeprom\OpenWithProgids" "${PROG_ID}" "" - WriteRegStr HKCR ".eeprom\${PROG_ID}" "" "${REG_NAME}" + WriteRegStr HKCR ".eeprom\OpenWithProgids" "${PROG_ID_EEPROM}" "" + WriteRegStr HKCR ".eeprom\${PROG_ID_EEPROM}" "" "${REG_NAME}" ; .telem elements - WriteRegStr HKCR ".telem" "" "${PROG_ALTOSUI}" + WriteRegStr HKCR "${PROG_ID_TELEM}" "" "Altus Metrum Telemetry File" + WriteRegStr HKCR "${PROG_ID_TELEM}" "FriendlyTypeName" "Altus Metrum Telemetry File" + WriteRegStr HKCR "${PROG_ID_TELEM}\CurVer" "" "${PROG_ID_TELEM}" + WriteRegStr HKCR "${PROG_ID_TELEM}\DefaultIcon" "" '"$INSTDIR\${WIN_TELEM_EXE}",-101' + WriteRegExpandStr HKCR "${PROG_ID_TELEM}\shell\open\command" "" '"%SYSTEMROOT%\System32\javaw.exe" -Djava.library.path="$INSTDIR" -jar "$INSTDIR\${FAT_NAME}" "%1"' + + WriteRegStr HKCR ".telem" "" "${PROG_ID_TELEM}" WriteRegStr HKCR ".telem" "PerceivedType" "Altus Metrum Telemetry File" - WriteRegStr HKCR ".telem" "Content Type" "application/altosui" + WriteRegStr HKCR ".telem" "Content Type" "application/vnd.altusmetrum.telemetry" - WriteRegStr HKCR ".telem\OpenWithProgids" "${PROG_ID}" "" - WriteRegStr HKCR ".telem\${PROG_ID}" "" "${REG_NAME}" + WriteRegStr HKCR ".telem\OpenWithProgids" "${PROG_ID_TELEM}" "" + WriteRegStr HKCR ".telem\${PROG_ID_TELEM}" "" "${REG_NAME}" Call RefreshShellIcons SectionEnd @@ -195,21 +213,22 @@ Section "Uninstall" DetailPrint "Delete uninstall reg entries" - DeleteRegKey HKCR "${PROG_ID}" + DeleteRegKey HKCR "${PROG_ID_EEPROM}" + DeleteRegKey HKCR "${PROG_ID_TELEM}" - DeleteRegKey HKCR ".eeprom\${PROG_ID}" - DeleteRegValue HKCR ".eeprom\OpenWithProgids" "${PROG_ID}" + DeleteRegKey HKCR ".eeprom\${PROG_ID_EEPROM}" + DeleteRegValue HKCR ".eeprom\OpenWithProgids" "${PROG_ID_EEPROM}" - DeleteRegKey HKCR ".telem\${PROG_ID}" - DeleteRegValue HKCR ".telem\OpenWithProgids" "${PROG_ID}" + DeleteRegKey HKCR ".telem\${PROG_ID_TELEM}" + DeleteRegValue HKCR ".telem\OpenWithProgids" "${PROG_ID_TELEM}" DetailPrint "Delete file association reg entries" Delete "$INSTDIR\${FAT_NAME}" Delete "$INSTDIR\uninstall-${REG_NAME}.exe" - Delete "$INSTDIR\${ICO_ICO}" - Delete "$INSTDIR\${ICO_EXE}" + Delete "$INSTDIR\${WIN_APP_ICON}" + Delete "$INSTDIR\${WIN_APP_EXE}" ; Remove shortcuts, if any Delete "$SMPROGRAMS\${REG_NAME}.lnk" -- cgit v1.2.3 From 3016ee5f21ec66bf9230b90ab1420b8fad628f8d Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 20 Jun 2014 00:40:10 -0700 Subject: altosuilib: Wrap radio frequency menu in JMenuBar when used in config The device config dialogs place the radio frequency menu inside a dialog box; it needs to be inside a MenuBar to work properly, so create one to hold it. Signed-off-by: Keith Packard --- altosui/AltosConfigUI.java | 5 ++++- telegps/TeleGPSConfigUI.java | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/altosui/AltosConfigUI.java b/altosui/AltosConfigUI.java index 4a33b64f..a4e7aca6 100644 --- a/altosui/AltosConfigUI.java +++ b/altosui/AltosConfigUI.java @@ -419,7 +419,10 @@ public class AltosConfigUI c.ipady = 5; radio_frequency_value = new AltosFreqList(); radio_frequency_value.addItemListener(this); - pane.add(radio_frequency_value, c); + + JMenuBar menu_bar = new JMenuBar(); + menu_bar.add(radio_frequency_value); + pane.add(menu_bar, c); radio_frequency_value.setToolTipText("Telemetry, RDF and packet frequency"); row++; diff --git a/telegps/TeleGPSConfigUI.java b/telegps/TeleGPSConfigUI.java index 7d28b371..dfbff12d 100644 --- a/telegps/TeleGPSConfigUI.java +++ b/telegps/TeleGPSConfigUI.java @@ -257,7 +257,11 @@ public class TeleGPSConfigUI c.ipady = 5; radio_frequency_value = new AltosFreqList(); radio_frequency_value.addItemListener(this); - pane.add(radio_frequency_value, c); + + JMenuBar menu_bar = new JMenuBar(); + menu_bar.add(radio_frequency_value); + + pane.add(menu_bar, c); radio_frequency_value.setToolTipText("Telemetry, RDF and packet frequency"); row++; -- cgit v1.2.3 From 602d6a2424a5c16e22febf6b4e6b3816022261c7 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 20 Jun 2014 00:41:17 -0700 Subject: altos/aprs: Encode last serial number in SSID. Transmit serial in comment This makes it a lot easier to tell which device is sending information, and to receive data from multiple devices on the same receiver. Signed-off-by: Keith Packard --- src/drivers/ao_aprs.c | 4 ++++ src/test/ao_aprs_test.c | 24 ------------------------ telegps/Makefile.am | 2 -- 3 files changed, 4 insertions(+), 26 deletions(-) diff --git a/src/drivers/ao_aprs.c b/src/drivers/ao_aprs.c index 8a1b6a4d..c33016f0 100644 --- a/src/drivers/ao_aprs.c +++ b/src/drivers/ao_aprs.c @@ -261,6 +261,7 @@ static uint8_t TNC_AX25_HEADER[] = { #define TNC_CALLSIGN_OFF 7 #define TNC_CALLSIGN_LEN 6 +#define TNC_SSID_OFF 13 static void tncSetCallsign(void) @@ -275,6 +276,7 @@ tncSetCallsign(void) } for (; i < TNC_CALLSIGN_LEN; i++) TNC_AX25_HEADER[TNC_CALLSIGN_OFF + i] = ' ' << 1; + TNC_AX25_HEADER[TNC_SSID_OFF] = 0x60 | ((ao_serial_number % 10) << 1); #endif } @@ -530,6 +532,7 @@ static int tncComment(uint8_t *buf) #ifdef AO_SENSE_MAIN " M%d.%d" #endif + " %d" , ao_gps_locked(), ao_num_sats(), battery/10, @@ -542,6 +545,7 @@ static int tncComment(uint8_t *buf) , main/10, main%10 #endif + , ao_serial_number ); #else return sprintf((char *) buf, diff --git a/src/test/ao_aprs_test.c b/src/test/ao_aprs_test.c index 86cf527a..573b5cb2 100644 --- a/src/test/ao_aprs_test.c +++ b/src/test/ao_aprs_test.c @@ -97,36 +97,12 @@ audio_gap(int secs) #endif } -#include - -int -ao_aprs_encode_altitude_expensive(int meters) -{ - double feet = meters / 0.3048; - - double encode = log(feet) / log(1.002); - return floor(encode + 0.5); -} - // This is where we go after reset. int main(int argc, char **argv) { int e, x; int a; - for (a = 1; a < 100000; a++) { - e = ao_aprs_encode_altitude(a); - x = ao_aprs_encode_altitude_expensive(a); - - if (e != x) { - double back_feet, back_meters; - back_feet = pow(1.002, e); - back_meters = back_feet * 0.3048; - fprintf (stderr, "APRS altitude encoding failure: altitude %d actual %d expected %d actual meters %f\n", - a, e, x, back_meters); - } - } - audio_gap(1); ao_gps_data.latitude = (45.0 + 28.25 / 60.0) * 10000000; diff --git a/telegps/Makefile.am b/telegps/Makefile.am index a7defb8a..3f53b949 100644 --- a/telegps/Makefile.am +++ b/telegps/Makefile.am @@ -205,8 +205,6 @@ $(FATJAR): classtelegps.stamp Manifest-fat.txt $(ALTOSLIB_CLASS) $(ALTOSUILIB_CL -C classes org \ -C ../libaltos libaltosJNI -classtelegps.stamp: $(ALTOSLIB_CLASS) $(ALTOSUILIB_CLASS) - libaltos.so: build-libaltos -rm -f "$@" $(LN_S) ../libaltos/.libs/"$@" . -- cgit v1.2.3 From ca1c62ca3ea016a1a5baa4520e484c102280c3e3 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 21 Jun 2014 18:27:42 -0700 Subject: altosui: Add Ignitor tab to Monitor Idle mode Oops; missed adding this when I included it in the Monitor Flight window. Signed-off-by: Keith Packard --- altosui/AltosIdleMonitorUI.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/altosui/AltosIdleMonitorUI.java b/altosui/AltosIdleMonitorUI.java index dd69b6f1..63d86291 100644 --- a/altosui/AltosIdleMonitorUI.java +++ b/altosui/AltosIdleMonitorUI.java @@ -33,9 +33,11 @@ public class AltosIdleMonitorUI extends AltosUIFrame implements AltosFlightDispl AltosPad pad; AltosInfoTable flightInfo; AltosFlightStatus flightStatus; + AltosIgnitor ignitor; AltosIdleMonitor thread; int serial; boolean remote; + boolean has_ignitor; void stop_display() { if (thread != null) { @@ -70,10 +72,22 @@ public class AltosIdleMonitorUI extends AltosUIFrame implements AltosFlightDispl public void show(AltosState state, AltosListenerState listener_state) { status_update.saved_state = state; + if (ignitor.should_show(state)) { + if (!has_ignitor) { + pane.add("Ignitor", ignitor); + has_ignitor = true; + } + } else { + if (has_ignitor) { + pane.remove(ignitor); + has_ignitor = false; + } + } // try { pad.show(state, listener_state); flightStatus.show(state, listener_state); flightInfo.show(state, listener_state); + ignitor.show(state, listener_state); // } catch (Exception e) { // System.out.print("Show exception " + e); // } @@ -222,6 +236,8 @@ public class AltosIdleMonitorUI extends AltosUIFrame implements AltosFlightDispl flightInfo = new AltosInfoTable(); pane.add("Table", new JScrollPane(flightInfo)); + ignitor = new AltosIgnitor(); + /* Make the tabbed pane use the rest of the window space */ bag.add(pane, constraints(0, 3, GridBagConstraints.BOTH)); -- cgit v1.2.3 From 3f3382126bf1122b1a78abe8458af5ec112a1f95 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 22 Jun 2014 21:05:05 -0700 Subject: altos: Make APRS SSID configurable This uses the low-digit from the serial number by default, but lets the user change it if desired. Signed-off-by: Keith Packard --- src/drivers/ao_aprs.c | 100 ++++++++++++++++++++++++++----------------------- src/kernel/ao_config.c | 34 +++++++++++++++++ src/kernel/ao_config.h | 5 ++- 3 files changed, 91 insertions(+), 48 deletions(-) diff --git a/src/drivers/ao_aprs.c b/src/drivers/ao_aprs.c index c33016f0..a9047149 100644 --- a/src/drivers/ao_aprs.c +++ b/src/drivers/ao_aprs.c @@ -1,11 +1,11 @@ -/** +/** * http://ad7zj.net/kd7lmo/aprsbeacon_code.html * * @mainpage Pico Beacon * * @section overview_sec Overview * - * The Pico Beacon is an APRS based tracking beacon that operates in the UHF 420-450MHz band. The device utilizes a + * The Pico Beacon is an APRS based tracking beacon that operates in the UHF 420-450MHz band. The device utilizes a * Microchip PIC 18F2525 embedded controller, Motorola M12+ GPS engine, and Analog Devices AD9954 DDS. The device is capable * of generating a 1200bps A-FSK and 9600 bps FSK AX.25 compliant APRS (Automatic Position Reporting System) message. @@ -24,7 +24,7 @@ * (4) corrected size of LOG_COORD block when searching for end of log. * * @subsection v303 V3.03 - * 15 Sep 2005, Change include; (1) removed AD9954 setting SDIO as input pin, + * 15 Sep 2005, Change include; (1) removed AD9954 setting SDIO as input pin, * (2) additional comments and Doxygen tags, * (3) integration and test code calculates DDS FTW, * (4) swapped bus and reference analog input ports (hardware change), @@ -38,7 +38,7 @@ * (2) Doxygen documentation clean up and additions, and * (3) added integration and test code to baseline. * - * + * * @subsection v301 V3.01 * 13 Jan 2005, Renamed project and files to Pico Beacon. * @@ -54,28 +54,28 @@ * (8) added flight data recorder, and * (9) added diagnostics terminal mode. * - * + * * @subsection v201 V2.01 - * 30 Jan 2004, Change include; (1) General clean up of in-line documentation, and + * 30 Jan 2004, Change include; (1) General clean up of in-line documentation, and * (2) changed temperature resolution to 0.1 degrees F. * - * + * * @subsection v200 V2.00 * 26 Oct 2002, Change include; (1) Micro Beacon II hardware changes including PIC18F252 processor, - * (2) serial EEPROM, - * (3) GPS power control, - * (4) additional ADC input, and - * (5) LM60 temperature sensor. + * (2) serial EEPROM, + * (3) GPS power control, + * (4) additional ADC input, and + * (5) LM60 temperature sensor. * * * @subsection v101 V1.01 - * 5 Dec 2001, Change include; (1) Changed startup message, and + * 5 Dec 2001, Change include; (1) Changed startup message, and * (2) applied SEPARATE pragma to several methods for memory usage. * * * @subsection v100 V1.00 * 25 Sep 2001, Initial release. Flew ANSR-3 and ANSR-4. - * + * * @@ -102,11 +102,11 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * + * - * - * + * + * * @section design Design Details * * Provides design details on a variety of the components that make up the Pico Beacon. @@ -118,29 +118,33 @@ * @page power Power Consumption * * Measured DC power consumption. - * - * 3VDC prime power current + * + * 3VDC prime power current * - * 7mA Held in reset + * 7mA Held in reset - * 18mA Processor running, all I/O off + * 18mA Processor running, all I/O off - * 110mA GPS running + * 110mA GPS running - * 120mA GPS running w/antenna + * 120mA GPS running w/antenna - * 250mA DDS running and GPS w/antenna + * 250mA DDS running and GPS w/antenna - * 420mA DDS running, GPS w/antenna, and PA chain on with no RF + * 420mA DDS running, GPS w/antenna, and PA chain on with no RF - * 900mA Transmit + * 900mA Transmit * */ #ifndef AO_APRS_TEST #include + +#if !HAS_APRS +#error HAS_APRS not set +#endif #endif #include @@ -176,11 +180,11 @@ static uint16_t sysCRC16(const uint8_t *buffer, uint8_t length, uint16_t crc) { uint8_t i, bit, value; - for (i = 0; i < length; ++i) + for (i = 0; i < length; ++i) { value = buffer[i]; - for (bit = 0; bit < 8; ++bit) + for (bit = 0; bit < 8; ++bit) { crc ^= (value & 0x01); crc = ( crc & 0x01 ) ? ( crc >> 1 ) ^ 0x8408 : ( crc >> 1 ); @@ -253,7 +257,7 @@ typedef enum /// AX.25 compliant packet header that contains destination, station call sign, and path. /// 0x76 for SSID-11, 0x78 for SSID-12 -static uint8_t TNC_AX25_HEADER[] = { +static uint8_t TNC_AX25_HEADER[] = { 'A' << 1, 'P' << 1, 'A' << 1, 'M' << 1, ' ' << 1, ' ' << 1, 0x60, 'N' << 1, '0' << 1, 'C' << 1, 'A' << 1, 'L' << 1, 'L' << 1, 0x78, 'W' << 1, 'I' << 1, 'D' << 1, 'E' << 1, '2' << 1, ' ' << 1, 0x65, @@ -276,7 +280,9 @@ tncSetCallsign(void) } for (; i < TNC_CALLSIGN_LEN; i++) TNC_AX25_HEADER[TNC_CALLSIGN_OFF + i] = ' ' << 1; - TNC_AX25_HEADER[TNC_SSID_OFF] = 0x60 | ((ao_serial_number % 10) << 1); + + /* Fill in the SSID with the low digit of the serial number */ + TNC_AX25_HEADER[TNC_SSID_OFF] = 0x60 | ((ao_config.aprs_ssid & 0xf) << 1); #endif } @@ -304,7 +310,7 @@ static uint8_t tncBitStuff; /// Buffer to hold the message portion of the AX.25 packet as we prepare it. static uint8_t tncBuffer[TNC_BUFFER_SIZE]; -/** +/** * Initialize the TNC internal variables. */ static void tncInit() @@ -325,7 +331,7 @@ static void tnc1200TimerTick() else timeNCOFreq = 0x3aab; - switch (tncMode) + switch (tncMode) { case TNC_TX_READY: // Generate a test signal alteranting between high and low tones. @@ -341,16 +347,16 @@ static void tnc1200TimerTick() else tncTxBit = 0; } - + // When the flag is done, determine if we need to send more or data. - if (++tncBitCount == 8) + if (++tncBitCount == 8) { tncBitCount = 0; tncShift = 0x7e; // Once we transmit x mS of flags, send the data. // txDelay bytes * 8 bits/byte * 833uS/bit = x mS - if (++tncIndex == TNC_TX_DELAY) + if (++tncIndex == TNC_TX_DELAY) { tncIndex = 0; tncShift = TNC_AX25_HEADER[0]; @@ -363,7 +369,7 @@ static void tnc1200TimerTick() case TNC_TX_HEADER: // Determine if we have sent 5 ones in a row, if we have send a zero. - if (tncBitStuff == 0x1f) + if (tncBitStuff == 0x1f) { if (tncTxBit == 0) tncTxBit = 1; @@ -383,17 +389,17 @@ static void tnc1200TimerTick() tncTxBit = 0; } - // Save the data stream so we can determine if bit stuffing is + // Save the data stream so we can determine if bit stuffing is // required on the next bit time. tncBitStuff = ((tncBitStuff << 1) | (tncShift & 0x01)) & 0x1f; // If all the bits were shifted, get the next byte. - if (++tncBitCount == 8) + if (++tncBitCount == 8) { tncBitCount = 0; // After the header is sent, then send the data. - if (++tncIndex == sizeof(TNC_AX25_HEADER)) + if (++tncIndex == sizeof(TNC_AX25_HEADER)) { tncIndex = 0; tncShift = tncBuffer[0]; @@ -408,7 +414,7 @@ static void tnc1200TimerTick() case TNC_TX_DATA: // Determine if we have sent 5 ones in a row, if we have send a zero. - if (tncBitStuff == 0x1f) + if (tncBitStuff == 0x1f) { if (tncTxBit == 0) tncTxBit = 1; @@ -428,17 +434,17 @@ static void tnc1200TimerTick() tncTxBit = 0; } - // Save the data stream so we can determine if bit stuffing is + // Save the data stream so we can determine if bit stuffing is // required on the next bit time. tncBitStuff = ((tncBitStuff << 1) | (tncShift & 0x01)) & 0x1f; // If all the bits were shifted, get the next byte. - if (++tncBitCount == 8) + if (++tncBitCount == 8) { tncBitCount = 0; // If everything was sent, transmit closing flags. - if (++tncIndex == tncLength) + if (++tncIndex == tncLength) { tncIndex = 0; tncShift = 0x7e; @@ -453,7 +459,7 @@ static void tnc1200TimerTick() case TNC_TX_END: // The variable tncShift contains the lastest data byte. - // NRZI enocde the data stream. + // NRZI enocde the data stream. if ((tncShift & 0x01) == 0x00) { if (tncTxBit == 0) tncTxBit = 1; @@ -462,13 +468,13 @@ static void tnc1200TimerTick() } // If all the bits were shifted, get the next one. - if (++tncBitCount == 8) + if (++tncBitCount == 8) { tncBitCount = 0; tncShift = 0x7e; - + // Transmit two closing flags. - if (++tncIndex == 2) + if (++tncIndex == 2) { tncMode = TNC_TX_READY; @@ -763,7 +769,7 @@ tncFill(uint8_t *buf, int16_t len) return l; } -/** +/** * Prepare an AX.25 data packet. Each time this method is called, it automatically * rotates through 1 of 3 messages. * diff --git a/src/kernel/ao_config.c b/src/kernel/ao_config.c index 71445335..58fa7354 100644 --- a/src/kernel/ao_config.c +++ b/src/kernel/ao_config.c @@ -61,6 +61,7 @@ __xdata uint8_t ao_config_mutex; #define AO_CONFIG_DEFAULT_RADIO_POWER 0x60 #endif #define AO_CONFIG_DEFAULT_RADIO_AMP 0 +#define AO_CONFIG_DEFAULT_APRS_SSID (ao_serial_number % 10) #if HAS_EEPROM static void @@ -191,6 +192,10 @@ _ao_config_get(void) #if AO_PYRO_NUM if (minor < 18) ao_config.pyro_time = AO_CONFIG_DEFAULT_PYRO_TIME; +#endif +#if HAS_APRS + if (minor < 19) + ao_config.aprs_ssid = AO_CONFIG_DEFAULT_APRS_SSID; #endif ao_config.minor = AO_CONFIG_MINOR; ao_config_dirty = 1; @@ -283,6 +288,7 @@ ao_config_frequency_set(void) __reentrant ao_radio_recv_abort(); #endif } + #endif #if HAS_FLIGHT @@ -737,6 +743,30 @@ ao_config_pyro_time_set(void) } #endif +#if HAS_APRS +void +ao_config_aprs_ssid_show(void) +{ + printf ("APRS SSID: %d\n", + ao_config.aprs_ssid); +} + +void +ao_config_aprs_ssid_set(void) +{ + ao_cmd_decimal(); + if (ao_cmd_status != ao_cmd_success) + return; + if (15 < ao_cmd_lex_i) { + ao_cmd_status = ao_cmd_lex_error; + return; + } + _ao_config_edit_start(); + ao_config.aprs_ssid = ao_cmd_lex_i; + _ao_config_edit_finish(); +} +#endif /* HAS_APRS */ + struct ao_config_var { __code char *str; void (*set)(void) __reentrant; @@ -816,6 +846,10 @@ __code struct ao_config_var ao_config_vars[] = { #if HAS_TRACKER { "t \0Tracker configuration", ao_config_tracker_set, ao_config_tracker_show }, +#endif +#if HAS_APRS + { "S \0Set APRS SSID (0-15)", + ao_config_aprs_ssid_set, ao_config_aprs_ssid_show }, #endif { "s\0Show", ao_config_show, 0 }, diff --git a/src/kernel/ao_config.h b/src/kernel/ao_config.h index 2b5cd352..70f9f33b 100644 --- a/src/kernel/ao_config.h +++ b/src/kernel/ao_config.h @@ -53,7 +53,7 @@ #endif #define AO_CONFIG_MAJOR 1 -#define AO_CONFIG_MINOR 18 +#define AO_CONFIG_MINOR 19 #define AO_AES_LEN 16 @@ -102,6 +102,9 @@ struct ao_config { #if AO_PYRO_NUM uint16_t pyro_time; /* minor version 18 */ #endif +#if HAS_APRS + uint8_t aprs_ssid; /* minor version 19 */ +#endif }; #define AO_IGNITE_MODE_DUAL 0 -- cgit v1.2.3 From 6cc2d671c0e335fbedb0e97699f8f273502c6807 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 22 Jun 2014 21:06:24 -0700 Subject: altosui/telegps: Expose configurable APRS SSID Signed-off-by: Keith Packard --- altoslib/AltosConfigData.java | 8 +++++++ altoslib/AltosConfigValues.java | 4 ++++ altosui/AltosConfigUI.java | 53 +++++++++++++++++++++++++++++++++++++++++ telegps/TeleGPSConfigUI.java | 53 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 118 insertions(+) diff --git a/altoslib/AltosConfigData.java b/altoslib/AltosConfigData.java index d8b0b081..3bf8ea43 100644 --- a/altoslib/AltosConfigData.java +++ b/altoslib/AltosConfigData.java @@ -71,6 +71,7 @@ public class AltosConfigData implements Iterable { /* HAS_APRS */ public int aprs_interval; + public int aprs_ssid; /* HAS_BEEP */ public int beep; @@ -250,6 +251,7 @@ public class AltosConfigData implements Iterable { pyro_firing_time = -1; aprs_interval = -1; + aprs_ssid = -1; beep = -1; @@ -333,6 +335,7 @@ public class AltosConfigData implements Iterable { /* HAS_APRS */ try { aprs_interval = get_int(line, "APRS interval:"); } catch (Exception e) {} + try { aprs_ssid = get_int(line, "APRS SSID:"); } catch (Exception e) {} /* HAS_BEEP */ try { beep = get_int(line, "Beeper setting:"); } catch (Exception e) {} @@ -459,6 +462,8 @@ public class AltosConfigData implements Iterable { /* HAS_APRS */ if (aprs_interval >= 0) aprs_interval = source.aprs_interval(); + if (aprs_ssid >= 0) + aprs_ssid = source.aprs_ssid(); /* HAS_BEEP */ if (beep >= 0) @@ -507,6 +512,7 @@ public class AltosConfigData implements Iterable { dest.set_pyros(null); dest.set_pyro_firing_time(pyro_firing_time); dest.set_aprs_interval(aprs_interval); + dest.set_aprs_ssid(aprs_ssid); dest.set_beep(beep); dest.set_tracker_motion(tracker_motion); dest.set_tracker_interval(tracker_interval); @@ -577,6 +583,8 @@ public class AltosConfigData implements Iterable { /* HAS_APRS */ if (aprs_interval >= 0) link.printf("c A %d\n", aprs_interval); + if (aprs_ssid >= 0) + link.printf("c S %d\n", aprs_ssid); /* HAS_BEEP */ if (beep >= 0) diff --git a/altoslib/AltosConfigValues.java b/altoslib/AltosConfigValues.java index dcb4d48f..b0c49e98 100644 --- a/altoslib/AltosConfigValues.java +++ b/altoslib/AltosConfigValues.java @@ -81,6 +81,10 @@ public interface AltosConfigValues { public abstract void set_aprs_interval(int new_aprs_interval); + public abstract int aprs_ssid() throws AltosConfigDataException; + + public abstract void set_aprs_ssid(int new_aprs_ssid); + public abstract int beep() throws AltosConfigDataException; public abstract void set_beep(int new_beep); diff --git a/altosui/AltosConfigUI.java b/altosui/AltosConfigUI.java index a4e7aca6..6e1b47c2 100644 --- a/altosui/AltosConfigUI.java +++ b/altosui/AltosConfigUI.java @@ -41,6 +41,7 @@ public class AltosConfigUI JLabel radio_frequency_label; JLabel radio_enable_label; JLabel aprs_interval_label; + JLabel aprs_ssid_label; JLabel flight_log_max_label; JLabel ignite_mode_label; JLabel pad_orientation_label; @@ -62,6 +63,7 @@ public class AltosConfigUI JTextField radio_calibration_value; JRadioButton radio_enable_value; JComboBox aprs_interval_value; + JComboBox aprs_ssid_value; JComboBox flight_log_max_value; JComboBox ignite_mode_value; JComboBox pad_orientation_value; @@ -113,6 +115,10 @@ public class AltosConfigUI "10" }; + static Integer[] aprs_ssid_values = { + 0, 1, 2 ,3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 + }; + static String[] beep_values = { "3750", "4000", @@ -201,6 +207,15 @@ public class AltosConfigUI aprs_interval_value.setToolTipText("Hardware doesn't support APRS"); } + void set_aprs_ssid_tool_tip() { + if (aprs_ssid_value.isEnabled()) + aprs_interval_value.setToolTipText("Set the APRS SSID (secondary station identifier)"); + else if (aprs_interval_value.isEnabled()) + aprs_interval_value.setToolTipText("Software version doesn't support setting the APRS SSID"); + else + aprs_interval_value.setToolTipText("Hardware doesn't support APRS"); + } + void set_flight_log_max_tool_tip() { if (flight_log_max_value.isEnabled()) flight_log_max_value.setToolTipText("Size reserved for each flight log (in kB)"); @@ -504,6 +519,33 @@ public class AltosConfigUI set_aprs_interval_tool_tip(); row++; + /* APRS SSID */ + c = new GridBagConstraints(); + c.gridx = 0; c.gridy = row; + c.gridwidth = 4; + c.fill = GridBagConstraints.NONE; + c.anchor = GridBagConstraints.LINE_START; + c.insets = il; + c.ipady = 5; + aprs_ssid_label = new JLabel("APRS SSID:"); + pane.add(aprs_ssid_label, c); + + c = new GridBagConstraints(); + c.gridx = 4; c.gridy = row; + c.gridwidth = 4; + c.fill = GridBagConstraints.HORIZONTAL; + c.weightx = 1; + c.anchor = GridBagConstraints.LINE_START; + c.insets = ir; + c.ipady = 5; + aprs_ssid_value = new JComboBox(aprs_ssid_values); + aprs_ssid_value.setEditable(false); + aprs_ssid_value.addItemListener(this); + aprs_ssid_value.setMaximumRowCount(aprs_ssid_values.length); + pane.add(aprs_ssid_value, c); + set_aprs_ssid_tool_tip(); + row++; + /* Callsign */ c = new GridBagConstraints(); c.gridx = 0; c.gridy = row; @@ -1180,4 +1222,15 @@ public class AltosConfigUI return 0; return parse_int("aprs interval", s, false); } + + public void set_aprs_ssid(int new_aprs_ssid) { + aprs_ssid_value.setSelectedItem(Math.max(0,new_aprs_ssid)); + aprs_ssid_value.setVisible(new_aprs_ssid >= 0); + set_aprs_ssid_tool_tip(); + } + + public int aprs_ssid() throws AltosConfigDataException { + Integer i = (Integer) aprs_ssid_value.getSelectedItem(); + return i; + } } diff --git a/telegps/TeleGPSConfigUI.java b/telegps/TeleGPSConfigUI.java index dfbff12d..1fdfd70c 100644 --- a/telegps/TeleGPSConfigUI.java +++ b/telegps/TeleGPSConfigUI.java @@ -38,6 +38,7 @@ public class TeleGPSConfigUI JLabel radio_frequency_label; JLabel radio_enable_label; JLabel aprs_interval_label; + JLabel aprs_ssid_label; JLabel flight_log_max_label; JLabel callsign_label; JLabel tracker_motion_label; @@ -53,6 +54,7 @@ public class TeleGPSConfigUI JTextField radio_calibration_value; JRadioButton radio_enable_value; JComboBox aprs_interval_value; + JComboBox aprs_ssid_value; JComboBox flight_log_max_value; JTextField callsign_value; JComboBox tracker_motion_value; @@ -72,6 +74,10 @@ public class TeleGPSConfigUI "10" }; + static Integer[] aprs_ssid_values = { + 0, 1, 2 ,3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 + }; + static String[] tracker_motion_values_m = { "2", "5", @@ -148,6 +154,15 @@ public class TeleGPSConfigUI aprs_interval_value.setToolTipText("Hardware doesn't support APRS"); } + void set_aprs_ssid_tool_tip() { + if (aprs_ssid_value.isEnabled()) + aprs_interval_value.setToolTipText("Set the APRS SSID (secondary station identifier)"); + else if (aprs_interval_value.isEnabled()) + aprs_interval_value.setToolTipText("Software version doesn't support setting the APRS SSID"); + else + aprs_interval_value.setToolTipText("Hardware doesn't support APRS"); + } + void set_flight_log_max_tool_tip() { if (flight_log_max_value.isEnabled()) flight_log_max_value.setToolTipText("Size reserved for each flight log (in kB)"); @@ -341,6 +356,33 @@ public class TeleGPSConfigUI set_aprs_interval_tool_tip(); row++; + /* APRS SSID */ + c = new GridBagConstraints(); + c.gridx = 0; c.gridy = row; + c.gridwidth = 4; + c.fill = GridBagConstraints.NONE; + c.anchor = GridBagConstraints.LINE_START; + c.insets = il; + c.ipady = 5; + aprs_ssid_label = new JLabel("APRS SSID:"); + pane.add(aprs_ssid_label, c); + + c = new GridBagConstraints(); + c.gridx = 4; c.gridy = row; + c.gridwidth = 4; + c.fill = GridBagConstraints.HORIZONTAL; + c.weightx = 1; + c.anchor = GridBagConstraints.LINE_START; + c.insets = ir; + c.ipady = 5; + aprs_ssid_value = new JComboBox(aprs_ssid_values); + aprs_ssid_value.setEditable(false); + aprs_ssid_value.addItemListener(this); + aprs_ssid_value.setMaximumRowCount(aprs_ssid_values.length); + pane.add(aprs_ssid_value, c); + set_aprs_ssid_tool_tip(); + row++; + /* Callsign */ c = new GridBagConstraints(); c.gridx = 0; c.gridy = row; @@ -786,4 +828,15 @@ public class TeleGPSConfigUI return 0; return parse_int("aprs interval", s, false); } + + public void set_aprs_ssid(int new_aprs_ssid) { + aprs_ssid_value.setSelectedItem(Math.max(0,new_aprs_ssid)); + aprs_ssid_value.setVisible(new_aprs_ssid >= 0); + set_aprs_ssid_tool_tip(); + } + + public int aprs_ssid() throws AltosConfigDataException { + Integer i = (Integer) aprs_ssid_value.getSelectedItem(); + return i; + } } -- cgit v1.2.3 From fc3364de2b6cdfff53f5c38b3ae52ae5601ff3b7 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 22 Jun 2014 21:12:37 -0700 Subject: ao-tools: Add ao-test-baro, ao-test-igniter and ao-test-flash C versions of the test programs used to validate hardware prior to ship Signed-off-by: Keith Packard --- ao-tools/Makefile.am | 3 +- ao-tools/ao-test-baro/.gitignore | 1 + ao-tools/ao-test-baro/Makefile.am | 11 ++ ao-tools/ao-test-baro/ao-test-baro.1 | 56 +++++++ ao-tools/ao-test-baro/ao-test-baro.c | 238 ++++++++++++++++++++++++++++ ao-tools/ao-test-flash/.gitignore | 1 + ao-tools/ao-test-flash/Makefile.am | 11 ++ ao-tools/ao-test-flash/ao-test-flash.1 | 59 +++++++ ao-tools/ao-test-flash/ao-test-flash.c | 245 +++++++++++++++++++++++++++++ ao-tools/ao-test-igniter/.gitignore | 1 + ao-tools/ao-test-igniter/Makefile.am | 11 ++ ao-tools/ao-test-igniter/ao-test-igniter.1 | 59 +++++++ ao-tools/ao-test-igniter/ao-test-igniter.c | 223 ++++++++++++++++++++++++++ configure.ac | 3 + 14 files changed, 921 insertions(+), 1 deletion(-) create mode 100644 ao-tools/ao-test-baro/.gitignore create mode 100644 ao-tools/ao-test-baro/Makefile.am create mode 100644 ao-tools/ao-test-baro/ao-test-baro.1 create mode 100644 ao-tools/ao-test-baro/ao-test-baro.c create mode 100644 ao-tools/ao-test-flash/.gitignore create mode 100644 ao-tools/ao-test-flash/Makefile.am create mode 100644 ao-tools/ao-test-flash/ao-test-flash.1 create mode 100644 ao-tools/ao-test-flash/ao-test-flash.c create mode 100644 ao-tools/ao-test-igniter/.gitignore create mode 100644 ao-tools/ao-test-igniter/Makefile.am create mode 100644 ao-tools/ao-test-igniter/ao-test-igniter.1 create mode 100644 ao-tools/ao-test-igniter/ao-test-igniter.c diff --git a/ao-tools/Makefile.am b/ao-tools/Makefile.am index a42988d6..4526f514 100644 --- a/ao-tools/Makefile.am +++ b/ao-tools/Makefile.am @@ -1,7 +1,8 @@ SUBDIRS=lib ao-rawload ao-dbg ao-bitbang ao-eeprom ao-list \ ao-load ao-telem ao-send-telem ao-sky-flash \ ao-dumpflash ao-edit-telem ao-dump-up ao-elftohex \ - ao-flash ao-usbload + ao-flash ao-usbload ao-test-igniter ao-test-baro \ + ao-test-flash if LIBSTLINK SUBDIRS += ao-stmload endif diff --git a/ao-tools/ao-test-baro/.gitignore b/ao-tools/ao-test-baro/.gitignore new file mode 100644 index 00000000..f5fb64d4 --- /dev/null +++ b/ao-tools/ao-test-baro/.gitignore @@ -0,0 +1 @@ +ao-test-baro diff --git a/ao-tools/ao-test-baro/Makefile.am b/ao-tools/ao-test-baro/Makefile.am new file mode 100644 index 00000000..69e47529 --- /dev/null +++ b/ao-tools/ao-test-baro/Makefile.am @@ -0,0 +1,11 @@ +bin_PROGRAMS=ao-test-baro + +AM_CFLAGS=-I$(top_srcdir)/ao-tools/lib $(LIBUSB_CFLAGS) + +ao_test_baro_DEPENDENCIES = $(top_builddir)/ao-tools/lib/libao-tools.a + +ao_test_baro_LDADD=$(top_builddir)/ao-tools/lib/libao-tools.a $(LIBUSB_LIBS) + +ao_test_baro_SOURCES=ao-test-baro.c + +man_MANS = ao-test-baro.1 diff --git a/ao-tools/ao-test-baro/ao-test-baro.1 b/ao-tools/ao-test-baro/ao-test-baro.1 new file mode 100644 index 00000000..0004dba8 --- /dev/null +++ b/ao-tools/ao-test-baro/ao-test-baro.1 @@ -0,0 +1,56 @@ +.\" +.\" Copyright © 2009 Keith Packard +.\" +.\" This program is free software; you can redistribute it and/or modify +.\" it under the terms of the GNU General Public License as published by +.\" the Free Software Foundation; either version 2 of the License, or +.\" (at your option) any later version. +.\" +.\" This program is distributed in the hope that it will be useful, but +.\" WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +.\" General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public License along +.\" with this program; if not, write to the Free Software Foundation, Inc., +.\" 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. +.\" +.\" +.TH AO-LOAD 1 "ao-test-baro" "" +.SH NAME +ao-test-baro \- test AltOS flight computer barometric sensor +.SH SYNOPSIS +.B "ao-test-baro" +[\-T \fItty-device\fP] +[\--tty \fItty-device\fP] +[\-D \fIaltos-device\fP] +[\--device \fIaltos-device\fP] +\fIbaro-name...\fP +.SH DESCRIPTION +.I ao-test-baro +makes sure the altitude is between -50m and 3000m and temperature is +between 20°C and 30°C. +.SH OPTIONS +.TP +\-T tty-device | --tty tty-device +This selects which tty device the debugger uses to communicate with +the target device. +.TP +\-D AltOS-device | --device AltOS-device +Search for a connected device. This requires an argument of one of the +following forms: +.IP +TeleMega:2 +.br +TeleMega +.br +2 +.IP +Leaving out the product name will cause the tool to select a suitable +product, leaving out the serial number will cause the tool to match +one of the available devices. +.SH USAGE +.I ao-test-baro +opens the target device and queries the current barometric data. +.SH AUTHOR +Keith Packard diff --git a/ao-tools/ao-test-baro/ao-test-baro.c b/ao-tools/ao-test-baro/ao-test-baro.c new file mode 100644 index 00000000..e883de4a --- /dev/null +++ b/ao-tools/ao-test-baro/ao-test-baro.c @@ -0,0 +1,238 @@ +/* + * Copyright © 2014 Keith Packard + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "ao-elf.h" +#include "ccdbg.h" +#include "cc-usb.h" +#include "cc.h" +#include "ao-verbose.h" + +static const struct option options[] = { + { .name = "tty", .has_arg = 1, .val = 'T' }, + { .name = "device", .has_arg = 1, .val = 'D' }, + { .name = "raw", .has_arg = 0, .val = 'r' }, + { .name = "verbose", .has_arg = 1, .val = 'v' }, + { 0, 0, 0, 0}, +}; + +static void usage(char *program) +{ + fprintf(stderr, "usage: %s [--verbose=] [--device=] [-tty=] main|drogue\n", program); + exit(1); +} + +void +done(struct cc_usb *cc, int code) +{ +/* cc_usb_printf(cc, "a\n"); */ + cc_usb_close(cc); + exit (code); +} + +static int +ends_with(char *whole, char *suffix) +{ + int whole_len = strlen(whole); + int suffix_len = strlen(suffix); + + if (suffix_len > whole_len) + return 0; + return strcmp(whole + whole_len - suffix_len, suffix) == 0; +} + +static int +starts_with(char *whole, char *prefix) +{ + int whole_len = strlen(whole); + int prefix_len = strlen(prefix); + + if (prefix_len > whole_len) + return 0; + return strncmp(whole, prefix, prefix_len) == 0; +} + +static char ** +tok(char *line) { + char **strs = malloc (sizeof (char *)), *str; + int n = 0; + + while ((str = strtok(line, " \t"))) { + line = NULL; + strs = realloc(strs, (n + 2) * sizeof (char *)); + strs[n] = strdup(str); + n++; + } + strs[n] = '\0'; + return strs; +} + +static void +free_strs(char **strs) { + char *str; + int i; + + for (i = 0; (str = strs[i]) != NULL; i++) + free(str); + free(strs); +} + +struct baro { + struct baro *next; + char **strs; +}; + +static struct baro * +baro(struct cc_usb *usb) +{ + struct baro *head = NULL, **tail = &head; + cc_usb_printf(usb, "B\n"); + for (;;) { + char line[512]; + struct baro *b; + + cc_usb_getline(usb, line, sizeof (line)); + b = malloc (sizeof (struct baro)); + b->strs = tok(line); + b->next = NULL; + *tail = b; + tail = &b->next; + if (strstr(line, "Altitude:")) + break; + } + return head; +} + +static void +free_baro(struct baro *b) { + struct baro *n; + + while (b) { + n = b->next; + free_strs(b->strs); + free(b); + b = n; + } +} + +char ** +find_baro(struct baro *b, char *word0) { + int i; + for (;b; b = b->next) + if (b->strs[0] && !strcmp(b->strs[0], word0)) + return b->strs; + return NULL; +} + +int +do_baro(struct cc_usb *usb) { + struct baro *b = baro(usb); + char **temp = find_baro(b, "Temperature:"); + char **alt = find_baro(b, "Altitude:"); + + if (!temp || !alt) { + printf("no response\n"); + free_baro(b); + return 0; + } + + double temperature = strtod(temp[2], NULL) / 100.0; + double altitude = strtod(alt[1], NULL); + + if (altitude < -50 || 3000 < altitude) { + printf ("weird altitude %f\n", altitude); + free_baro(b); + return 0; + } + + if (temperature < 20 || 35 < temperature) { + printf ("weird temperature %f\n", temperature); + free_baro(b); + return 0; + } + + printf ("altitude %f temperature %f\n", altitude, temperature); + + return 1; +} + +int +main (int argc, char **argv) +{ + char *device = NULL; + char *filename; + Elf *e; + unsigned int s; + int i; + int c; + int tries; + struct cc_usb *cc = NULL; + char *tty = NULL; + int success; + int verbose = 0; + int ret = 0; + + while ((c = getopt_long(argc, argv, "rT:D:c:s:v:", options, NULL)) != -1) { + switch (c) { + case 'T': + tty = optarg; + break; + case 'D': + device = optarg; + break; + case 'v': + verbose++; + break; + default: + usage(argv[0]); + break; + } + } + + ao_verbose = verbose; + + if (verbose > 1) + ccdbg_add_debug(CC_DEBUG_BITBANG); + + if (!tty) + tty = cc_usbdevs_find_by_arg(device, "AltosFlash"); + if (!tty) + tty = cc_usbdevs_find_by_arg(device, "TeleMega"); + if (!tty) + tty = getenv("ALTOS_TTY"); + if (!tty) + tty="/dev/ttyACM0"; + + cc = cc_usb_open(tty); + + if (!cc) + exit(1); + + if (!do_baro(cc)) + ret = 1; + done(cc, ret); +} diff --git a/ao-tools/ao-test-flash/.gitignore b/ao-tools/ao-test-flash/.gitignore new file mode 100644 index 00000000..40ab1ef3 --- /dev/null +++ b/ao-tools/ao-test-flash/.gitignore @@ -0,0 +1 @@ +ao-test-flash diff --git a/ao-tools/ao-test-flash/Makefile.am b/ao-tools/ao-test-flash/Makefile.am new file mode 100644 index 00000000..0323c282 --- /dev/null +++ b/ao-tools/ao-test-flash/Makefile.am @@ -0,0 +1,11 @@ +bin_PROGRAMS=ao-test-flash + +AM_CFLAGS=-I$(top_srcdir)/ao-tools/lib $(LIBUSB_CFLAGS) + +ao_test_flash_DEPENDENCIES = $(top_builddir)/ao-tools/lib/libao-tools.a + +ao_test_flash_LDADD=$(top_builddir)/ao-tools/lib/libao-tools.a $(LIBUSB_LIBS) + +ao_test_flash_SOURCES=ao-test-flash.c + +man_MANS = ao-test-flash.1 diff --git a/ao-tools/ao-test-flash/ao-test-flash.1 b/ao-tools/ao-test-flash/ao-test-flash.1 new file mode 100644 index 00000000..155bd1bf --- /dev/null +++ b/ao-tools/ao-test-flash/ao-test-flash.1 @@ -0,0 +1,59 @@ +.\" +.\" Copyright © 2009 Keith Packard +.\" +.\" This program is free software; you can redistribute it and/or modify +.\" it under the terms of the GNU General Public License as published by +.\" the Free Software Foundation; either version 2 of the License, or +.\" (at your option) any later version. +.\" +.\" This program is distributed in the hope that it will be useful, but +.\" WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +.\" General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public License along +.\" with this program; if not, write to the Free Software Foundation, Inc., +.\" 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. +.\" +.\" +.TH AO-LOAD 1 "ao-test-igniter" "" +.SH NAME +ao-test-igniter \- test AltOS flight computer igniters +.SH SYNOPSIS +.B "ao-test-igniter" +[\-T \fItty-device\fP] +[\--tty \fItty-device\fP] +[\-D \fIaltos-device\fP] +[\--device \fIaltos-device\fP] +\fIigniter-name...\fP +.SH DESCRIPTION +.I ao-test-igniter +test the status and then fires the specified igniters on the target device +.SH OPTIONS +.TP +\-T tty-device | --tty tty-device +This selects which tty device the debugger uses to communicate with +the target device. The special name 'BITBANG' directs ao-dbg to use +the cp2103 connection, otherwise this should be a usb serial port +connected to a suitable cc1111 debug node. +.TP +\-D AltOS-device | --device AltOS-device +Search for a connected device. This requires an argument of one of the +following forms: +.IP +TeleMega:2 +.br +TeleMega +.br +2 +.IP +Leaving out the product name will cause the tool to select a suitable +product, leaving out the serial number will cause the tool to match +one of the available devices. +.SH USAGE +.I ao-test-igniter +opens the target device, lists the available igniter and then fires +the specified ones. And error occurrs if any of the specified igniters +is not present or not ready. +.SH AUTHOR +Keith Packard diff --git a/ao-tools/ao-test-flash/ao-test-flash.c b/ao-tools/ao-test-flash/ao-test-flash.c new file mode 100644 index 00000000..cf44ae69 --- /dev/null +++ b/ao-tools/ao-test-flash/ao-test-flash.c @@ -0,0 +1,245 @@ +/* + * Copyright © 2014 Keith Packard + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "ao-elf.h" +#include "ccdbg.h" +#include "cc-usb.h" +#include "cc.h" +#include "ao-verbose.h" + +static const struct option options[] = { + { .name = "tty", .has_arg = 1, .val = 'T' }, + { .name = "device", .has_arg = 1, .val = 'D' }, + { .name = "raw", .has_arg = 0, .val = 'r' }, + { .name = "verbose", .has_arg = 1, .val = 'v' }, + { 0, 0, 0, 0}, +}; + +static void usage(char *program) +{ + fprintf(stderr, "usage: %s [--verbose=] [--device=] [-tty=] \n", program); + exit(1); +} + +void +done(struct cc_usb *cc, int code) +{ + cc_usb_close(cc); + exit (code); +} + +static int +ends_with(char *whole, char *suffix) +{ + int whole_len = strlen(whole); + int suffix_len = strlen(suffix); + + if (suffix_len > whole_len) + return 0; + return strcmp(whole + whole_len - suffix_len, suffix) == 0; +} + +static int +starts_with(char *whole, char *prefix) +{ + int whole_len = strlen(whole); + int prefix_len = strlen(prefix); + + if (prefix_len > whole_len) + return 0; + return strncmp(whole, prefix, prefix_len) == 0; +} + +static char ** +tok(char *line) { + char **strs = malloc (sizeof (char *)), *str; + int n = 0; + + while ((str = strtok(line, " \t"))) { + line = NULL; + strs = realloc(strs, (n + 2) * sizeof (char *)); + strs[n] = strdup(str); + n++; + } + strs[n] = '\0'; + return strs; +} + +static void +free_strs(char **strs) { + char *str; + int i; + + for (i = 0; (str = strs[i]) != NULL; i++) + free(str); + free(strs); +} + +struct flash { + struct flash *next; + char line[512]; + char **strs; +}; + +static struct flash * +flash(struct cc_usb *usb) +{ + struct flash *head = NULL, **tail = &head; + cc_usb_printf(usb, "f\nv\n"); + for (;;) { + char line[512]; + struct flash *b; + + cc_usb_getline(usb, line, sizeof (line)); + b = malloc (sizeof (struct flash)); + strcpy(b->line, line); + b->strs = tok(line); + b->next = NULL; + *tail = b; + tail = &b->next; + if (strstr(line, "software-version")) + break; + } + return head; +} + +static void +free_flash(struct flash *b) { + struct flash *n; + + while (b) { + n = b->next; + free_strs(b->strs); + free(b); + b = n; + } +} + +char ** +find_flash(struct flash *b, char *word0) { + int i; + for (;b; b = b->next) { + if (strstr(b->line, word0)) + return b->strs; + } + return NULL; +} + +int +do_flash(struct cc_usb *usb, int expected_size) { + struct flash *b = flash(usb); + char **size = find_flash(b, "Storage size:"); + char **erase = find_flash(b, "Storage erase unit:"); + + if (!size || !erase) { + printf("no response\n"); + free_flash(b); + return 0; + } + + int actual_size = atoi(size[2]); + + if (actual_size != expected_size) { + printf ("weird flash size %d != %d\n", actual_size, expected_size); + free_flash(b); + return 0; + } + + int actual_erase = atoi(erase[3]); + + if (actual_erase != 65536) { + printf ("weird erase size %d\n", actual_erase); + free_flash(b); + return 0; + } + + printf ("flash size %d erase block %d\n", actual_size, actual_erase); + + return 1; +} + +int +main (int argc, char **argv) +{ + char *device = NULL; + char *filename; + Elf *e; + unsigned int s; + int i; + int c; + int tries; + struct cc_usb *cc = NULL; + char *tty = NULL; + int success; + int verbose = 0; + int ret = 0; + int expected_size; + + while ((c = getopt_long(argc, argv, "rT:D:c:s:v:", options, NULL)) != -1) { + switch (c) { + case 'T': + tty = optarg; + break; + case 'D': + device = optarg; + break; + case 'v': + verbose++; + break; + default: + usage(argv[0]); + break; + } + } + + if (!argv[optind]) + usage(argv[0]); + + ao_verbose = verbose; + + if (verbose > 1) + ccdbg_add_debug(CC_DEBUG_BITBANG); + + if (!tty) + tty = cc_usbdevs_find_by_arg(device, "AltosFlash"); + if (!tty) + tty = cc_usbdevs_find_by_arg(device, "TeleMega"); + if (!tty) + tty = getenv("ALTOS_TTY"); + if (!tty) + tty="/dev/ttyACM0"; + + cc = cc_usb_open(tty); + + if (!cc) + exit(1); + + if (!do_flash(cc, atoi(argv[optind]))) + ret = 1; + done(cc, ret); +} diff --git a/ao-tools/ao-test-igniter/.gitignore b/ao-tools/ao-test-igniter/.gitignore new file mode 100644 index 00000000..deee445f --- /dev/null +++ b/ao-tools/ao-test-igniter/.gitignore @@ -0,0 +1 @@ +ao-test-igniter diff --git a/ao-tools/ao-test-igniter/Makefile.am b/ao-tools/ao-test-igniter/Makefile.am new file mode 100644 index 00000000..e24ed469 --- /dev/null +++ b/ao-tools/ao-test-igniter/Makefile.am @@ -0,0 +1,11 @@ +bin_PROGRAMS=ao-test-igniter + +AM_CFLAGS=-I$(top_srcdir)/ao-tools/lib $(LIBUSB_CFLAGS) + +ao_test_igniter_DEPENDENCIES = $(top_builddir)/ao-tools/lib/libao-tools.a + +ao_test_igniter_LDADD=$(top_builddir)/ao-tools/lib/libao-tools.a $(LIBUSB_LIBS) + +ao_test_igniter_SOURCES=ao-test-igniter.c + +man_MANS = ao-test-igniter.1 diff --git a/ao-tools/ao-test-igniter/ao-test-igniter.1 b/ao-tools/ao-test-igniter/ao-test-igniter.1 new file mode 100644 index 00000000..155bd1bf --- /dev/null +++ b/ao-tools/ao-test-igniter/ao-test-igniter.1 @@ -0,0 +1,59 @@ +.\" +.\" Copyright © 2009 Keith Packard +.\" +.\" This program is free software; you can redistribute it and/or modify +.\" it under the terms of the GNU General Public License as published by +.\" the Free Software Foundation; either version 2 of the License, or +.\" (at your option) any later version. +.\" +.\" This program is distributed in the hope that it will be useful, but +.\" WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +.\" General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public License along +.\" with this program; if not, write to the Free Software Foundation, Inc., +.\" 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. +.\" +.\" +.TH AO-LOAD 1 "ao-test-igniter" "" +.SH NAME +ao-test-igniter \- test AltOS flight computer igniters +.SH SYNOPSIS +.B "ao-test-igniter" +[\-T \fItty-device\fP] +[\--tty \fItty-device\fP] +[\-D \fIaltos-device\fP] +[\--device \fIaltos-device\fP] +\fIigniter-name...\fP +.SH DESCRIPTION +.I ao-test-igniter +test the status and then fires the specified igniters on the target device +.SH OPTIONS +.TP +\-T tty-device | --tty tty-device +This selects which tty device the debugger uses to communicate with +the target device. The special name 'BITBANG' directs ao-dbg to use +the cp2103 connection, otherwise this should be a usb serial port +connected to a suitable cc1111 debug node. +.TP +\-D AltOS-device | --device AltOS-device +Search for a connected device. This requires an argument of one of the +following forms: +.IP +TeleMega:2 +.br +TeleMega +.br +2 +.IP +Leaving out the product name will cause the tool to select a suitable +product, leaving out the serial number will cause the tool to match +one of the available devices. +.SH USAGE +.I ao-test-igniter +opens the target device, lists the available igniter and then fires +the specified ones. And error occurrs if any of the specified igniters +is not present or not ready. +.SH AUTHOR +Keith Packard diff --git a/ao-tools/ao-test-igniter/ao-test-igniter.c b/ao-tools/ao-test-igniter/ao-test-igniter.c new file mode 100644 index 00000000..6a699fe8 --- /dev/null +++ b/ao-tools/ao-test-igniter/ao-test-igniter.c @@ -0,0 +1,223 @@ +/* + * Copyright © 2014 Keith Packard + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "ao-elf.h" +#include "ccdbg.h" +#include "cc-usb.h" +#include "cc.h" +#include "ao-verbose.h" + +static const struct option options[] = { + { .name = "tty", .has_arg = 1, .val = 'T' }, + { .name = "device", .has_arg = 1, .val = 'D' }, + { .name = "raw", .has_arg = 0, .val = 'r' }, + { .name = "verbose", .has_arg = 1, .val = 'v' }, + { 0, 0, 0, 0}, +}; + +static void usage(char *program) +{ + fprintf(stderr, "usage: %s [--verbose=] [--device=] [-tty=] main|drogue\n", program); + exit(1); +} + +void +done(struct cc_usb *cc, int code) +{ +/* cc_usb_printf(cc, "a\n"); */ + cc_usb_close(cc); + exit (code); +} + +static int +ends_with(char *whole, char *suffix) +{ + int whole_len = strlen(whole); + int suffix_len = strlen(suffix); + + if (suffix_len > whole_len) + return 0; + return strcmp(whole + whole_len - suffix_len, suffix) == 0; +} + +static int +starts_with(char *whole, char *prefix) +{ + int whole_len = strlen(whole); + int prefix_len = strlen(prefix); + + if (prefix_len > whole_len) + return 0; + return strncmp(whole, prefix, prefix_len) == 0; +} + +struct igniter { + struct igniter *next; + char name[512]; + char status[512]; +}; + +static struct igniter * +igniters(struct cc_usb *usb) +{ + struct igniter *head = NULL, **tail = &head; + cc_usb_printf(usb, "t\nv\n"); + for (;;) { + char line[512]; + char name[512]; + char status[512]; + + cc_usb_getline(usb, line, sizeof (line)); + if (strstr(line, "software-version")) + break; + if (sscanf(line, "Igniter: %s Status: %s", &name, &status) == 2) { + struct igniter *i = malloc (sizeof (struct igniter)); + strcpy(i->name, name); + strcpy(i->status, status); + i->next = NULL; + *tail = i; + tail = &i->next; + } + } + return head; +} + +static void +free_igniters(struct igniter *i) { + struct igniter *n; + + while (i) { + n = i->next; + free(i); + i = n; + } +} + +static struct igniter * +find_igniter(struct igniter *i, char *name) +{ + for (; i; i = i->next) + if (strcmp(i->name, name) == 0) + return i; +} + +static int +do_igniter(struct cc_usb *usb, char *name) +{ + struct igniter *all = igniters(usb); + struct igniter *this = find_igniter(all, name); + if (!this) { + struct igniter *i; + printf("no igniter %s found in"); + for (i = all; i; i = i->next) + printf(" %s", i->name); + printf("\n"); + free_igniters(all); + return 0; + } + if (strcmp(this->status, "ready") != 0) { + printf("igniter %s status is %s\n", this->name, this->status); + free_igniters(all); + return 0; + } + cc_usb_printf(usb, "i DoIt %s\n", this->name); + cc_usb_sync(usb); + free_igniters(all); + usleep(200000); + return 1; +} + +int +main (int argc, char **argv) +{ + char *device = NULL; + char *filename; + Elf *e; + unsigned int s; + int i; + int c; + int tries; + struct cc_usb *cc = NULL; + char *tty = NULL; + int success; + int verbose = 0; + int ret = 0; + + while ((c = getopt_long(argc, argv, "rT:D:c:s:v:", options, NULL)) != -1) { + switch (c) { + case 'T': + tty = optarg; + break; + case 'D': + device = optarg; + break; + case 'v': + verbose++; + break; + default: + usage(argv[0]); + break; + } + } + + ao_verbose = verbose; + + if (verbose > 1) + ccdbg_add_debug(CC_DEBUG_BITBANG); + + printf ("device %s\n", device); + if (!tty) + tty = cc_usbdevs_find_by_arg(device, "TeleMega-v1.0"); + if (!tty) + tty = cc_usbdevs_find_by_arg(device, "TeleMetrum-v2.0"); + if (!tty) + tty = cc_usbdevs_find_by_arg(device, "TeleMini-v2.0"); + if (!tty) + tty = cc_usbdevs_find_by_arg(device, "EasyMega-v1.0"); + if (!tty) + tty = cc_usbdevs_find_by_arg(device, "EasyMetrum-v1.0"); + if (!tty) + tty = cc_usbdevs_find_by_arg(device, "EasyMini-v1.0"); + if (!tty) + tty = getenv("ALTOS_TTY"); + if (!tty) + tty="/dev/ttyACM0"; + + cc = cc_usb_open(tty); + + if (!cc) + exit(1); + + for (i = optind; i < argc; i++) { + char *name = argv[i]; + + if (!do_igniter(cc, name)) + ret++; + } + done(cc, ret); +} diff --git a/configure.ac b/configure.ac index 467a5286..650abcc2 100644 --- a/configure.ac +++ b/configure.ac @@ -534,6 +534,9 @@ ao-tools/ao-dump-up/Makefile ao-tools/ao-elftohex/Makefile ao-tools/ao-usbload/Makefile ao-tools/ao-flash/Makefile +ao-tools/ao-test-igniter/Makefile +ao-tools/ao-test-baro/Makefile +ao-tools/ao-test-flash/Makefile ao-utils/Makefile src/Version ]) -- cgit v1.2.3 From 0a19073649570016db28d5e2a4a225273732adb5 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 22 Jun 2014 21:13:54 -0700 Subject: ao-bringup: Use the C tools to test EasyMini I think my USB driver in the kernel is broken; the nickle versions of these tools did very strange things and never worked. Signed-off-by: Keith Packard --- ao-bringup/test-easymini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ao-bringup/test-easymini b/ao-bringup/test-easymini index 29139385..17e00955 100755 --- a/ao-bringup/test-easymini +++ b/ao-bringup/test-easymini @@ -19,7 +19,7 @@ ao-list | while read product serial dev; do echo "Testing $product $serial $dev" echo "Testing igniters. Both should flash" - ./test-igniter "$dev" drogue main + ../ao-tools/ao-test-igniter/ao-test-igniter --tty="$dev" drogue main case $? in 0) @@ -30,7 +30,7 @@ ao-list | while read product serial dev; do esac echo "Testing baro sensor" - ./test-baro "$dev" + ../ao-tools/ao-test-baro/ao-test-baro --tty="$dev" case $? in 0) @@ -43,7 +43,7 @@ ao-list | while read product serial dev; do FLASHSIZE=1048576 echo "Testing flash" - ./test-flash "$dev" "$FLASHSIZE" + ../ao-tools/ao-test-flash/ao-test-flash --tty="$dev" "$FLASHSIZE" case $? in 0) -- cgit v1.2.3 From 443bbb09468df7c1a10f2c76996c92380d8b8c23 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 24 Jun 2014 15:56:11 -0700 Subject: altos: Add optional debugging to print out pyro firing status This dumps pyro check failures for ao_flight_test so you can see why pyro charges aren't firing. Signed-off-by: Keith Packard --- src/kernel/ao_pyro.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/src/kernel/ao_pyro.c b/src/kernel/ao_pyro.c index 85d88d98..0b286466 100644 --- a/src/kernel/ao_pyro.c +++ b/src/kernel/ao_pyro.c @@ -69,6 +69,16 @@ ao_pyro_print_status(void) uint16_t ao_pyro_fired; +#ifndef PYRO_DBG +#define PYRO_DBG 0 +#endif + +#if PYRO_DBG +#define DBG(...) do { printf("\t%d: ", (int) (pyro - ao_config.pyro)); printf(__VA_ARGS__); } while (0) +#else +#define DBG(...) +#endif + /* * Given a pyro structure, figure out * if the current flight state satisfies all @@ -88,63 +98,73 @@ ao_pyro_ready(struct ao_pyro *pyro) case ao_pyro_accel_less: if (ao_accel <= pyro->accel_less) continue; + DBG("accel %d > %d\n", ao_accel, pyro->accel_less); break; case ao_pyro_accel_greater: if (ao_accel >= pyro->accel_greater) continue; + DBG("accel %d < %d\n", ao_accel, pyro->accel_greater); break; - - case ao_pyro_speed_less: if (ao_speed <= pyro->speed_less) continue; + DBG("speed %d > %d\n", ao_speed, pyro->speed_less); break; case ao_pyro_speed_greater: if (ao_speed >= pyro->speed_greater) continue; + DBG("speed %d < %d\n", ao_speed, pyro->speed_greater); break; - case ao_pyro_height_less: if (ao_height <= pyro->height_less) continue; + DBG("height %d > %d\n", ao_height, pyro->height_less); break; case ao_pyro_height_greater: if (ao_height >= pyro->height_greater) continue; + DBG("height %d < %d\n", ao_height, pyro->height_greater); break; #if HAS_GYRO case ao_pyro_orient_less: if (ao_sample_orient <= pyro->orient_less) continue; + DBG("orient %d > %d\n", ao_sample_orient, pyro->orient_less); break; case ao_pyro_orient_greater: if (ao_sample_orient >= pyro->orient_greater) continue; + DBG("orient %d < %d\n", ao_sample_orient, pyro->orient_greater); break; #endif case ao_pyro_time_less: if ((int16_t) (ao_time() - ao_boost_tick) <= pyro->time_less) continue; + DBG("time %d > %d\n", (int16_t)(ao_time() - ao_boost_tick), pyro->time_less); break; case ao_pyro_time_greater: if ((int16_t) (ao_time() - ao_boost_tick) >= pyro->time_greater) continue; + DBG("time %d < %d\n", (int16_t)(ao_time() - ao_boost_tick), pyro->time_greater); break; case ao_pyro_ascending: if (ao_speed > 0) continue; + DBG("not ascending speed %d\n", ao_speed); break; case ao_pyro_descending: if (ao_speed < 0) continue; + DBG("not descending speed %d\n", ao_speed); break; case ao_pyro_after_motor: if (ao_motor_number == pyro->motor) continue; + DBG("motor %d != %d\n", ao_motor_number, pyro->motor); break; case ao_pyro_delay: @@ -154,10 +174,12 @@ ao_pyro_ready(struct ao_pyro *pyro) case ao_pyro_state_less: if (ao_flight_state < pyro->state_less) continue; + DBG("state %d >= %d\n", ao_flight_state, pyro->state_less); break; case ao_pyro_state_greater_or_equal: if (ao_flight_state >= pyro->state_greater_or_equal) continue; + DBG("state %d >= %d\n", ao_flight_state, pyro->state_less); break; default: -- cgit v1.2.3 From 309d91d25099bebda21e165165efa9ce86cb0a47 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 24 Jun 2014 15:57:13 -0700 Subject: altos/ao_flight_test: Get the Tmega version compiling again A few changes broke this recently. Signed-off-by: Keith Packard --- src/test/ao_flight_test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/ao_flight_test.c b/src/test/ao_flight_test.c index 0647fc6c..1ab22e5b 100644 --- a/src/test/ao_flight_test.c +++ b/src/test/ao_flight_test.c @@ -50,6 +50,7 @@ int ao_gps_new; #define HAS_MMA655X 1 #define HAS_HMC5883 1 #define HAS_BEEP 1 +#define AO_CONFIG_MAX_SIZE 1024 struct ao_adc { int16_t sense[AO_ADC_NUM_SENSE]; @@ -795,6 +796,7 @@ ao_sleep(void *wchan) pyro->flags |= ao_pyro_values[j].flag; if (ao_pyro_values[j].offset != NO_VALUE && i + 1 < nword) { int16_t val = strtoul(words[++i], NULL, 10); + printf("pyro %d condition %s value %d\n", p, words[i-1], val); *((int16_t *) ((char *) pyro + ao_pyro_values[j].offset)) = val; } } -- cgit v1.2.3 From 97269bb90c1602a1f8c54fc7b6c34383a0370621 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 24 Jun 2014 15:58:35 -0700 Subject: Bump version to 1.4.1.1 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 650abcc2..89994ccb 100644 --- a/configure.ac +++ b/configure.ac @@ -18,7 +18,7 @@ dnl dnl Process this file with autoconf to create configure. AC_PREREQ(2.57) -AC_INIT([altos], 1.4.0.1) +AC_INIT([altos], 1.4.1.1) AC_CONFIG_SRCDIR([src/kernel/ao.h]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE -- cgit v1.2.3 From ade2cc9abb8ca403a9ae5d1f9c145ab72ce94919 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 24 Jun 2014 18:24:02 -0700 Subject: altosuilib: Make map cache size configurable Systems with sufficient memory can get smoother map scrolling by making the cache larger. Would be nice to do this automatically? Signed-off-by: Keith Packard --- altosuilib/AltosUIConfigure.java | 26 +++++++++++++++++++ altosuilib/AltosUIMapCache.java | 45 +++++++++++++++++++++++++++------ altosuilib/AltosUIMapCacheListener.java | 22 ++++++++++++++++ altosuilib/AltosUIMapView.java | 2 +- altosuilib/AltosUIPreferences.java | 38 ++++++++++++++++++++++++++++ altosuilib/Makefile.am | 1 + 6 files changed, 125 insertions(+), 9 deletions(-) create mode 100644 altosuilib/AltosUIMapCacheListener.java diff --git a/altosuilib/AltosUIConfigure.java b/altosuilib/AltosUIConfigure.java index 9d54cfe5..5ab615e8 100644 --- a/altosuilib/AltosUIConfigure.java +++ b/altosuilib/AltosUIConfigure.java @@ -223,6 +223,31 @@ public class AltosUIConfigure row++; } + static final Integer map_caches[] = { 9, 25, 100 }; + + public void add_map_cache() { + pane.add(new JLabel("Map Cache Size"), constraints(0, 1)); + + final JComboBox map_cache = new JComboBox(map_caches); + + map_cache.setEditable(true); + map_cache.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + try { + int size = (Integer) (map_cache.getSelectedItem()); + + AltosUIPreferences.set_map_cache(size); + } catch (ClassCastException ce) { + map_cache.setSelectedItem(new Integer(AltosUIPreferences.map_cache())); + } + } + }); + + map_cache.setSelectedItem (new Integer(AltosUIPreferences.map_cache())); + pane.add(map_cache, constraints(1, 2, GridBagConstraints.BOTH)); + row++; + } + public void add_bluetooth() { } @@ -255,6 +280,7 @@ public class AltosUIConfigure add_font_size(); add_look_and_feel(); add_position(); + add_map_cache(); add_bluetooth(); add_frequencies(); diff --git a/altosuilib/AltosUIMapCache.java b/altosuilib/AltosUIMapCache.java index 3f1512df..9cc32e24 100644 --- a/altosuilib/AltosUIMapCache.java +++ b/altosuilib/AltosUIMapCache.java @@ -24,33 +24,36 @@ import java.awt.*; import java.io.*; import java.net.*; -public class AltosUIMapCache { +public class AltosUIMapCache implements AltosUIMapCacheListener { static final int success = 0; static final int loading = 1; static final int failed = 2; static final int bad_request = 3; static final int forbidden = 4; - static final int min_cache_size = 9; - static final int max_cache_size = 24; + int min_cache_size; /* configured minimum cache size */ + int cache_size; /* current cache size */ + int requested_cache_size; /* cache size computed by application */ private Object fetch_lock = new Object(); private Object cache_lock = new Object(); - int cache_size = min_cache_size; - AltosUIMapImage[] images = new AltosUIMapImage[cache_size]; long used; public void set_cache_size(int new_size) { + + requested_cache_size = new_size; + if (new_size < min_cache_size) new_size = min_cache_size; - if (new_size > max_cache_size) - new_size = max_cache_size; + if (new_size == cache_size) return; + System.out.printf("cache size now %d\n", new_size); + synchronized(cache_lock) { AltosUIMapImage[] new_images = new AltosUIMapImage[new_size]; @@ -91,8 +94,12 @@ public class AltosUIMapCache { try { image = new AltosUIMapImage(tile, store); image.used = used++; - if (images[oldest] != null) + if (images[oldest] != null) { + System.out.printf("drop %s\n", images[oldest].store.file.toString()); images[oldest].flush(); + } + + System.out.printf("load %s\n", store.file.toString()); images[oldest] = image; @@ -109,6 +116,28 @@ public class AltosUIMapCache { } } + public void map_cache_changed(int map_cache) { + min_cache_size = map_cache; + + set_cache_size(requested_cache_size); + } + + public void dispose() { + AltosUIPreferences.unregister_map_cache_listener(this); + + for (int i = 0; i < cache_size; i++) { + AltosUIMapImage image = images[i]; + + if (image != null) + image.flush(); + } + } + public AltosUIMapCache() { + min_cache_size = AltosUIPreferences.map_cache(); + + set_cache_size(0); + + AltosUIPreferences.register_map_cache_listener(this); } } diff --git a/altosuilib/AltosUIMapCacheListener.java b/altosuilib/AltosUIMapCacheListener.java new file mode 100644 index 00000000..680d123e --- /dev/null +++ b/altosuilib/AltosUIMapCacheListener.java @@ -0,0 +1,22 @@ +/* + * Copyright © 2014 Keith Packard + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ + +package org.altusmetrum.altosuilib_3; + +public interface AltosUIMapCacheListener { + public void map_cache_changed(int map_cache); +} diff --git a/altosuilib/AltosUIMapView.java b/altosuilib/AltosUIMapView.java index 1abd1731..34a85f52 100644 --- a/altosuilib/AltosUIMapView.java +++ b/altosuilib/AltosUIMapView.java @@ -370,7 +370,7 @@ public class AltosUIMapView extends Component implements MouseMotionListener, Mo for (Point point : to_remove) tiles.remove(point); - cache.set_cache_size(((lower_right.y - upper_left.y) / px_size + 1) * ((lower_right.x - upper_left.x) / px_size + 1)); + cache.set_cache_size((getWidth() / px_size + 2) * (getHeight() / px_size + 2)); for (int y = upper_left.y; y <= lower_right.y; y += px_size) { for (int x = upper_left.x; x <= lower_right.x; x += px_size) { Point point = new Point(x, y); diff --git a/altosuilib/AltosUIPreferences.java b/altosuilib/AltosUIPreferences.java index 509faaff..ecab20d4 100644 --- a/altosuilib/AltosUIPreferences.java +++ b/altosuilib/AltosUIPreferences.java @@ -34,6 +34,9 @@ public class AltosUIPreferences extends AltosPreferences { /* Window position preference name */ final static String positionPreference = "POSITION"; + /* Maps cache size preference name */ + final static String mapCachePreference = "MAP-CACHE"; + /* UI Component to pop dialogs up */ static Component component; @@ -52,6 +55,10 @@ public class AltosUIPreferences extends AltosPreferences { public static int position = AltosUILib.position_top_left; + static LinkedList map_cache_listeners; + + public static int map_cache = 9; + public static void init() { AltosPreferences.init(new AltosUIPreferencesBackend()); @@ -68,6 +75,9 @@ public class AltosUIPreferences extends AltosPreferences { position = backend.getInt(positionPreference, AltosUILib.position_top_left); position_listeners = new LinkedList(); + + map_cache = backend.getInt(mapCachePreference, 9); + map_cache_listeners = new LinkedList(); } static { init(); } @@ -215,4 +225,32 @@ public class AltosUIPreferences extends AltosPreferences { return position; } } + + public static void register_map_cache_listener(AltosUIMapCacheListener l) { + synchronized(backend) { + map_cache_listeners.add(l); + } + } + + public static void unregister_map_cache_listener(AltosUIMapCacheListener l) { + synchronized (backend) { + map_cache_listeners.remove(l); + } + } + + public static void set_map_cache(int new_map_cache) { + synchronized(backend) { + map_cache = new_map_cache; + backend.putInt(mapCachePreference, map_cache); + flush_preferences(); + for (AltosUIMapCacheListener l: map_cache_listeners) + l.map_cache_changed(map_cache); + } + } + + public static int map_cache() { + synchronized(backend) { + return map_cache; + } + } } diff --git a/altosuilib/Makefile.am b/altosuilib/Makefile.am index bbee6a45..56b01ec5 100644 --- a/altosuilib/Makefile.am +++ b/altosuilib/Makefile.am @@ -68,6 +68,7 @@ altosuilib_JAVA = \ AltosUIMapPath.java \ AltosUIMapTile.java \ AltosUIMapCache.java \ + AltosUIMapCacheListener.java \ AltosUIMapImage.java \ AltosUIMapTransform.java \ AltosUIMapRectangle.java \ -- cgit v1.2.3 From dbff6dd42f8b6fb90c8d3f07bde48a6be0bfddf0 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 24 Jun 2014 18:25:31 -0700 Subject: altosuilib: Outline map lines and distance value with white This makes the value and line visible on dark backgrounds Signed-off-by: Keith Packard --- altosuilib/AltosUIMapLine.java | 19 ++++++++++++++++--- altosuilib/AltosUIMapView.java | 2 +- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/altosuilib/AltosUIMapLine.java b/altosuilib/AltosUIMapLine.java index 86d2e6e2..32437d4e 100644 --- a/altosuilib/AltosUIMapLine.java +++ b/altosuilib/AltosUIMapLine.java @@ -31,6 +31,7 @@ public class AltosUIMapLine { AltosUILatLon start, end; private Font font = null; + static public int stroke_width = 6; public void set_font(Font font) { this.font = font; @@ -87,19 +88,24 @@ public class AltosUIMapLine { } public void paint(Graphics2D g, AltosUIMapTransform t) { - g.setColor(Color.BLUE); if (start == null || end == null) return; + g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); + Line2D.Double line = new Line2D.Double(t.screen(start), t.screen(end)); + g.setColor(Color.WHITE); + g.setStroke(new BasicStroke(stroke_width+4, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND)); + g.draw(line); + + g.setColor(Color.BLUE); + g.setStroke(new BasicStroke(stroke_width, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND)); g.draw(line); String message = line_dist(); - g.setFont(font); - g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); Rectangle2D bounds; bounds = font.getStringBounds(message, g.getFontRenderContext()); @@ -111,6 +117,13 @@ public class AltosUIMapLine { } else { x += 2.0f; } + + g.setFont(font); + g.setColor(Color.WHITE); + for (int dy = -2; dy <= 2; dy += 2) + for (int dx = -2; dx <= 2; dx += 2) + g.drawString(message, x + dx, y + dy); + g.setColor(Color.BLUE); g.drawString(message, x, y); } } diff --git a/altosuilib/AltosUIMapView.java b/altosuilib/AltosUIMapView.java index 34a85f52..70b8e2e9 100644 --- a/altosuilib/AltosUIMapView.java +++ b/altosuilib/AltosUIMapView.java @@ -67,7 +67,7 @@ public class AltosUIMapView extends Component implements MouseMotionListener, Mo AltosUILatLon centre; public void set_font() { - line.set_font(AltosUILib.value_font); + line.set_font(AltosUILib.status_font); for (AltosUIMapTile tile : tiles.values()) tile.set_font(AltosUILib.value_font); repaint(); -- cgit v1.2.3 From 048ce00ea0d1d2744552942559aa1da2431ab954 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 24 Jun 2014 18:26:04 -0700 Subject: icon: Generate altusmetrum.xpm and install it This is for the debian menu, still a required part of a debian package. Signed-off-by: Keith Packard --- icon/Makefile.am | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/icon/Makefile.am b/icon/Makefile.am index 516c547c..bf147ad3 100644 --- a/icon/Makefile.am +++ b/icon/Makefile.am @@ -71,6 +71,10 @@ EEPROM_FILES = $(shell for i in $(RES); do echo $(EEPROM_NAME)-$$i.png; done) TELEM_FILES = $(shell for i in $(RES); do echo $(TELEM_NAME)-$$i.png; done) IN_MPD_FILES = $(shell for i in $(RES); do echo $(MPD_NAME)-$$i.png; done) +# XPM file needed by debian + +AM_XPM = altusmetrum.xpm + ICON_THEME=$(datadir)/icons/hicolor appicondir = $(ICON_THEME)/scalable/apps @@ -84,6 +88,9 @@ mimeicon_DATA = $(MIME_ICONS) mimedir = $(datadir)/mime/packages mime_DATA = org-altusmetrum-mimetypes.xml +pixmapdir = $(datadir)/pixmaps +pixmap_DATA = altusmetrum.xpm + EXTRA_DIST = $(appicon_DATA) $(mimeicon_DATA) $(mime_DATA) windows-stub.c res: @@ -100,12 +107,14 @@ java-telegps: fat: all $(ICO_FILES) $(ICNS_FILES) $(EXE_FILES) -all-local: $(JAVA_FILES) +all-local: $(JAVA_FILES) $(AM_XPM) clean-local: $(RM) $(AM_NAME)-*.png $(TG_NAME)-*.png $(MP_NAME)-*.png + $(RM) altus-metrum-*.png micropeak-*.png telegps-*.png $(RM) $(EEPROM_NAME)-*.png $(TELEM_NAME)-*.png $(MPD_NAME)-*.png $(RM) *.build *.ico *.rc *.icns *.o *.exe $(MPD_ICON) + $(RM) altusmetrum.xpm install-data-hook: update-mime-database $(datadir)/mime @@ -114,6 +123,13 @@ install-data-hook: $(MPD_ICON): $(MP_ICON) $(LN_S) $(MP_ICON) $@ +XPM_SRC=altusmetrum-altosui-32.png + +altusmetrum.xpm: $(XPM_SRC) + pngtopnm -alpha $(XPM_SRC) > mask-$@ && \ + pngtopnm $(XPM_SRC) | \ + ppmtoxpm -alphamask=mask-$@ > $@ && rm mask-$@ + $(AM_FILES): $(AM_NAME).build $(MP_FILES): $(MP_NAME).build $(TG_FILES): $(TG_NAME).build @@ -132,6 +148,7 @@ SUFFIXES=.svg .build .icns .ico .rc .o .exe .ico.rc: echo '101 ICON "$*.ico"' > $@ + MINGCC32=i686-w64-mingw32-gcc MINGWINDRES=i686-w64-mingw32-windres -- cgit v1.2.3 From a0ccab8e4235934538a03f8be3b37aa1bbd6b144 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 24 Jun 2014 20:15:38 -0700 Subject: altosuilib: Mark 'Configure AltosUI' window with maps key status This lets us check a build to make sure it has a maps key Signed-off-by: Keith Packard --- altosuilib/AltosUIConfigure.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/altosuilib/AltosUIConfigure.java b/altosuilib/AltosUIConfigure.java index 5ab615e8..5648d1df 100644 --- a/altosuilib/AltosUIConfigure.java +++ b/altosuilib/AltosUIConfigure.java @@ -268,7 +268,9 @@ public class AltosUIConfigure constraints(0, 3)); row++; - pane.add(new JLabel (String.format("AltOS version %s", AltosUIVersion.version)), + pane.add(new JLabel (String.format("AltOS version %s (%smaps key)", + AltosUIVersion.version, + AltosUIVersion.has_google_maps_api_key() ? "" : "no ")), constraints(0, 3)); row++; -- cgit v1.2.3