summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBdale Garbee <bdale@gag.com>2014-06-24 21:17:53 -0600
committerBdale Garbee <bdale@gag.com>2014-06-24 21:17:53 -0600
commitbd440afc2a6e37b74fffcf1b977e149485095316 (patch)
tree3e42f1102d68d49dae3061b9592e23907e245f23
parent5d4f912bcc6784f975c82f7b0ed8dc360e60aae8 (diff)
parenta0ccab8e4235934538a03f8be3b37aa1bbd6b144 (diff)
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
-rw-r--r--Makefile.am1
-rw-r--r--altosdroid/src/org/altusmetrum/AltosDroid/AltosBluetooth.java2
-rw-r--r--altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java2
-rw-r--r--altosdroid/src/org/altusmetrum/AltosDroid/AltosDroidPreferences.java2
-rw-r--r--altosdroid/src/org/altusmetrum/AltosDroid/AltosDroidTab.java2
-rw-r--r--altosdroid/src/org/altusmetrum/AltosDroid/AltosVoice.java2
-rw-r--r--altosdroid/src/org/altusmetrum/AltosDroid/TabAscent.java2
-rw-r--r--altosdroid/src/org/altusmetrum/AltosDroid/TabDescent.java2
-rw-r--r--altosdroid/src/org/altusmetrum/AltosDroid/TabLanded.java2
-rw-r--r--altosdroid/src/org/altusmetrum/AltosDroid/TabMap.java2
-rw-r--r--altosdroid/src/org/altusmetrum/AltosDroid/TabPad.java2
-rw-r--r--altosdroid/src/org/altusmetrum/AltosDroid/TelemetryLogger.java2
-rw-r--r--altosdroid/src/org/altusmetrum/AltosDroid/TelemetryReader.java2
-rw-r--r--altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java2
-rw-r--r--altoslib/AltosAccel.java2
-rw-r--r--altoslib/AltosCRCException.java2
-rw-r--r--altoslib/AltosCSV.java2
-rw-r--r--altoslib/AltosCompanion.java2
-rw-r--r--altoslib/AltosConfigData.java10
-rw-r--r--altoslib/AltosConfigDataException.java2
-rw-r--r--altoslib/AltosConfigValues.java6
-rw-r--r--altoslib/AltosConvert.java2
-rw-r--r--altoslib/AltosDebug.java2
-rw-r--r--altoslib/AltosDistance.java2
-rw-r--r--altoslib/AltosEeprom.java2
-rw-r--r--altoslib/AltosEepromChunk.java2
-rw-r--r--altoslib/AltosEepromDownload.java2
-rw-r--r--altoslib/AltosEepromFile.java2
-rw-r--r--altoslib/AltosEepromGPS.java2
-rw-r--r--altoslib/AltosEepromHeader.java2
-rw-r--r--altoslib/AltosEepromIterable.java2
-rw-r--r--altoslib/AltosEepromList.java2
-rw-r--r--altoslib/AltosEepromLog.java2
-rw-r--r--altoslib/AltosEepromMega.java2
-rw-r--r--altoslib/AltosEepromMetrum2.java2
-rw-r--r--altoslib/AltosEepromMini.java2
-rw-r--r--altoslib/AltosEepromMonitor.java2
-rw-r--r--altoslib/AltosEepromTM.java2
-rw-r--r--altoslib/AltosEepromTm.java2
-rw-r--r--altoslib/AltosFile.java2
-rw-r--r--altoslib/AltosFlash.java2
-rw-r--r--altoslib/AltosFlashListener.java2
-rw-r--r--altoslib/AltosFlightReader.java2
-rw-r--r--altoslib/AltosFlightStats.java2
-rw-r--r--altoslib/AltosFrequency.java4
-rw-r--r--altoslib/AltosGPS.java2
-rw-r--r--altoslib/AltosGPSSat.java2
-rw-r--r--altoslib/AltosGreatCircle.java2
-rw-r--r--altoslib/AltosHeight.java2
-rw-r--r--altoslib/AltosHexfile.java2
-rw-r--r--altoslib/AltosHexsym.java2
-rw-r--r--altoslib/AltosIMU.java2
-rw-r--r--altoslib/AltosIdle.java2
-rw-r--r--altoslib/AltosIdleFetch.java2
-rw-r--r--altoslib/AltosIdleMonitor.java2
-rw-r--r--altoslib/AltosIdleMonitorListener.java2
-rw-r--r--altoslib/AltosIgnite.java2
-rw-r--r--altoslib/AltosKML.java2
-rw-r--r--altoslib/AltosLatitude.java2
-rw-r--r--altoslib/AltosLib.java2
-rw-r--r--altoslib/AltosLine.java2
-rw-r--r--altoslib/AltosLink.java2
-rw-r--r--altoslib/AltosListenerState.java2
-rw-r--r--altoslib/AltosLocation.java2
-rw-r--r--altoslib/AltosLog.java2
-rw-r--r--altoslib/AltosLongitude.java2
-rw-r--r--altoslib/AltosMag.java2
-rw-r--r--altoslib/AltosMma655x.java2
-rw-r--r--altoslib/AltosMs5607.java2
-rw-r--r--altoslib/AltosNoSymbol.java2
-rw-r--r--altoslib/AltosOrient.java2
-rw-r--r--altoslib/AltosParse.java2
-rw-r--r--altoslib/AltosPreferences.java2
-rw-r--r--altoslib/AltosPreferencesBackend.java2
-rw-r--r--altoslib/AltosProgrammer.java2
-rw-r--r--altoslib/AltosPyro.java2
-rw-r--r--altoslib/AltosReplayReader.java2
-rw-r--r--altoslib/AltosRomconfig.java2
-rw-r--r--altoslib/AltosSelfFlash.java2
-rw-r--r--altoslib/AltosSensorEMini.java2
-rw-r--r--altoslib/AltosSensorMM.java2
-rw-r--r--altoslib/AltosSensorMega.java2
-rw-r--r--altoslib/AltosSensorMetrum.java2
-rw-r--r--altoslib/AltosSensorTM.java2
-rw-r--r--altoslib/AltosSensorTMini.java2
-rw-r--r--altoslib/AltosSpeed.java2
-rw-r--r--altoslib/AltosState.java2
-rw-r--r--altoslib/AltosStateIterable.java2
-rw-r--r--altoslib/AltosStateUpdate.java2
-rw-r--r--altoslib/AltosTelemetry.java2
-rw-r--r--altoslib/AltosTelemetryConfiguration.java2
-rw-r--r--altoslib/AltosTelemetryFile.java2
-rw-r--r--altoslib/AltosTelemetryIterable.java2
-rw-r--r--altoslib/AltosTelemetryLegacy.java2
-rw-r--r--altoslib/AltosTelemetryLocation.java2
-rw-r--r--altoslib/AltosTelemetryMap.java2
-rw-r--r--altoslib/AltosTelemetryMegaData.java2
-rw-r--r--altoslib/AltosTelemetryMegaSensor.java2
-rw-r--r--altoslib/AltosTelemetryMetrumData.java2
-rw-r--r--altoslib/AltosTelemetryMetrumSensor.java2
-rw-r--r--altoslib/AltosTelemetryMini.java2
-rw-r--r--altoslib/AltosTelemetryRaw.java2
-rw-r--r--altoslib/AltosTelemetryReader.java2
-rw-r--r--altoslib/AltosTelemetrySatellite.java2
-rw-r--r--altoslib/AltosTelemetrySensor.java2
-rw-r--r--altoslib/AltosTelemetryStandard.java2
-rw-r--r--altoslib/AltosTemperature.java2
-rw-r--r--altoslib/AltosUnits.java2
-rw-r--r--altoslib/AltosUnitsListener.java2
-rw-r--r--altoslib/AltosVoltage.java2
-rw-r--r--altoslib/AltosWriter.java2
-rw-r--r--altosui/.gitignore2
-rw-r--r--altosui/Altos.java4
-rw-r--r--altosui/AltosAscent.java4
-rw-r--r--altosui/AltosCompanionInfo.java4
-rw-r--r--altosui/AltosConfig.java4
-rw-r--r--altosui/AltosConfigPyroUI.java4
-rw-r--r--altosui/AltosConfigTD.java4
-rw-r--r--altosui/AltosConfigTDUI.java34
-rw-r--r--altosui/AltosConfigUI.java62
-rw-r--r--altosui/AltosConfigureUI.java2
-rw-r--r--altosui/AltosDescent.java4
-rw-r--r--altosui/AltosFlightStatus.java4
-rw-r--r--altosui/AltosFlightStatusTableModel.java2
-rw-r--r--altosui/AltosFlightStatusUpdate.java2
-rw-r--r--altosui/AltosFlightUI.java61
-rw-r--r--altosui/AltosGraphUI.java4
-rw-r--r--altosui/AltosIdleMonitorUI.java20
-rw-r--r--altosui/AltosIgniteUI.java4
-rw-r--r--altosui/AltosIgnitor.java4
-rw-r--r--altosui/AltosLanded.java4
-rw-r--r--altosui/AltosLaunch.java2
-rw-r--r--altosui/AltosLaunchUI.java2
-rw-r--r--altosui/AltosPad.java4
-rw-r--r--altosui/AltosUI.java19
-rw-r--r--altosui/AltosUIPreferencesBackend.java2
-rw-r--r--altosui/Info.plist.in29
-rw-r--r--altosui/Instdrv/NSIS/Includes/java.nsh50
-rw-r--r--altosui/Instdrv/NSIS/Includes/refresh-sh.nsh14
-rw-r--r--altosui/Makefile.am59
-rw-r--r--altosui/altos-windows.nsi.in177
-rw-r--r--altosui/altusmetrum-altosui.desktop.in (renamed from altosui/altos.desktop.in)5
-rw-r--r--altosuilib/AltosBTDevice.java4
-rw-r--r--altosuilib/AltosBTDeviceIterator.java4
-rw-r--r--altosuilib/AltosBTKnown.java4
-rw-r--r--altosuilib/AltosBTManage.java4
-rw-r--r--altosuilib/AltosCSVUI.java4
-rw-r--r--altosuilib/AltosConfigFreqUI.java4
-rw-r--r--altosuilib/AltosDataChooser.java4
-rw-r--r--altosuilib/AltosDevice.java2
-rw-r--r--altosuilib/AltosDeviceDialog.java2
-rw-r--r--altosuilib/AltosDeviceUIDialog.java2
-rw-r--r--altosuilib/AltosDisplayThread.java4
-rw-r--r--altosuilib/AltosEepromDelete.java4
-rw-r--r--altosuilib/AltosEepromManage.java4
-rw-r--r--altosuilib/AltosEepromMonitor.java2
-rw-r--r--altosuilib/AltosEepromMonitorUI.java4
-rw-r--r--altosuilib/AltosEepromSelect.java4
-rw-r--r--altosuilib/AltosFlashUI.java4
-rw-r--r--altosuilib/AltosFlightDisplay.java4
-rw-r--r--altosuilib/AltosFlightInfoTableModel.java2
-rw-r--r--altosuilib/AltosFlightStatsTable.java4
-rw-r--r--altosuilib/AltosFontListener.java2
-rw-r--r--altosuilib/AltosFreqList.java163
-rw-r--r--altosuilib/AltosGraph.java4
-rw-r--r--altosuilib/AltosGraphDataPoint.java4
-rw-r--r--altosuilib/AltosGraphDataSet.java4
-rw-r--r--altosuilib/AltosInfoTable.java4
-rw-r--r--altosuilib/AltosLed.java2
-rw-r--r--altosuilib/AltosLights.java2
-rw-r--r--altosuilib/AltosPositionListener.java2
-rw-r--r--altosuilib/AltosRomconfigUI.java4
-rw-r--r--altosuilib/AltosScanUI.java4
-rw-r--r--altosuilib/AltosSerial.java4
-rw-r--r--altosuilib/AltosSerialInUseException.java2
-rw-r--r--altosuilib/AltosUIAxis.java4
-rw-r--r--altosuilib/AltosUIConfigure.java32
-rw-r--r--altosuilib/AltosUIDataMissing.java2
-rw-r--r--altosuilib/AltosUIDataPoint.java2
-rw-r--r--altosuilib/AltosUIDataSet.java2
-rw-r--r--altosuilib/AltosUIDialog.java2
-rw-r--r--altosuilib/AltosUIEnable.java4
-rw-r--r--altosuilib/AltosUIFlightTab.java4
-rw-r--r--altosuilib/AltosUIFrame.java63
-rw-r--r--altosuilib/AltosUIGraph.java4
-rw-r--r--altosuilib/AltosUIGrapher.java4
-rw-r--r--altosuilib/AltosUIIndicator.java4
-rw-r--r--altosuilib/AltosUILatLon.java4
-rw-r--r--altosuilib/AltosUILib.java4
-rw-r--r--altosuilib/AltosUIListener.java2
-rw-r--r--altosuilib/AltosUIMap.java4
-rw-r--r--altosuilib/AltosUIMapCache.java47
-rw-r--r--altosuilib/AltosUIMapCacheListener.java22
-rw-r--r--altosuilib/AltosUIMapImage.java2
-rw-r--r--altosuilib/AltosUIMapLine.java23
-rw-r--r--altosuilib/AltosUIMapMark.java4
-rw-r--r--altosuilib/AltosUIMapPath.java4
-rw-r--r--altosuilib/AltosUIMapPreload.java4
-rw-r--r--altosuilib/AltosUIMapRectangle.java2
-rw-r--r--altosuilib/AltosUIMapStore.java2
-rw-r--r--altosuilib/AltosUIMapStoreListener.java2
-rw-r--r--altosuilib/AltosUIMapTile.java4
-rw-r--r--altosuilib/AltosUIMapTileListener.java2
-rw-r--r--altosuilib/AltosUIMapTransform.java4
-rw-r--r--altosuilib/AltosUIMapView.java8
-rw-r--r--altosuilib/AltosUIMapZoomListener.java2
-rw-r--r--altosuilib/AltosUIMarker.java4
-rw-r--r--altosuilib/AltosUIPreferences.java42
-rw-r--r--altosuilib/AltosUIPreferencesBackend.java4
-rw-r--r--altosuilib/AltosUISeries.java4
-rw-r--r--altosuilib/AltosUITelemetryMenu.java88
-rw-r--r--altosuilib/AltosUIUnitsIndicator.java4
-rw-r--r--altosuilib/AltosUIVersion.java.in2
-rw-r--r--altosuilib/AltosUIVoltageIndicator.java4
-rw-r--r--altosuilib/AltosUSBDevice.java2
-rw-r--r--altosuilib/AltosVoice.java2
-rw-r--r--altosuilib/GrabNDrag.java2
-rw-r--r--altosuilib/Makefile.am5
-rwxr-xr-xaltosuilib/OSXAdapter.java206
-rw-r--r--altusmetrum.catbin6263 -> 8242 bytes
-rwxr-xr-xao-bringup/test-easymini6
-rw-r--r--ao-tools/Makefile.am3
-rw-r--r--ao-tools/ao-test-baro/.gitignore1
-rw-r--r--ao-tools/ao-test-baro/Makefile.am11
-rw-r--r--ao-tools/ao-test-baro/ao-test-baro.156
-rw-r--r--ao-tools/ao-test-baro/ao-test-baro.c238
-rw-r--r--ao-tools/ao-test-flash/.gitignore1
-rw-r--r--ao-tools/ao-test-flash/Makefile.am11
-rw-r--r--ao-tools/ao-test-flash/ao-test-flash.159
-rw-r--r--ao-tools/ao-test-flash/ao-test-flash.c245
-rw-r--r--ao-tools/ao-test-igniter/.gitignore1
-rw-r--r--ao-tools/ao-test-igniter/Makefile.am11
-rw-r--r--ao-tools/ao-test-igniter/ao-test-igniter.159
-rw-r--r--ao-tools/ao-test-igniter/ao-test-igniter.c223
-rw-r--r--configure.ac9
-rw-r--r--doc/altusmetrum.xsl44
-rw-r--r--icon/.gitignore7
-rw-r--r--icon/Makefile.am170
-rw-r--r--icon/altusmetrum-altosui.svg (renamed from icon/altusmetrum.svg)0
-rw-r--r--icon/altusmetrum-micropeak.svg (renamed from icon/micropeak.svg)0
-rw-r--r--icon/altusmetrum-telegps.svg (renamed from icon/telegps.svg)0
-rw-r--r--icon/application-vnd.altusmetrum.eeprom.svg397
l---------icon/application-vnd.altusmetrum.micropeak.svg1
-rw-r--r--icon/application-vnd.altusmetrum.telemetry.svg397
-rw-r--r--icon/creating-linux-icons29
-rw-r--r--icon/org-altusmetrum-mimetypes.xml16
-rw-r--r--icon/windows-stub.c2
-rw-r--r--micropeak/.gitignore2
-rw-r--r--micropeak/Info.plist.in17
-rw-r--r--micropeak/Makefile.am54
-rw-r--r--micropeak/MicroData.java4
-rw-r--r--micropeak/MicroDataPoint.java2
-rw-r--r--micropeak/MicroDeviceDialog.java2
-rw-r--r--micropeak/MicroDownload.java4
-rw-r--r--micropeak/MicroExport.java4
-rw-r--r--micropeak/MicroFile.java4
-rw-r--r--micropeak/MicroFileChooser.java4
-rw-r--r--micropeak/MicroFrame.java2
-rw-r--r--micropeak/MicroGraph.java4
-rw-r--r--micropeak/MicroPeak.app/Contents/Resources/MicroPeak.icnsbin133711 -> 0 bytes
-rw-r--r--micropeak/MicroPeak.java19
-rw-r--r--micropeak/MicroRaw.java4
-rw-r--r--micropeak/MicroSave.java4
-rw-r--r--micropeak/MicroSerial.java2
-rw-r--r--micropeak/MicroSerialLog.java2
-rw-r--r--micropeak/MicroStats.java4
-rw-r--r--micropeak/MicroStatsTable.java4
-rw-r--r--micropeak/MicroUSB.java2
-rw-r--r--micropeak/altusmetrum-micropeak.desktop.in (renamed from micropeak/micropeak.desktop.in)6
-rw-r--r--micropeak/micropeak-windows.nsi.in165
-rw-r--r--signing-driver18
-rw-r--r--src/drivers/ao_aprs.c102
-rw-r--r--src/kernel/ao_config.c34
-rw-r--r--src/kernel/ao_config.h5
-rw-r--r--src/kernel/ao_pyro.c28
-rw-r--r--src/micropeak/Makefile41
-rw-r--r--src/micropeak/micropeak-load.tmpl20
-rw-r--r--src/test/ao_aprs_test.c24
-rw-r--r--src/test/ao_flight_test.c2
-rw-r--r--telegps/.gitignore2
-rw-r--r--telegps/Info.plist.in29
-rw-r--r--telegps/Makefile.am57
-rw-r--r--telegps/TeleGPS.java45
-rw-r--r--telegps/TeleGPSConfig.java4
-rw-r--r--telegps/TeleGPSConfigUI.java63
-rw-r--r--telegps/TeleGPSDisplayThread.java4
-rw-r--r--telegps/TeleGPSGraphUI.java4
-rw-r--r--telegps/TeleGPSInfo.java4
-rw-r--r--telegps/TeleGPSPreferences.java2
-rw-r--r--telegps/TeleGPSState.java4
-rw-r--r--telegps/TeleGPSStatus.java4
-rw-r--r--telegps/TeleGPSStatusUpdate.java2
-rw-r--r--telegps/altusmetrum-telegps.desktop.in (renamed from telegps/telegps.desktop.in)4
-rw-r--r--telegps/telegps-windows.nsi.in176
294 files changed, 3874 insertions, 860 deletions
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/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..3bf8ea43 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.*;
@@ -71,6 +71,7 @@ public class AltosConfigData implements Iterable<String> {
/* HAS_APRS */
public int aprs_interval;
+ public int aprs_ssid;
/* HAS_BEEP */
public int beep;
@@ -250,6 +251,7 @@ public class AltosConfigData implements Iterable<String> {
pyro_firing_time = -1;
aprs_interval = -1;
+ aprs_ssid = -1;
beep = -1;
@@ -333,6 +335,7 @@ public class AltosConfigData implements Iterable<String> {
/* 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<String> {
/* 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<String> {
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<String> {
/* 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/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..b0c49e98 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 */
@@ -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/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 7c291ea9..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;
@@ -41,4 +41,4 @@ public class AltosFrequency {
frequency = f;
description = d;
}
-} \ No newline at end of file
+}
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/.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/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 22b3384d..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
@@ -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/altosui/AltosConfigUI.java b/altosui/AltosConfigUI.java
index 1b5ff988..6e1b47c2 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
@@ -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<String> aprs_interval_value;
+ JComboBox<Integer> aprs_ssid_value;
JComboBox<String> flight_log_max_value;
JComboBox<String> ignite_mode_value;
JComboBox<String> 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)");
@@ -419,7 +434,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++;
@@ -501,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<Integer>(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;
@@ -1177,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/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 43deb631..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;
@@ -170,13 +170,17 @@ public class AltosFlightUI extends AltosUIFrame implements AltosFlightDisplay {
}
Container bag;
- AltosFreqList frequencies;
- JComboBox<String> 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<AltosFlightDisplay>();
@@ -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<String>();
- 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/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..63d86291 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;
@@ -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));
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..0aa5d03c 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();
@@ -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/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/altosui/Info.plist.in b/altosui/Info.plist.in
index 46dea171..8dc797d6 100644
--- a/altosui/Info.plist.in
+++ b/altosui/Info.plist.in
@@ -23,7 +23,34 @@
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleIconFile</key>
- <string>AltosUIIcon.icns</string>
+ <string>altusmetrum-altosui.icns</string>
+ <key>CFBundleDocumentTypes</key>
+ <array>
+ <dict>
+ <key>CFBundleTypeName</key>
+ <string>Telemetry</string>
+ <key>CFBundleTypeIconFile</key>
+ <string>application-vnd.altusmetrum.telemetry.icns</string>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>telem</string>
+ </array>
+ <key>CFBundleTypeRole</key>
+ <string>Editor</string>
+ </dict>
+ <dict>
+ <key>CFBundleTypeName</key>
+ <string>Eeprom</string>
+ <key>CFBundleTypeIconFile</key>
+ <string>application-vnd.altusmetrum.eeprom.icns</string>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>eeprom</string>
+ </array>
+ <key>CFBundleTypeRole</key>
+ <string>Editor</string>
+ </dict>
+ </array>
<key>Java</key>
<dict>
<key>MainClass</key>
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/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
diff --git a/altosui/Makefile.am b/altosui/Makefile.am
index 98a5e193..45d75699 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
@@ -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
-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
@@ -100,7 +111,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)
@@ -140,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) altos.desktop.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
@@ -160,7 +172,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
@@ -194,7 +206,6 @@ else
fat: $(LINUX_DIST) $(LINUX_SH) $(MACOSX_DIST) $(WINDOWS_DIST)
endif
-
altosuidir=$(datadir)/java
install-altosuiJAVA: altosui.jar
@@ -324,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 b72772e2..07de5b13 100644
--- a/altosui/altos-windows.nsi.in
+++ b/altosui/altos-windows.nsi.in
@@ -1,19 +1,25 @@
!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"
-!define PRODUCT_NAME "Altus Metrum Windows Software"
+!include java.nsh
+!include refresh-sh.nsh
-Name "Altus Metrum Installer"
+!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"
; 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"
@@ -23,7 +29,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"
@@ -35,43 +41,14 @@ Function .onInit
${EndIf}
FunctionEnd
-Var JavaDownload
-Var JavaBits
-
-Function GetJRE
+Function un.onInit
+ DetailPrint "Checking host operating system"
${If} ${RunningX64}
- StrCpy $JavaDownload ${JRE64_URL}
- StrCpy $JavaBits "64"
- ${Else}
- StrCpy $JavaDownload ${JRE32_URL}
- StrCpy $JavaBits "32"
+ DetailPrint "Installer running on 64-bit host"
+ SetRegView 64
+ StrCpy $INSTDIR "$PROGRAMFILES64\AltusMetrum"
+ ${DisableX64FSRedirection}
${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
@@ -109,12 +86,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"
@@ -129,13 +106,13 @@ Section "AltosUI Application"
File "*.dll"
- File "../icon/*.ico"
+ File "../icon/${WIN_APP_ICON}"
- 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\${WIN_APP_ICON}"
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\${WIN_APP_ICON}"
SectionEnd
Section "TeleMetrum, TeleDongle and TeleBT Firmware"
@@ -145,6 +122,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"
@@ -167,38 +145,105 @@ Section "Documentation"
File "../doc/telemini.pdf"
SectionEnd
+Section "File Associations"
+
+ ${DisableX64FSRedirection}
+
+ SetOutPath $INSTDIR
+
+ File "../icon/${WIN_APP_EXE}"
+ File "../icon/${WIN_TELEM_EXE}"
+ File "../icon/${WIN_EEPROM_EXE}"
+
+ 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 "${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/vnd.altusmetrum.eeprom"
+
+ WriteRegStr HKCR ".eeprom\OpenWithProgids" "${PROG_ID_EEPROM}" ""
+ WriteRegStr HKCR ".eeprom\${PROG_ID_EEPROM}" "" "${REG_NAME}"
+
+ ; .telem elements
+
+ 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/vnd.altusmetrum.telemetry"
+
+ WriteRegStr HKCR ".telem\OpenWithProgids" "${PROG_ID_TELEM}" ""
+ WriteRegStr HKCR ".telem\${PROG_ID_TELEM}" "" "${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_EEPROM}"
+ DeleteRegKey HKCR "${PROG_ID_TELEM}"
+
+ DeleteRegKey HKCR ".eeprom\${PROG_ID_EEPROM}"
+ DeleteRegValue HKCR ".eeprom\OpenWithProgids" "${PROG_ID_EEPROM}"
+
+ 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\${WIN_APP_ICON}"
+ Delete "$INSTDIR\${WIN_APP_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/altosui/altos.desktop.in b/altosui/altusmetrum-altosui.desktop.in
index 66114348..10fd9e9d 100644
--- a/altosui/altos.desktop.in
+++ b/altosui/altusmetrum-altosui.desktop.in
@@ -1,10 +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
+Icon=%icondir%/altusmetrum-altosui.svg
Exec=%bindir%/altosui %f
Terminal=false
-MimeType=text/plain;
+MimeType=application/vnd.altusmetrum.telemetry;application/vnd.altusmetrum.eeprom
Categories=Education;Electronics;Science;
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> {
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<AltosBTDevice> {
LinkedList<AltosBTDevice> devices = new LinkedList<AltosBTDevice>();
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<AltosBTDevice> {
LinkedBlockingQueue<AltosBTDevice> 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 e1299aae..293ce032 100644
--- a/altosuilib/AltosFreqList.java
+++ b/altosuilib/AltosFreqList.java
@@ -15,17 +15,131 @@
* 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 org.altusmetrum.altoslib_4.*;
+import java.awt.event.*;
+import org.altusmetrum.altoslib_5.*;
-public class AltosFreqList extends JComboBox<AltosFrequency> {
+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<ActionListener> action_listeners = new LinkedList<ActionListener>();
+
+ 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);
+ }
+
+ 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;
+ set_label();
+ }
+ }
+ }
+
+ 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 +148,21 @@ public class AltosFreqList extends JComboBox<AltosFrequency> {
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,22 +174,33 @@ public class AltosFreqList extends JComboBox<AltosFrequency> {
}
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);
+ 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);
}
}
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<AltosUIDataPoint> {
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..5648d1df 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.*;
@@ -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<Integer> map_cache = new JComboBox<Integer>(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() {
}
@@ -243,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++;
@@ -255,6 +282,7 @@ public class AltosUIConfigure
add_font_size();
add_look_and_feel();
add_position();
+ add_map_cache();
add_bluetooth();
add_frequencies();
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 6e62c762..5b915e85 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.*;
@@ -157,11 +157,72 @@ public class AltosUIFrame extends JFrame implements AltosUIListener, AltosPositi
}
}
+ static boolean global_settings_done;
+
+ public String getName() {
+ 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);
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();
}
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..9cc32e24 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;
@@ -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 <keithp@keithp.com>
+ *
+ * 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/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..32437d4e 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,12 +25,13 @@ 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;
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/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..70b8e2e9 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 {
@@ -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();
@@ -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/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..ecab20d4 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 {
@@ -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<AltosUIMapCacheListener> 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<AltosPositionListener>();
+
+ map_cache = backend.getInt(mapCachePreference, 9);
+ map_cache_listeners = new LinkedList<AltosUIMapCacheListener>();
}
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/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
new file mode 100644
index 00000000..893c3c44
--- /dev/null
+++ b/altosuilib/AltosUITelemetryMenu.java
@@ -0,0 +1,88 @@
+/*
+ * Copyright © 2014 Keith Packard <keithp@keithp.com>
+ *
+ * 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;
+
+import java.util.*;
+import javax.swing.*;
+import java.awt.event.*;
+import org.altusmetrum.altoslib_5.*;
+
+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<ActionListener> action_listeners = new LinkedList<ActionListener>();
+
+ 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/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/altosuilib/Makefile.am b/altosuilib/Makefile.am
index e08fbe74..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 \
@@ -80,7 +81,9 @@ altosuilib_JAVA = \
AltosUIFlightTab.java \
AltosUIIndicator.java \
AltosUIUnitsIndicator.java \
- AltosUIVoltageIndicator.java
+ AltosUIVoltageIndicator.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();
+ }
+ }
+ }
+}
diff --git a/altusmetrum.cat b/altusmetrum.cat
index 2d7e8b26..eb5dff98 100644
--- a/altusmetrum.cat
+++ b/altusmetrum.cat
Binary files differ
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)
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 <keithp@keithp.com>
+.\"
+.\" 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 <keithp@keithp.com>
+ *
+ * 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 <err.h>
+#include <fcntl.h>
+#include <gelf.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <sysexits.h>
+#include <unistd.h>
+#include <getopt.h>
+#include <string.h>
+#include <stdbool.h>
+#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=<verbose>] [--device=<device>] [-tty=<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 <keithp@keithp.com>
+.\"
+.\" 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 <keithp@keithp.com>
+ *
+ * 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 <err.h>
+#include <fcntl.h>
+#include <gelf.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <sysexits.h>
+#include <unistd.h>
+#include <getopt.h>
+#include <string.h>
+#include <stdbool.h>
+#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=<verbose>] [--device=<device>] [-tty=<tty>] <expected-size>\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 <keithp@keithp.com>
+.\"
+.\" 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 <keithp@keithp.com>
+ *
+ * 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 <err.h>
+#include <fcntl.h>
+#include <gelf.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <sysexits.h>
+#include <unistd.h>
+#include <getopt.h>
+#include <string.h>
+#include <stdbool.h>
+#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=<verbose>] [--device=<device>] [-tty=<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 23dc9d82..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)
+AC_INIT([altos], 1.4.1.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])
@@ -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
])
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
</listitem>
</varlistentry>
</variablelist>
+ <para>
+ Once you've located the right pins:
+ </para>
+ <orderedlist inheritnum='inherit' numeration='arabic'>
+ <listitem>
+ <para>
+ Turn the altimeter power off.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Connect a battery.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Connect the indicated terminals together with a short
+ piece of wire. Take care not to accidentally connect
+ anything else.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Connect USB
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Turn the board power on.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The board should now be visible over USB as 'AltosFlash'
+ and be ready to receive firmware.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Once the board has been powered up, you can remove the
+ piece of wire.
+ </para>
+ </listitem>
+ </orderedlist>
</section>
</section>
<section>
diff --git a/icon/.gitignore b/icon/.gitignore
index e89555de..94c7c70c 100644
--- a/icon/.gitignore
+++ b/icon/.gitignore
@@ -1,6 +1,7 @@
-altus-metrum-*.png
-micropeak-*.png
-telegps-*.png
+application-*.png
+altusmetrum-*.png
+*.rc
*.ico
*.icns
*.build
+*.exe
diff --git a/icon/Makefile.am b/icon/Makefile.am
index b1c00f4b..bf147ad3 100644
--- a/icon/Makefile.am
+++ b/icon/Makefile.am
@@ -3,71 +3,157 @@ 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
+
+# Files needed for Mac OSX icons
+
+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)
+
+ICNS_FILES = $(AM_NAME).icns $(MP_NAME).icns $(TG_NAME).icns \
+ $(EEPROM_NAME).icns $(TELEM_NAME).icns $(MPD_NAME).icns
+
+# Files needed for Windows icons
+
+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)
+
+ICO_FILES = $(AM_NAME).ico $(MP_NAME).ico $(TG_NAME).ico \
+ $(EEPROM_NAME).ico $(TELEM_NAME).ico $(MPD_NAME).ico
+
+EXE_FILES = $(AM_NAME).exe $(MP_NAME).exe $(TG_NAME).exe \
+ $(EEPROM_NAME).exe $(TELEM_NAME).exe $(MPD_NAME).exe
+
+# Files needed for Java internal icons
+
+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)
+
+JAVA_FILES = $(JAVA_AM_FILES) $(JAVA_MP_FILES) $(JAVA_TG_FILES)
+
+# PNG files needed by anyone
+
+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)
+
+# XPM file needed by debian
+
+AM_XPM = altusmetrum.xpm
+
+ICON_THEME=$(datadir)/icons/hicolor
+
+appicondir = $(ICON_THEME)/scalable/apps
+appicon_DATA = $(AM_ICON) $(MP_ICON) $(TG_ICON)
+
+MIME_ICONS = $(EEPROM_ICON) $(TELEM_ICON) $(MPD_ICON)
+
+mimeicondir = $(ICON_THEME)/scalable/mimetypes
+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:
echo $(RES)
-all-local: $(ICO_FILES) $(ICNS_FILES)
+java-altosui:
+ @echo $(JAVA_AM_FILES)
+
+java-micropeak:
+ @echo $(JAVA_MP_FILES)
+
+java-telegps:
+ @echo $(JAVA_TG_FILES)
+
+fat: all $(ICO_FILES) $(ICNS_FILES) $(EXE_FILES)
+
+all-local: $(JAVA_FILES) $(AM_XPM)
clean-local:
- $(RM) altus-metrum-*.png telegps-*.png micropeak-*.png *.build *.ico *.icns
+ $(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
+ update-icon-caches $(ICON_THEME)
-$(AM_FILES): altusmetrum.build
+$(MPD_ICON): $(MP_ICON)
+ $(LN_S) $(MP_ICON) $@
-altusmetrum.build: altusmetrum.svg
- for i in $(RES); do rsvg-convert -w $$i -h $$i -o altus-metrum-$$i.png altusmetrum.svg; done && touch $@
+XPM_SRC=altusmetrum-altosui-32.png
-$(TG_FILES): telegps.build
+altusmetrum.xpm: $(XPM_SRC)
+ pngtopnm -alpha $(XPM_SRC) > mask-$@ && \
+ pngtopnm $(XPM_SRC) | \
+ ppmtoxpm -alphamask=mask-$@ > $@ && rm mask-$@
-telegps.build: telegps.svg
- for i in $(RES); do rsvg-convert -w $$i -h $$i -o telegps-$$i.png telegps.svg; done && touch $@
+$(AM_FILES): $(AM_NAME).build
+$(MP_FILES): $(MP_NAME).build
+$(TG_FILES): $(TG_NAME).build
-$(MP_FILES): micropeak.build
+SUFFIXES=.svg .build .icns .ico .rc .o .exe
-micropeak.build: micropeak.svg
- for i in $(RES); do rsvg-convert -w $$i -h $$i -o micropeak-$$i.png micropeak.svg; done && touch $@
+.svg.build:
+ for i in $(RES); do rsvg-convert -w $$i -h $$i -o $*-$$i.png $*.svg; done && touch $@
-#clean-local:
-# $(RM) -f $(ICO_FILES)
+.build.icns:
+ png2icns $@ $(shell for i in $(MAC_RES); do echo $*-$$i.png; done)
-altus-metrum.ico: $(WIN_AM_FILES)
- icotool -c -o $@ $(WIN_AM_FILES)
+.build.ico:
+ icotool -c -o $@ $(shell for i in $(WIN_RES); do echo $*-$$i.png; done)
-micro-peak.ico: $(WIN_MP_FILES)
- icotool -c -o $@ $(WIN_MP_FILES)
+.ico.rc:
+ echo '101 ICON "$*.ico"' > $@
-telegps.ico: $(WIN_TG_FILES)
- icotool -c -o $@ $(WIN_TG_FILES)
-AltosUIIcon.icns: $(MAC_AM_FILES)
- png2icns $@ $(MAC_AM_FILES)
+MINGCC32=i686-w64-mingw32-gcc
+MINGWINDRES=i686-w64-mingw32-windres
-TeleGPS.icns: $(MAC_TG_FILES)
- png2icns $@ $(MAC_TG_FILES)
+.rc.o:
+ $(MINGWINDRES) $*.rc $@
-MicroPeak.icns: $(MAC_MP_FILES)
- png2icns $@ $(MAC_MP_FILES)
+.o.exe:
+ $(MINGCC32) -o $@ windows-stub.c $*.o
diff --git a/icon/altusmetrum.svg b/icon/altusmetrum-altosui.svg
index e8935a65..e8935a65 100644
--- a/icon/altusmetrum.svg
+++ b/icon/altusmetrum-altosui.svg
diff --git a/icon/micropeak.svg b/icon/altusmetrum-micropeak.svg
index d37130f5..d37130f5 100644
--- a/icon/micropeak.svg
+++ b/icon/altusmetrum-micropeak.svg
diff --git a/icon/telegps.svg b/icon/altusmetrum-telegps.svg
index 1e390f3b..1e390f3b 100644
--- a/icon/telegps.svg
+++ b/icon/altusmetrum-telegps.svg
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 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ id="svg2"
+ width="214.27165"
+ height="266.00192"
+ version="1.0"
+ sodipodi:version="0.32"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="application-vnd-altusmetrum-eeprom.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape"
+ inkscape:export-filename="/home/keithp/src/cc1111/altus-logo/bottom.png"
+ inkscape:export-xdpi="119.89881"
+ inkscape:export-ydpi="119.89881">
+ <metadata
+ id="metadata14">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs12">
+ <linearGradient
+ id="linearGradient3165">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3167" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop3169" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3177">
+ <stop
+ style="stop-color:#da7000;stop-opacity:1;"
+ offset="0"
+ id="stop3179" />
+ <stop
+ id="stop3447"
+ offset="0.24528302"
+ style="stop-color:#a63852;stop-opacity:1;" />
+ <stop
+ style="stop-color:#7200a4;stop-opacity:1;"
+ offset="1"
+ id="stop3181" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3169">
+ <stop
+ style="stop-color:#ff8a00;stop-opacity:1;"
+ offset="0"
+ id="stop3171" />
+ <stop
+ id="stop3445"
+ offset="0.71698111"
+ style="stop-color:#c24573;stop-opacity:0.98039216;" />
+ <stop
+ style="stop-color:#8500e7;stop-opacity:0.96078432;"
+ offset="1"
+ id="stop3173" />
+ </linearGradient>
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 121 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="191 : 121 : 1"
+ inkscape:persp3d-origin="95.5 : 80.666667 : 1"
+ id="perspective16" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3169"
+ id="radialGradient3175"
+ cx="951.68713"
+ cy="2305.2668"
+ fx="951.68713"
+ fy="2305.2668"
+ r="951.68701"
+ gradientTransform="matrix(1,0,0,1.2664529,0,-321.14689)"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3165"
+ id="radialGradient3171"
+ cx="951.68713"
+ cy="1205.2668"
+ fx="951.68713"
+ fy="1205.2668"
+ r="951.68701"
+ gradientTransform="matrix(1,0,0,1.2664529,0,-321.14689)"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3169"
+ id="radialGradient3020"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.2664529,0,-321.14689)"
+ cx="951.68713"
+ cy="2305.2668"
+ fx="951.68713"
+ fy="2305.2668"
+ r="951.68701" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3165"
+ id="radialGradient3022"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.2664529,0,-321.14689)"
+ cx="951.68713"
+ cy="1205.2668"
+ fx="951.68713"
+ fy="1205.2668"
+ r="951.68701" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3169"
+ id="radialGradient3024"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.2664529,0,-321.14689)"
+ cx="951.68713"
+ cy="2305.2668"
+ fx="951.68713"
+ fy="2305.2668"
+ r="951.68701" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3165"
+ id="radialGradient3026"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.2664529,0,-321.14689)"
+ cx="951.68713"
+ cy="1205.2668"
+ fx="951.68713"
+ fy="1205.2668"
+ r="951.68701" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3169"
+ id="radialGradient3028"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.2664529,0,-321.14689)"
+ cx="951.68713"
+ cy="2305.2668"
+ fx="951.68713"
+ fy="2305.2668"
+ r="951.68701" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3165"
+ id="radialGradient3030"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.2664529,0,-321.14689)"
+ cx="951.68713"
+ cy="1205.2668"
+ fx="951.68713"
+ fy="1205.2668"
+ r="951.68701" />
+ <filter
+ id="filter3005"
+ inkscape:label="Drop Shadow"
+ color-interpolation-filters="sRGB">
+ <feFlood
+ id="feFlood3007"
+ flood-opacity="0.604"
+ flood-color="rgb(0,0,0)"
+ result="flood" />
+ <feComposite
+ id="feComposite3009"
+ in2="SourceGraphic"
+ in="flood"
+ operator="in"
+ result="composite1" />
+ <feGaussianBlur
+ id="feGaussianBlur3011"
+ stdDeviation="80"
+ result="blur" />
+ <feOffset
+ id="feOffset3013"
+ dx="100"
+ dy="100"
+ result="offset" />
+ <feComposite
+ id="feComposite3015"
+ in2="offset"
+ in="SourceGraphic"
+ operator="over"
+ result="composite2" />
+ </filter>
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3169"
+ id="radialGradient4415"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.2664529,0,-321.14689)"
+ cx="951.68713"
+ cy="2305.2668"
+ fx="951.68713"
+ fy="2305.2668"
+ r="951.68701" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3165"
+ id="radialGradient4417"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.2664529,0,-321.14689)"
+ cx="951.68713"
+ cy="1205.2668"
+ fx="951.68713"
+ fy="1205.2668"
+ r="951.68701" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3169"
+ id="radialGradient4419"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.2664529,0,-321.14689)"
+ cx="951.68713"
+ cy="2305.2668"
+ fx="951.68713"
+ fy="2305.2668"
+ r="951.68701" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3165"
+ id="radialGradient4421"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.2664529,0,-321.14689)"
+ cx="951.68713"
+ cy="1205.2668"
+ fx="951.68713"
+ fy="1205.2668"
+ r="951.68701" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3169"
+ id="radialGradient4423"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.2664529,0,-321.14689)"
+ cx="951.68713"
+ cy="2305.2668"
+ fx="951.68713"
+ fy="2305.2668"
+ r="951.68701" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3165"
+ id="radialGradient4425"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.2664529,0,-321.14689)"
+ cx="951.68713"
+ cy="1205.2668"
+ fx="951.68713"
+ fy="1205.2668"
+ r="951.68701" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3169"
+ id="radialGradient4427"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.2664529,0,-321.14689)"
+ cx="951.68713"
+ cy="2305.2668"
+ fx="951.68713"
+ fy="2305.2668"
+ r="951.68701" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3165"
+ id="radialGradient4429"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.2664529,0,-321.14689)"
+ cx="951.68713"
+ cy="1205.2668"
+ fx="951.68713"
+ fy="1205.2668"
+ r="951.68701" />
+ <filter
+ id="filter4485"
+ style="color-interpolation-filters:sRGB;"
+ inkscape:label="Drop Shadow">
+ <feFlood
+ id="feFlood4487"
+ flood-opacity="0.604"
+ flood-color="rgb(0,0,0)"
+ result="flood" />
+ <feComposite
+ id="feComposite4489"
+ in2="SourceGraphic"
+ in="flood"
+ operator="in"
+ result="composite1" />
+ <feGaussianBlur
+ id="feGaussianBlur4491"
+ in="composite"
+ stdDeviation="8"
+ result="blur" />
+ <feOffset
+ id="feOffset4493"
+ dx="10"
+ dy="10"
+ result="offset" />
+ <feComposite
+ id="feComposite4495"
+ in2="offset"
+ in="SourceGraphic"
+ operator="over"
+ result="composite2" />
+ </filter>
+ </defs>
+ <sodipodi:namedview
+ inkscape:cy="128.91168"
+ inkscape:cx="213.59793"
+ inkscape:zoom="2.4559706"
+ inkscape:window-height="1177"
+ inkscape:window-width="1462"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ guidetolerance="10.0"
+ gridtolerance="10.0"
+ objecttolerance="10.0"
+ borderopacity="1.0"
+ bordercolor="#666666"
+ pagecolor="#ffffff"
+ id="base"
+ showgrid="false"
+ inkscape:window-x="899"
+ inkscape:window-y="94"
+ inkscape:current-layer="svg2"
+ inkscape:window-maximized="0"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="20"
+ fit-margin-bottom="20" />
+ <g
+ id="g4439"
+ style="filter:url(#filter4485)">
+ <g
+ style="fill:url(#radialGradient4427);fill-opacity:1;stroke:url(#radialGradient4429);stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;"
+ id="g3"
+ transform="matrix(0.1,0,0,0.1,1.967113,2.4742836)">
+ <g
+ id="g5"
+ style="fill:url(#radialGradient4423);fill-opacity:1;fill-rule:evenodd;stroke:url(#radialGradient4425);stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;"
+ transform="translate(20.61545,-27.69425)">
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:url(#radialGradient4415);fill-opacity:1;stroke:url(#radialGradient4417);stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;"
+ id="path7"
+ d="m 931.07168,1164.597 248.86992,-331.80265 416.1687,1338.32935 286.6484,267.1042 -520.4224,0 -270.2797,-262.2181 0,-1033.0627 -160.98492,106.6818 -160.98492,-106.6818 0,1033.0627 -270.2797,262.2181 -520.4224,0 286.6484,-267.1042 416.1687,-1338.32935 248.86992,331.80265 z" />
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:url(#radialGradient4419);fill-opacity:1;stroke:url(#radialGradient4421);stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;"
+ id="path9"
+ d="m 931.07168,27.69425 224.03682,720.46517 -63.341,76.00913 L 931.07168,486.3269 770.37586,824.16855 707.03486,748.15942 931.07168,27.69425 z" />
+ </g>
+ </g>
+ <g
+ transform="matrix(2.8009121,0,0,2.8009121,97.173402,128.84062)"
+ id="g4373"
+ style="fill-rule:evenodd">
+ <path
+ id="rect3922"
+ d="m 30.19825,5.3569063 c 0.5796,0 1.046698,0.6864133 1.046698,1.5381453 l 0,25.8484734 c 0,0.851692 -0.467114,1.538145 -1.046698,1.538145 l -29.0366268,0 c -0.57960004,0 -1.04669856,-0.686421 -1.04669856,-1.538145 0,0 0.002884,-25.8275138 2.6458e-4,-25.8479191 0,-0.8516925 0.46711441,-1.5381453 1.04669858,-1.5381453 l 29.0366272,0 z"
+ inkscape:connector-curvature="0"
+ style="fill:#333333;stroke:#000000;stroke-width:0.22984983"
+ sodipodi:nodetypes="cssssccscc" />
+ <path
+ style="fill:#999999;stroke:#000000;stroke-width:0.26240885"
+ id="path4952"
+ d="m 4.3596675,0.13120443 0,0.7176181 -1.2452482,3.12200877 0,1.4500325 5.4990161,0 0,-1.4500325 -1.2406962,-3.12200877 0,-0.7176181 -3.0131735,0 z m 6.6261025,0 0,0.7176181 -1.2452487,3.12200877 0,1.4500325 5.4990167,0 0,-1.4500325 -1.240696,-3.12200877 0,-0.7176181 -3.013174,0 z m 6.621594,0 0,0.7176181 -1.240696,3.12200877 0,1.4500325 5.499015,0 0,-1.4500325 -1.240696,-3.12200877 0,-0.7176181 -3.017682,0 z m 6.626102,0 0,0.7176181 -1.240696,3.12200877 0,1.4500325 5.499015,0 0,-1.4500325 -1.240696,-3.12200877 0,-0.7176181 -3.017682,0 z"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccccccccccccccccccccccccccccccccccccccc" />
+ <path
+ style="fill:#999999;stroke:#000000;stroke-width:0.26240885"
+ id="path4974"
+ d="m 3.1147829,34.371248 0,1.450032 1.2452481,3.122009 0,0.717618 3.0131736,0 0,-0.717618 1.2406961,-3.122009 0,-1.450032 -5.499016,0 z m 6.626102,0 0,1.450032 1.2452481,3.122009 0,0.717618 3.013173,0 0,-0.717618 1.240697,-3.122009 0,-1.450032 -5.4990163,0 z m 6.6261021,0 0,1.450032 1.240696,3.122009 0,0.717618 3.017683,0 0,-0.717618 1.240696,-3.122009 0,-1.450032 -5.499017,0 z m 6.626102,0 0,1.450032 1.240696,3.122009 0,0.717618 3.017683,0 0,-0.717618 1.240696,-3.122009 0,-1.450032 -5.499017,0 z"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccccccccccccccccccccccccccccccccccccccc" />
+ </g>
+ </g>
+</svg>
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 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ id="svg2"
+ width="214.27165"
+ height="266.00192"
+ version="1.0"
+ sodipodi:version="0.32"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="application-vnd.altusmetrum.telemetry.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape"
+ inkscape:export-filename="/home/keithp/src/cc1111/altus-logo/bottom.png"
+ inkscape:export-xdpi="119.89881"
+ inkscape:export-ydpi="119.89881">
+ <metadata
+ id="metadata14">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs12">
+ <linearGradient
+ id="linearGradient3165">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3167" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop3169" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3177">
+ <stop
+ style="stop-color:#da7000;stop-opacity:1;"
+ offset="0"
+ id="stop3179" />
+ <stop
+ id="stop3447"
+ offset="0.24528302"
+ style="stop-color:#a63852;stop-opacity:1;" />
+ <stop
+ style="stop-color:#7200a4;stop-opacity:1;"
+ offset="1"
+ id="stop3181" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3169">
+ <stop
+ style="stop-color:#ff8a00;stop-opacity:1;"
+ offset="0"
+ id="stop3171" />
+ <stop
+ id="stop3445"
+ offset="0.71698111"
+ style="stop-color:#c24573;stop-opacity:0.98039216;" />
+ <stop
+ style="stop-color:#8500e7;stop-opacity:0.96078432;"
+ offset="1"
+ id="stop3173" />
+ </linearGradient>
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 121 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="191 : 121 : 1"
+ inkscape:persp3d-origin="95.5 : 80.666667 : 1"
+ id="perspective16" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3169"
+ id="radialGradient3175"
+ cx="951.68713"
+ cy="2305.2668"
+ fx="951.68713"
+ fy="2305.2668"
+ r="951.68701"
+ gradientTransform="matrix(1,0,0,1.2664529,0,-321.14689)"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3165"
+ id="radialGradient3171"
+ cx="951.68713"
+ cy="1205.2668"
+ fx="951.68713"
+ fy="1205.2668"
+ r="951.68701"
+ gradientTransform="matrix(1,0,0,1.2664529,0,-321.14689)"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3169"
+ id="radialGradient3020"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.2664529,0,-321.14689)"
+ cx="951.68713"
+ cy="2305.2668"
+ fx="951.68713"
+ fy="2305.2668"
+ r="951.68701" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3165"
+ id="radialGradient3022"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.2664529,0,-321.14689)"
+ cx="951.68713"
+ cy="1205.2668"
+ fx="951.68713"
+ fy="1205.2668"
+ r="951.68701" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3169"
+ id="radialGradient3024"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.2664529,0,-321.14689)"
+ cx="951.68713"
+ cy="2305.2668"
+ fx="951.68713"
+ fy="2305.2668"
+ r="951.68701" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3165"
+ id="radialGradient3026"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.2664529,0,-321.14689)"
+ cx="951.68713"
+ cy="1205.2668"
+ fx="951.68713"
+ fy="1205.2668"
+ r="951.68701" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3169"
+ id="radialGradient3028"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.2664529,0,-321.14689)"
+ cx="951.68713"
+ cy="2305.2668"
+ fx="951.68713"
+ fy="2305.2668"
+ r="951.68701" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3165"
+ id="radialGradient3030"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.2664529,0,-321.14689)"
+ cx="951.68713"
+ cy="1205.2668"
+ fx="951.68713"
+ fy="1205.2668"
+ r="951.68701" />
+ <filter
+ id="filter3005"
+ inkscape:label="Drop Shadow"
+ color-interpolation-filters="sRGB">
+ <feFlood
+ id="feFlood3007"
+ flood-opacity="0.604"
+ flood-color="rgb(0,0,0)"
+ result="flood" />
+ <feComposite
+ id="feComposite3009"
+ in2="SourceGraphic"
+ in="flood"
+ operator="in"
+ result="composite1" />
+ <feGaussianBlur
+ id="feGaussianBlur3011"
+ stdDeviation="80"
+ result="blur" />
+ <feOffset
+ id="feOffset3013"
+ dx="100"
+ dy="100"
+ result="offset" />
+ <feComposite
+ id="feComposite3015"
+ in2="offset"
+ in="SourceGraphic"
+ operator="over"
+ result="composite2" />
+ </filter>
+ <filter
+ id="filter4113"
+ style="color-interpolation-filters:sRGB;"
+ inkscape:label="Drop Shadow">
+ <feFlood
+ id="feFlood4115"
+ flood-opacity="0.604"
+ flood-color="rgb(0,0,0)"
+ result="flood" />
+ <feComposite
+ id="feComposite4117"
+ in2="SourceGraphic"
+ in="flood"
+ operator="in"
+ result="composite1" />
+ <feGaussianBlur
+ id="feGaussianBlur4119"
+ in="composite"
+ stdDeviation="6"
+ result="blur" />
+ <feOffset
+ id="feOffset4121"
+ dx="7.5"
+ dy="7.5"
+ result="offset" />
+ <feComposite
+ id="feComposite4123"
+ in2="offset"
+ in="SourceGraphic"
+ operator="over"
+ result="composite2" />
+ </filter>
+ <filter
+ id="filter4125"
+ style="color-interpolation-filters:sRGB;"
+ inkscape:label="Drop Shadow">
+ <feFlood
+ id="feFlood4127"
+ flood-opacity="0.604"
+ flood-color="rgb(0,0,0)"
+ result="flood" />
+ <feComposite
+ id="feComposite4129"
+ in2="SourceGraphic"
+ in="flood"
+ operator="in"
+ result="composite1" />
+ <feGaussianBlur
+ id="feGaussianBlur4131"
+ in="composite"
+ stdDeviation="6"
+ result="blur" />
+ <feOffset
+ id="feOffset4133"
+ dx="7.5"
+ dy="7.5"
+ result="offset" />
+ <feComposite
+ id="feComposite4135"
+ in2="offset"
+ in="SourceGraphic"
+ operator="over"
+ result="composite2" />
+ </filter>
+ <filter
+ id="filter3082"
+ style="color-interpolation-filters:sRGB;"
+ inkscape:label="Drop Shadow">
+ <feFlood
+ id="feFlood3084"
+ flood-opacity="0.604"
+ flood-color="rgb(0,0,0)"
+ result="flood" />
+ <feComposite
+ id="feComposite3086"
+ in2="SourceGraphic"
+ in="flood"
+ operator="in"
+ result="composite1" />
+ <feGaussianBlur
+ id="feGaussianBlur3088"
+ in="composite"
+ stdDeviation="6"
+ result="blur" />
+ <feOffset
+ id="feOffset3090"
+ dx="7.5"
+ dy="7.5"
+ result="offset" />
+ <feComposite
+ id="feComposite3092"
+ in2="offset"
+ in="SourceGraphic"
+ operator="over"
+ result="composite2" />
+ </filter>
+ </defs>
+ <sodipodi:namedview
+ inkscape:cy="184.51843"
+ inkscape:cx="98.017058"
+ inkscape:zoom="1.7366335"
+ inkscape:window-height="1177"
+ inkscape:window-width="1462"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ guidetolerance="10.0"
+ gridtolerance="10.0"
+ objecttolerance="10.0"
+ borderopacity="1.0"
+ bordercolor="#666666"
+ pagecolor="#ffffff"
+ id="base"
+ showgrid="false"
+ inkscape:window-x="225"
+ inkscape:window-y="54"
+ inkscape:current-layer="svg2"
+ inkscape:window-maximized="0"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="20"
+ fit-margin-bottom="20" />
+ <path
+ sodipodi:type="arc"
+ style="opacity:0.98999999000000005;fill:none;fill-opacity:1;stroke:#8a08e8;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0"
+ id="path3011"
+ sodipodi:cx="328.79059"
+ sodipodi:cy="127.97095"
+ sodipodi:rx="40.106342"
+ sodipodi:ry="37.459732"
+ d="m 368.89693,127.97095 a 40.106342,37.459732 0 1 1 -80.21268,0 40.106342,37.459732 0 1 1 80.21268,0 z" />
+ <g
+ id="g3032"
+ style="filter:url(#filter3082)">
+ <g
+ style="fill:url(#radialGradient3175);fill-opacity:1;stroke:url(#radialGradient3171);stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;"
+ id="g3"
+ transform="matrix(0.1,0,0,0.1,1.967113,2.4742836)">
+ <g
+ id="g5"
+ style="fill:url(#radialGradient3028);fill-opacity:1;fill-rule:evenodd;stroke:url(#radialGradient3030);stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;"
+ transform="translate(20.61545,-27.69425)">
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:url(#radialGradient3020);fill-opacity:1;stroke:url(#radialGradient3022);stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;"
+ id="path7"
+ d="m 931.07168,1164.597 248.86992,-331.80265 416.1687,1338.32935 286.6484,267.1042 -520.4224,0 -270.2797,-262.2181 0,-1033.0627 -160.98492,106.6818 -160.98492,-106.6818 0,1033.0627 -270.2797,262.2181 -520.4224,0 286.6484,-267.1042 416.1687,-1338.32935 248.86992,331.80265 z" />
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:url(#radialGradient3024);fill-opacity:1;stroke:url(#radialGradient3026);stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;"
+ id="path9"
+ d="m 931.07168,27.69425 224.03682,720.46517 -63.341,76.00913 L 931.07168,486.3269 770.37586,824.16855 707.03486,748.15942 931.07168,27.69425 z" />
+ </g>
+ </g>
+ <g
+ transform="translate(16.698976,134.16763)"
+ id="g3916">
+ <path
+ style="fill:#8a0ae8;fill-opacity:1;fill-rule:evenodd;stroke:#8a0ae8;stroke-width:8.48192120000000038;stroke-linecap:round;stroke-opacity:1;"
+ inkscape:connector-curvature="0"
+ d="m 117.80725,-96.247891 c 0,0 5.41921,5.552354 5.41921,16.111148 m -5.41921,16.044574 c 0,0 5.41921,-5.552354 5.41921,-16.111149"
+ id="path14345" />
+ <path
+ style="fill:#8a0ae8;fill-opacity:1;fill-rule:evenodd;stroke:#8a0ae8;stroke-width:8.48192120000000038;stroke-linecap:round;stroke-opacity:1;"
+ inkscape:connector-curvature="0"
+ d="m 136.30179,-112.33241 c 0,0 10.83841,11.11802 10.83841,32.235612 m -10.83841,32.089148 c 0,0 10.83841,-11.104709 10.83841,-32.222298"
+ id="path14347" />
+ <path
+ style="fill:#8a0ae8;fill-opacity:1;fill-rule:evenodd;stroke:#8a0ae8;stroke-width:8.48192120000000038;stroke-linecap:round;stroke-opacity:1;"
+ inkscape:connector-curvature="0"
+ d="m 156.46069,-128.40361 c 0,0 16.27093,16.65706 16.27093,48.333442 m -16.27093,48.147037 c 0,0 16.27093,-16.670379 16.27093,-48.346762"
+ id="path14349" />
+ </g>
+ <g
+ transform="translate(-17.850629,134.16763)"
+ id="g3911">
+ <path
+ style="fill:#8a0ae8;fill-opacity:1;fill-rule:evenodd;stroke:#8a0ae8;stroke-width:8.48192120000000038;stroke-linecap:round;stroke-opacity:1;"
+ inkscape:connector-curvature="0"
+ d="m 77.476121,-96.247891 c 0,0 -5.419205,5.552354 -5.419205,16.111148 m 5.419205,16.044574 c 0,0 -5.419205,-5.552354 -5.419205,-16.111149"
+ id="path14351" />
+ <path
+ style="fill:#8a0ae8;fill-opacity:1;fill-rule:evenodd;stroke:#8a0ae8;stroke-width:8.48192120000000038;stroke-linecap:round;stroke-opacity:1;"
+ inkscape:connector-curvature="0"
+ d="m 59.554132,-112.33241 c 0,0 -10.851724,11.11802 -10.851724,32.235612 m 10.851724,32.089148 c 0,0 -10.851724,-11.104709 -10.851724,-32.222298"
+ id="path14353" />
+ <path
+ style="fill:#8a0ae8;fill-opacity:1;fill-rule:evenodd;stroke:#8a0ae8;stroke-width:8.48192120000000038;stroke-linecap:round;stroke-opacity:1;"
+ inkscape:connector-curvature="0"
+ d="m 39.381908,-128.40361 c 0,0 -16.257613,16.65706 -16.257613,48.333442 m 16.257613,48.147037 c 0,0 -16.257613,-16.670379 -16.257613,-48.346762"
+ id="path14355" />
+ </g>
+ </g>
+</svg>
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/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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mime-info
+ xmlns="http://www.freedesktop.org/standards/shared-mime-info">
+ <mime-type type="application/vnd.altusmetrum.telemetry">
+ <comment>Altus Metrum Telemetry File</comment>
+ <glob pattern="*.telem"/>
+ </mime-type>
+ <mime-type type="application/vnd.altusmetrum.eeprom">
+ <comment>Altus Metrum Eeprom Log File</comment>
+ <glob pattern="*.eeprom"/>
+ </mime-type>
+ <mime-type type="application/vnd.altusmetrum.micropeak">
+ <comment>Altus Metrum MicroPeak Log File</comment>
+ <glob pattern="*.mpd"/>
+ </mime-type>
+</mime-info>
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; }
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 40984c5a..b1dc6cea 100644
--- a/micropeak/Info.plist.in
+++ b/micropeak/Info.plist.in
@@ -23,7 +23,22 @@
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleIconFile</key>
- <string>MicroPeak.icns</string>
+ <string>altusmetrum-micropeak.icns</string>
+ <key>CFBundleDocumentTypes</key>
+ <array>
+ <dict>
+ <key>CFBundleTypeName</key>
+ <string>MicroPeak data file</string>
+ <key>CFBundleTypeIconFile</key>
+ <string>application-vnd.altusmetrum.micropeak.icns</string>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>mpd</string>
+ </array>
+ <key>CFBundleTypeRole</key>
+ <string>Editor</string>
+ </dict>
+ </array>
<key>Java</key>
<dict>
<key>MainClass</key>
diff --git a/micropeak/Makefile.am b/micropeak/Makefile.am
index 216874df..6270fd74 100644
--- a/micropeak/Makefile.am
+++ b/micropeak/Makefile.am
@@ -56,26 +56,34 @@ 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
-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 = micropeak.desktop
+desktop_file = altusmetrum-micropeak.desktop
desktop_SCRIPTS = $(desktop_file)
all-local: micropeak-test micropeak-jdb $(JAR)
@@ -92,7 +100,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
@@ -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
@@ -272,7 +280,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/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<MicroDataPoint> {
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.app/Contents/Resources/MicroPeak.icns b/micropeak/MicroPeak.app/Contents/Resources/MicroPeak.icns
deleted file mode 100644
index 9ba83bf5..00000000
--- a/micropeak/MicroPeak.app/Contents/Resources/MicroPeak.icns
+++ /dev/null
Binary files differ
diff --git a/micropeak/MicroPeak.java b/micropeak/MicroPeak.java
index 19e91660..8bdf4b77 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 {
@@ -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/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/micropeak/micropeak.desktop.in b/micropeak/altusmetrum-micropeak.desktop.in
index abdf286f..782b4704 100644
--- a/micropeak/micropeak.desktop.in
+++ b/micropeak/altusmetrum-micropeak.desktop.in
@@ -1,10 +1,10 @@
[Desktop Entry]
Type=Application
Name=MicroPeak
-GenericName=MicroPeak download and analysis
+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=text/plain;
+MimeType=application/vnd.altusmetrum.micropeak
Categories=Education;Electronics;Science;
diff --git a/micropeak/micropeak-windows.nsi.in b/micropeak/micropeak-windows.nsi.in
index 6dc9d8c1..848523b0 100644
--- a/micropeak/micropeak-windows.nsi.in
+++ b/micropeak/micropeak-windows.nsi.in
@@ -1,19 +1,24 @@
-!addplugindir Instdrv/NSIS/Plugins
+!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 "Altus Metrum Windows Software"
+!include java.nsh
+!include refresh-sh.nsh
-Name "Altus Metrum MicroPeak Installer"
+!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"
; 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"
@@ -23,7 +28,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"
@@ -35,42 +40,14 @@ Function .onInit
${EndIf}
FunctionEnd
-Var JavaDownload
-Var JavaBits
-
-Function GetJRE
+Function un.onInit
+ DetailPrint "Checking host operating system"
${If} ${RunningX64}
- StrCpy $JavaDownload ${JRE64_URL}
- StrCpy $JavaBits "64"
- ${Else}
- StrCpy $JavaDownload ${JRE32_URL}
- StrCpy $JavaBits "32"
+ DetailPrint "Installer running on 64-bit host"
+ SetRegView 64
+ StrCpy $INSTDIR "$PROGRAMFILES64\AltusMetrum"
+ ${DisableX64FSRedirection}
${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
@@ -85,12 +62,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"
@@ -98,22 +84,13 @@ Section "MicroPeak Application"
File "*.dll"
- File "../icon/*.ico"
+ File "../icon/${WIN_APP_ICON}"
- 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\${WIN_APP_ICON}"
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\${WIN_APP_ICON}"
SectionEnd
Section "Documentation"
@@ -123,33 +100,79 @@ Section "Documentation"
File "../doc/micropeak.pdf"
SectionEnd
+Section "File Associations"
+
+ SetOutPath $INSTDIR
+
+ File "../icon/${WIN_APP_EXE}"
+ File "../icon/${WIN_MPD_EXE}"
+
+ ; application elements
+
+ 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_MPD}"
+ WriteRegStr HKCR ".mpd" "PerceivedType" "MicroPeak Data File"
+ WriteRegStr HKCR ".mpd" "Content Type" "application/vnd.altusmetrum.micropeak"
+
+ WriteRegStr HKCR ".mpd\OpenWithProgids" "${PROG_ID_MPD}" ""
+ WriteRegStr HKCR ".mpd\${PROG_ID_MPD}" "" "${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 "${PROG_ID_MPD}"
+
+ 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\${WIN_APP_ICON}"
+ Delete "$INSTDIR\${WIN_APP_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/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
# <path> contains the altusmetrum.inf file we ship. Make sure <path>
# is otherwise empty or inf2cat will get confused
inf2cat /driver:<path> /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
diff --git a/src/drivers/ao_aprs.c b/src/drivers/ao_aprs.c
index 8a1b6a4d..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 <ao.h>
+
+#if !HAS_APRS
+#error HAS_APRS not set
+#endif
#endif
#include <ao_aprs.h>
@@ -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,
@@ -261,6 +265,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 +280,9 @@ tncSetCallsign(void)
}
for (; i < TNC_CALLSIGN_LEN; i++)
TNC_AX25_HEADER[TNC_CALLSIGN_OFF + i] = ' ' << 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
}
@@ -302,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()
@@ -323,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.
@@ -339,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];
@@ -361,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;
@@ -381,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];
@@ -406,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;
@@ -426,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;
@@ -451,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;
@@ -460,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;
@@ -530,6 +538,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 +551,7 @@ static int tncComment(uint8_t *buf)
, main/10,
main%10
#endif
+ , ao_serial_number
);
#else
return sprintf((char *) buf,
@@ -759,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
@@ -192,6 +193,10 @@ _ao_config_get(void)
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;
@@ -817,6 +847,10 @@ __code struct ao_config_var ao_config_vars[] = {
{ "t <motion> <interval>\0Tracker configuration",
ao_config_tracker_set, ao_config_tracker_show },
#endif
+#if HAS_APRS
+ { "S <ssid>\0Set APRS SSID (0-15)",
+ ao_config_aprs_ssid_set, ao_config_aprs_ssid_show },
+#endif
{ "s\0Show",
ao_config_show, 0 },
#if HAS_EEPROM
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
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:
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:
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}
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 <math.h>
-
-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/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;
}
}
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 df05bb6e..89870a8c 100644
--- a/telegps/Info.plist.in
+++ b/telegps/Info.plist.in
@@ -23,7 +23,34 @@
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleIconFile</key>
- <string>TeleGPS.icns</string>
+ <string>altusmetrum-telegps.icns</string>
+ <key>CFBundleDocumentTypes</key>
+ <array>
+ <dict>
+ <key>CFBundleTypeName</key>
+ <string>Telemetry</string>
+ <key>CFBundleTypeIconFile</key>
+ <string>application-vnd.altusmetrum.telemetry.icns</string>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>telem</string>
+ </array>
+ <key>CFBundleTypeRole</key>
+ <string>Editor</string>
+ </dict>
+ <dict>
+ <key>CFBundleTypeName</key>
+ <string>Eeprom</string>
+ <key>CFBundleTypeIconFile</key>
+ <string>application-vnd.altusmetrum.eeprom.icns</string>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>eeprom</string>
+ </array>
+ <key>CFBundleTypeRole</key>
+ <string>Editor</string>
+ </dict>
+ </array>
<key>Java</key>
<dict>
<key>MainClass</key>
diff --git a/telegps/Makefile.am b/telegps/Makefile.am
index 7b550e9e..3f53b949 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
-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
@@ -89,7 +100,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 +117,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,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) 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/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,8 +205,6 @@ $(FATJAR): classtelegps.stamp Manifest-fat.txt $(ALTOSLIB_CLASS) $(ALTOSUILIB_CL
-C classes org \
-C ../libaltos libaltosJNI
-classaltosui.stamp: $(ALTOSLIB_CLASS) $(ALTOSUILIB_CLASS)
-
libaltos.so: build-libaltos
-rm -f "$@"
$(LN_S) ../libaltos/.libs/"$@" .
@@ -269,7 +278,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/TeleGPS.java b/telegps/TeleGPS.java
index 6e68dd30..e78c2124 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
@@ -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) {
@@ -409,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();
@@ -435,8 +458,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<AltosFlightDisplay>();
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..1fdfd70c 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
@@ -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<String> aprs_interval_value;
+ JComboBox<Integer> aprs_ssid_value;
JComboBox<String> flight_log_max_value;
JTextField callsign_value;
JComboBox<String> 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)");
@@ -257,7 +272,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++;
@@ -337,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<Integer>(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;
@@ -782,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;
+ }
}
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 {
diff --git a/telegps/telegps.desktop.in b/telegps/altusmetrum-telegps.desktop.in
index 3d249d8a..7a1b3536 100644
--- a/telegps/telegps.desktop.in
+++ b/telegps/altusmetrum-telegps.desktop.in
@@ -3,8 +3,8 @@ 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=text/plain;
+MimeType=application/vnd.altusmetrum.telemetry;application/vnd.altusmetrum.eeprom
Categories=Education;Electronics;Science;
diff --git a/telegps/telegps-windows.nsi.in b/telegps/telegps-windows.nsi.in
index e6798c46..603d4971 100644
--- a/telegps/telegps-windows.nsi.in
+++ b/telegps/telegps-windows.nsi.in
@@ -1,19 +1,25 @@
!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
+!include refresh-sh.nsh
-Name "TeleGPS Installer"
+!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"
; 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"
@@ -23,7 +29,7 @@ RequestExecutionLevel admin
ShowInstDetails Show
-ComponentText "TeleGPS Software Installer"
+ComponentText "${REG_NAME} Software and Driver Installer"
Function .onInit
DetailPrint "Checking host operating system"
@@ -35,43 +41,14 @@ Function .onInit
${EndIf}
FunctionEnd
-Var JavaDownload
-Var JavaBits
-
-Function GetJRE
+Function un.onInit
+ DetailPrint "Checking host operating system"
${If} ${RunningX64}
- StrCpy $JavaDownload ${JRE64_URL}
- StrCpy $JavaBits "64"
- ${Else}
- StrCpy $JavaDownload ${JRE32_URL}
- StrCpy $JavaBits "32"
+ DetailPrint "Installer running on 64-bit host"
+ SetRegView 64
+ StrCpy $INSTDIR "$PROGRAMFILES64\AltusMetrum"
+ ${DisableX64FSRedirection}
${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
@@ -109,12 +86,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"
@@ -129,13 +106,13 @@ Section "TeleGPS Application"
File "*.dll"
- File "../icon/*.ico"
+ File "../icon/${WIN_APP_ICON}"
- 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\${WIN_APP_ICON}"
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\${WIN_APP_ICON}"
SectionEnd
Section "TeleGPS, TeleDongle and TeleBT Firmware"
@@ -157,38 +134,105 @@ Section "Documentation"
File "../doc/telemetry.pdf"
SectionEnd
+Section "File Associations"
+
+ ${DisableX64FSRedirection}
+
+ SetOutPath $INSTDIR
+
+ File "../icon/${WIN_APP_EXE}"
+ File "../icon/${WIN_TELEM_EXE}"
+ File "../icon/${WIN_EEPROM_EXE}"
+
+ 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 "${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/vnd.altusmetrum.eeprom"
+
+ WriteRegStr HKCR ".eeprom\OpenWithProgids" "${PROG_ID_EEPROM}" ""
+ WriteRegStr HKCR ".eeprom\${PROG_ID_EEPROM}" "" "${REG_NAME}"
+
+ ; .telem elements
+
+ 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/vnd.altusmetrum.telemetry"
+
+ WriteRegStr HKCR ".telem\OpenWithProgids" "${PROG_ID_TELEM}" ""
+ WriteRegStr HKCR ".telem\${PROG_ID_TELEM}" "" "${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_EEPROM}"
+ DeleteRegKey HKCR "${PROG_ID_TELEM}"
+
+ DeleteRegKey HKCR ".eeprom\${PROG_ID_EEPROM}"
+ DeleteRegValue HKCR ".eeprom\OpenWithProgids" "${PROG_ID_EEPROM}"
+
+ 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\${WIN_APP_ICON}"
+ Delete "$INSTDIR\${WIN_APP_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