From ac12e77e3dffc9e9ddb1578a38b32783ad64e940 Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Thu, 19 Dec 2013 03:22:21 -0700 Subject: updated notes from 1.3 release --- Releasing | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/Releasing b/Releasing index 1711779d..8627d864 100644 --- a/Releasing +++ b/Releasing @@ -18,13 +18,13 @@ These are Bdale's notes on how to do a release. - if this is an x.y release, then: git checkout -b branch- git tag -a + - edit .git/gbp.conf to use branch- as upstream + - if this is an x.y.z release, then: git checkout branch- # the x.y parts only git merge master git tag -a # full x.y.z version - - edit .git/gbp.conf to use branch- as upstream if needed - git checkout debian git merge branch- @@ -35,9 +35,10 @@ These are Bdale's notes on how to do a release. git commit -n debian/changelog -m "update changelog for Debian build" - if this is a -1 release, then - git-buildpackage --git-no-pristine-tar --git-submodules + git-buildpackage --git-no-pristine-tar --git-submodules \ + --git-upstream-branch=branch- pristine-tar commit \ - ../build-area/altos/altos_.orig.tar.gz \ + ../build-area/altos_.orig.tar.gz \ branch- else if this is not a -1 release git-buildpackage --git-submodules @@ -57,16 +58,20 @@ These are Bdale's notes on how to do a release. - copy the relevant release notes file from doc/ to /home/bdale/web/altusmetrum/AltOS/releases/ - - go edit ~/web/altusmetrum/AltOS/releases/.mdwn to include - release date and explicit ref to dir contents so the AltOS page - shows versioned links, commit and push + - create /home/bdale/web/altusmetrum/MicroPeak/releases/, + and move the MicroPeak installers from AltOS/releases to there + + - go edit ~/web/altusmetrum/AltOS/releases/.mdwn and + /home/bdale/web/altusmetrum/MicroPeak/releases/.mdwn, to + include release date and explicit ref to dir contents so the + web pages shows versioned links, commit and push (cd doc ; make publish) this pushes fresh documents to the web site sudo debian/rules clean - git push origin master branch-1.1 debian + git push origin master branch- debian git push --tags push commits and leave the build tree in an uncluttered state -- cgit v1.2.3 From 96f2ae5fc0d3bf88704d2ae1b4df5dc6aefc523b Mon Sep 17 00:00:00 2001 From: Mike Beattie Date: Fri, 20 Dec 2013 15:05:42 +1300 Subject: altosdroid: force older jarsigner signing algorithm for java 1.7 (increment versionCode, re-upload to Play Store) Signed-off-by: Mike Beattie --- altosdroid/AndroidManifest.xml | 2 +- altosdroid/Makefile.am | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/altosdroid/AndroidManifest.xml b/altosdroid/AndroidManifest.xml index 06644fbb..0c72c1ae 100644 --- a/altosdroid/AndroidManifest.xml +++ b/altosdroid/AndroidManifest.xml @@ -17,7 +17,7 @@ --> diff --git a/altosdroid/Makefile.am b/altosdroid/Makefile.am index 0473c17a..c4bc5b93 100644 --- a/altosdroid/Makefile.am +++ b/altosdroid/Makefile.am @@ -73,7 +73,8 @@ bin/AltosDroid-release-unsigned.apk: $(SRC) $(ALTOSLIB) $(SUPPORT_V4) $(GOOGLE_P ant release release: bin/AltosDroid-release-unsigned.apk - jarsigner -keystore release.keystore \ + jarsigner -sigalg SHA1withDSA -digestalg SHA1 \ + -keystore release.keystore \ -signedjar bin/AltosDroid-release-signed.apk \ bin/AltosDroid-release-unsigned.apk AltosDroid $(ZIPALIGN) -f 4 \ -- cgit v1.2.3 From 0e3b3ce66035e8a90fd708d9a4bc01370174c9eb Mon Sep 17 00:00:00 2001 From: Mike Beattie Date: Fri, 20 Dec 2013 15:06:07 +1300 Subject: altosdroid: update to latest google play services Signed-off-by: Mike Beattie --- altosdroid/AndroidManifest.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/altosdroid/AndroidManifest.xml b/altosdroid/AndroidManifest.xml index 0c72c1ae..02507bb9 100644 --- a/altosdroid/AndroidManifest.xml +++ b/altosdroid/AndroidManifest.xml @@ -32,6 +32,7 @@ + @@ -58,5 +59,7 @@ + -- cgit v1.2.3 From 2ad31bad20b20615e9d8b29088e2488fddc81ac9 Mon Sep 17 00:00:00 2001 From: Mike Beattie Date: Fri, 20 Dec 2013 15:06:37 +1300 Subject: altosdroid: improve build system dependencies Signed-off-by: Mike Beattie --- altosdroid/Makefile.am | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/altosdroid/Makefile.am b/altosdroid/Makefile.am index c4bc5b93..1590e0c9 100644 --- a/altosdroid/Makefile.am +++ b/altosdroid/Makefile.am @@ -29,7 +29,7 @@ SUPPORT_V4=$(EXT_LIBDIR)/$(SUPPORT_V4_JAR) GOOGLE_PLAY_SERVICES_LIB_SRCDIR=$(SDK)/extras/google/google_play_services/libproject GOOGLE_PLAY_SERVICES_LIB=google-play-services_lib -JAVA_SRC=$(JAVA_SRC_DIR)/*.java +JAVA_SRC=$(JAVA_SRC_DIR)/*.java $(JAVA_SRC_DIR)/BuildInfo.java DRAWABLES=\ $(DRAWABLE_DIR)/redled.png \ @@ -53,7 +53,7 @@ $(GOOGLE_PLAY_SERVICES_LIB): $(GOOGLE_PLAY_SERVICES_LIB_SRCDIR)/$(GOOGLE_PLAY_SE cp -a $(GOOGLE_PLAY_SERVICES_LIB_SRCDIR)/$(GOOGLE_PLAY_SERVICES_LIB) . cd $(GOOGLE_PLAY_SERVICES_LIB) && $(SDK)/tools/android update project --target $(SDK_TARGET) --path . -$(JAVA_SRC_DIR)/BuildInfo.java: $(JAVA_SRC) +$(JAVA_SRC_DIR)/BuildInfo.java: $(filter-out $(JAVA_SRC_DIR)/BuildInfo.java,$(shell echo $(JAVA_SRC))) ./buildinfo.sh $(DRAWABLE_DIR)/%.png: ../icon/%.png @@ -72,7 +72,7 @@ bin/AltosDroid-debug.apk: $(SRC) $(ALTOSLIB) $(SUPPORT_V4) $(GOOGLE_PLAY_SERVICE bin/AltosDroid-release-unsigned.apk: $(SRC) $(ALTOSLIB) $(SUPPORT_V4) $(GOOGLE_PLAY_SERVICES_LIB) ant release -release: bin/AltosDroid-release-unsigned.apk +bin/AltosDroid-release.apk: bin/AltosDroid-release-unsigned.apk jarsigner -sigalg SHA1withDSA -digestalg SHA1 \ -keystore release.keystore \ -signedjar bin/AltosDroid-release-signed.apk \ @@ -81,10 +81,13 @@ release: bin/AltosDroid-release-unsigned.apk bin/AltosDroid-release-signed.apk \ bin/AltosDroid-release.apk +release: bin/AltosDroid-release.apk + clean-local: $(GOOGLE_PLAY_SERVICES_LIB) ant clean - rm -rf $(EXT_LIBDIR) + rm -f $(JAVA_SRC_DIR)/BuildInfo.java rm -f $(DRAWABLES) + rm -rf $(EXT_LIBDIR) rm -rf $(GOOGLE_PLAY_SERVICES_LIB) else -- cgit v1.2.3 From 91bcfae2e64ecb2e7de1292b264910382b635aea Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 20 Dec 2013 19:37:08 -0800 Subject: altoslib: Convert IMU and Mag sensor values to useful units Convert from raw sensor values to metric units Signed-off-by: Keith Packard --- altoslib/AltosEepromMega.java | 18 ++++++++--------- altoslib/AltosIMU.java | 36 ++++++++++++++++++++++------------ altoslib/AltosMag.java | 18 +++++++++++------ altoslib/AltosTelemetryMegaSensor.java | 18 ++++++++--------- 4 files changed, 54 insertions(+), 36 deletions(-) diff --git a/altoslib/AltosEepromMega.java b/altoslib/AltosEepromMega.java index 7a4ee52d..47013b5e 100644 --- a/altoslib/AltosEepromMega.java +++ b/altoslib/AltosEepromMega.java @@ -115,19 +115,19 @@ public class AltosEepromMega extends AltosEeprom { state.set_ms5607(pres(), temp()); AltosIMU imu = new AltosIMU(); - imu.accel_x = accel_x(); - imu.accel_y = accel_y(); - imu.accel_z = accel_z(); + imu.accel_x = AltosIMU.convert_accel(accel_x()); + imu.accel_y = AltosIMU.convert_accel(accel_y()); + imu.accel_z = AltosIMU.convert_accel(accel_z()); - imu.gyro_x = gyro_x(); - imu.gyro_y = gyro_y(); - imu.gyro_z = gyro_z(); + imu.gyro_x = AltosIMU.convert_gyro(gyro_x()); + imu.gyro_y = AltosIMU.convert_gyro(gyro_y()); + imu.gyro_z = AltosIMU.convert_gyro(gyro_z()); state.imu = imu; AltosMag mag = new AltosMag(); - mag.x = mag_x(); - mag.y = mag_y(); - mag.z = mag_z(); + mag.x = AltosMag.convert_gauss(mag_x()); + mag.y = AltosMag.convert_gauss(mag_y()); + mag.z = AltosMag.convert_gauss(mag_z()); state.mag = mag; diff --git a/altoslib/AltosIMU.java b/altoslib/AltosIMU.java index 6d88ccae..e6e70401 100644 --- a/altoslib/AltosIMU.java +++ b/altoslib/AltosIMU.java @@ -20,13 +20,25 @@ package org.altusmetrum.altoslib_2; import java.util.concurrent.*; public class AltosIMU implements Cloneable { - public int accel_x; - public int accel_y; - public int accel_z; + public double accel_x; + public double accel_y; + public double accel_z; - public int gyro_x; - public int gyro_y; - public int gyro_z; + public double gyro_x; + public double gyro_y; + public double gyro_z; + + public static int counts_per_g = 2048; + + public static double convert_accel(int counts) { + return (double) counts / (double) counts_per_g * (-AltosConvert.GRAVITATIONAL_ACCELERATION); + } + + public static double counts_per_degsec = 16.4; + + public static double convert_gyro(int counts) { + return (double) counts / counts_per_degsec; + } public boolean parse_string(String line) { if (!line.startsWith("Accel:")) @@ -35,12 +47,12 @@ public class AltosIMU implements Cloneable { String[] items = line.split("\\s+"); if (items.length >= 8) { - accel_x = Integer.parseInt(items[1]); - accel_y = Integer.parseInt(items[2]); - accel_z = Integer.parseInt(items[3]); - gyro_x = Integer.parseInt(items[5]); - gyro_y = Integer.parseInt(items[6]); - gyro_z = Integer.parseInt(items[7]); + accel_x = convert_accel(Integer.parseInt(items[1])); + accel_y = convert_accel(Integer.parseInt(items[2])); + accel_z = convert_accel(Integer.parseInt(items[3])); + gyro_x = convert_gyro(Integer.parseInt(items[5])); + gyro_y = convert_gyro(Integer.parseInt(items[6])); + gyro_z = convert_gyro(Integer.parseInt(items[7])); } return true; } diff --git a/altoslib/AltosMag.java b/altoslib/AltosMag.java index 89e72bd6..5136bfd2 100644 --- a/altoslib/AltosMag.java +++ b/altoslib/AltosMag.java @@ -20,9 +20,15 @@ package org.altusmetrum.altoslib_2; import java.util.concurrent.*; public class AltosMag implements Cloneable { - public int x; - public int y; - public int z; + public double x; + public double y; + public double z; + + public static double counts_per_gauss = 1090; + + public static double convert_gauss(int counts) { + return (double) counts / counts_per_gauss; + } public boolean parse_string(String line) { // if (line.startsWith("Syntax error")) { @@ -36,9 +42,9 @@ public class AltosMag implements Cloneable { String[] items = line.split("\\s+"); if (items.length >= 6) { - x = Integer.parseInt(items[1]); - y = Integer.parseInt(items[3]); - z = Integer.parseInt(items[5]); + x = convert_gauss(Integer.parseInt(items[1])); + y = convert_gauss(Integer.parseInt(items[3])); + z = convert_gauss(Integer.parseInt(items[5])); } return true; } diff --git a/altoslib/AltosTelemetryMegaSensor.java b/altoslib/AltosTelemetryMegaSensor.java index 23b67af8..8afabd30 100644 --- a/altoslib/AltosTelemetryMegaSensor.java +++ b/altoslib/AltosTelemetryMegaSensor.java @@ -63,21 +63,21 @@ public class AltosTelemetryMegaSensor extends AltosTelemetryStandard { AltosIMU imu = new AltosIMU(); - imu.accel_x = accel_x; - imu.accel_y = accel_y; - imu.accel_z = accel_z; + imu.accel_x = AltosIMU.convert_accel(accel_x); + imu.accel_y = AltosIMU.convert_accel(accel_y); + imu.accel_z = AltosIMU.convert_accel(accel_z); - imu.gyro_x = gyro_x; - imu.gyro_y = gyro_y; - imu.gyro_z = gyro_z; + imu.gyro_x = AltosIMU.convert_gyro(gyro_x); + imu.gyro_y = AltosIMU.convert_gyro(gyro_y); + imu.gyro_z = AltosIMU.convert_gyro(gyro_z); state.imu = imu; AltosMag mag = new AltosMag(); - mag.x = mag_x; - mag.y = mag_y; - mag.z = mag_z; + mag.x = AltosMag.convert_gauss(mag_x); + mag.y = AltosMag.convert_gauss(mag_y); + mag.z = AltosMag.convert_gauss(mag_z); state.mag = mag; } -- cgit v1.2.3 From 796cb90e3241103f79ae12565cf6f0dad21cb57c Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 20 Dec 2013 19:38:29 -0800 Subject: altoslib: Fetch 'orient' value from Mega Sensor packet The mega sensor packet had a spare byte to hold the current orientation value. Signed-off-by: Keith Packard --- altoslib/AltosState.java | 13 +++++++++++++ altoslib/AltosTelemetryMegaSensor.java | 5 +++++ 2 files changed, 18 insertions(+) diff --git a/altoslib/AltosState.java b/altoslib/AltosState.java index 6d55b833..4ddcc4ed 100644 --- a/altoslib/AltosState.java +++ b/altoslib/AltosState.java @@ -464,6 +464,16 @@ public class AltosState implements Cloneable { return acceleration.max(); } + public AltosValue orient; + + public void set_orient(double new_orient) { + orient.set(new_orient, time); + } + + public double orient() { + return orient.value(); + } + public AltosValue kalman_height, kalman_speed, kalman_acceleration; public void set_kalman(double height, double speed, double acceleration) { @@ -560,6 +570,7 @@ public class AltosState implements Cloneable { pressure = new AltosPressure(); speed = new AltosSpeed(); acceleration = new AltosAccel(); + orient = new AltosValue(); temperature = AltosLib.MISSING; battery_voltage = AltosLib.MISSING; @@ -621,6 +632,7 @@ public class AltosState implements Cloneable { pressure.finish_update(); speed.finish_update(); acceleration.finish_update(); + orient.finish_update(); kalman_height.finish_update(); kalman_speed.finish_update(); @@ -665,6 +677,7 @@ public class AltosState implements Cloneable { pressure.copy(old.pressure); speed.copy(old.speed); acceleration.copy(old.acceleration); + orient.copy(old.orient); battery_voltage = old.battery_voltage; pyro_voltage = old.pyro_voltage; diff --git a/altoslib/AltosTelemetryMegaSensor.java b/altoslib/AltosTelemetryMegaSensor.java index 8afabd30..3c4f1f8f 100644 --- a/altoslib/AltosTelemetryMegaSensor.java +++ b/altoslib/AltosTelemetryMegaSensor.java @@ -34,9 +34,12 @@ public class AltosTelemetryMegaSensor extends AltosTelemetryStandard { int mag_y; int mag_z; + int orient; + public AltosTelemetryMegaSensor(int[] bytes) { super(bytes); + orient = int8(5); accel = int16(6); pres = int32(8); temp = int16(12); @@ -61,6 +64,8 @@ public class AltosTelemetryMegaSensor extends AltosTelemetryStandard { state.set_pressure(pres); state.set_temperature(temp / 100.0); + state.set_orient(orient); + AltosIMU imu = new AltosIMU(); imu.accel_x = AltosIMU.convert_accel(accel_x); -- cgit v1.2.3 From f65880cf5bfcba5005c32db2b300448e585f3e45 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 20 Dec 2013 19:39:40 -0800 Subject: altosuilib: Rearrange graph enable buttons Eliminate separate 'enable' radio button, provide for multiple columns Signed-off-by: Keith Packard --- altosuilib/AltosUIEnable.java | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/altosuilib/AltosUIEnable.java b/altosuilib/AltosUIEnable.java index 84803c0e..36885611 100644 --- a/altosuilib/AltosUIEnable.java +++ b/altosuilib/AltosUIEnable.java @@ -39,10 +39,12 @@ public class AltosUIEnable extends Container { Insets il, ir; int y; + int x; + + static final int max_rows = 14; class GraphElement implements ActionListener { AltosUIGrapher grapher; - JLabel label; JRadioButton enable; String name; @@ -53,8 +55,7 @@ public class AltosUIEnable extends Container { GraphElement (String name, AltosUIGrapher grapher, boolean enabled) { this.name = name; this.grapher = grapher; - label = new JLabel(name); - enable = new JRadioButton("Enable", enabled); + enable = new JRadioButton(name, enabled); grapher.set_enable(enabled); enable.addActionListener(this); } @@ -63,18 +64,11 @@ public class AltosUIEnable extends Container { public void add(String name, AltosUIGrapher grapher, boolean enabled) { GraphElement e = new GraphElement(name, grapher, enabled); - - /* Add label */ GridBagConstraints c = new GridBagConstraints(); - c.gridx = 0; c.gridy = y; - c.fill = GridBagConstraints.NONE; - c.anchor = GridBagConstraints.LINE_START; - c.insets = il; - add(e.label, c); - /* Add radio button */ + /* Add element */ c = new GridBagConstraints(); - c.gridx = 1; c.gridy = y; + c.gridx = x; c.gridy = y; c.fill = GridBagConstraints.HORIZONTAL; c.anchor = GridBagConstraints.CENTER; c.insets = ir; @@ -82,19 +76,17 @@ public class AltosUIEnable extends Container { /* Next row */ y++; + if (y == max_rows) { + x++; + y = 0; + } } public void add_units() { /* Imperial units setting */ - /* Add label */ - GridBagConstraints c = new GridBagConstraints(); - c.gridx = 0; c.gridy = 1000; - c.fill = GridBagConstraints.NONE; - c.anchor = GridBagConstraints.LINE_START; - c.insets = il; - add(new JLabel("Imperial Units"), c); - JRadioButton imperial_units = new JRadioButton("Enable", AltosUIPreferences.imperial_units()); + /* Add label */ + JRadioButton imperial_units = new JRadioButton("Imperial Units", AltosUIPreferences.imperial_units()); imperial_units.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JRadioButton item = (JRadioButton) e.getSource(); @@ -103,8 +95,8 @@ public class AltosUIEnable extends Container { } }); imperial_units.setToolTipText("Use Imperial units instead of metric"); - c = new GridBagConstraints(); - c.gridx = 1; c.gridy = 1000; + GridBagConstraints c = new GridBagConstraints(); + c.gridx = 0; c.gridy = 1000; c.fill = GridBagConstraints.NONE; c.anchor = GridBagConstraints.LINE_START; c.insets = il; @@ -114,6 +106,7 @@ public class AltosUIEnable extends Container { public AltosUIEnable() { il = new Insets(4,4,4,4); ir = new Insets(4,4,4,4); + x = 0; y = 0; setLayout(new GridBagLayout()); add_units(); -- cgit v1.2.3 From 8e5f3b922100f9de54b9650df14749e81b1a6562 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 20 Dec 2013 19:40:31 -0800 Subject: altosui: Add imu and mag sensor values to plots Makes for a lot of potential graph elements. Signed-off-by: Keith Packard --- altosui/AltosFlightStats.java | 12 +++ altosui/AltosGraph.java | 153 +++++++++++++++++++++++++++++++++++++++ altosui/AltosGraphDataPoint.java | 62 ++++++++++++++++ 3 files changed, 227 insertions(+) diff --git a/altosui/AltosFlightStats.java b/altosui/AltosFlightStats.java index 552210c3..b3ee14ac 100644 --- a/altosui/AltosFlightStats.java +++ b/altosui/AltosFlightStats.java @@ -38,6 +38,9 @@ public class AltosFlightStats { boolean has_gps; boolean has_other_adc; boolean has_rssi; + boolean has_imu; + boolean has_mag; + boolean has_orient; double landed_time(AltosStateIterable states) { AltosState state = null; @@ -108,6 +111,9 @@ public class AltosFlightStats { has_gps = false; has_other_adc = false; has_rssi = false; + has_imu = false; + has_mag = false; + has_orient = false; for (AltosState state : states) { if (serial == AltosLib.MISSING && state.serial != AltosLib.MISSING) serial = state.serial; @@ -157,6 +163,12 @@ public class AltosFlightStats { lon = state.gps.lon; has_gps = true; } + if (state.imu != null) + has_imu = true; + if (state.mag != null) + has_mag = true; + if (state.orient() != AltosLib.MISSING) + has_orient = true; } for (int s = Altos.ao_flight_startup; s <= Altos.ao_flight_landed; s++) { if (state_count[s] > 0) { diff --git a/altosui/AltosGraph.java b/altosui/AltosGraph.java index c505d2d8..fa1a5b72 100644 --- a/altosui/AltosGraph.java +++ b/altosui/AltosGraph.java @@ -127,6 +127,75 @@ class AltosDbm extends AltosUnits { } } +class AltosGyroUnits extends AltosUnits { + + public double value(double p, boolean imperial_units) { + return p; + } + + public double inverse(double p, boolean imperial_units) { + return p; + } + + public String show_units(boolean imperial_units) { + return "°/sec"; + } + + public String say_units(boolean imperial_units) { + return "degrees per second"; + } + + public int show_fraction(int width, boolean imperial_units) { + return 1; + } +} + +class AltosOrientUnits extends AltosUnits { + + public double value(double p, boolean imperial_units) { + return p; + } + + public double inverse(double p, boolean imperial_units) { + return p; + } + + public String show_units(boolean imperial_units) { + return "°"; + } + + public String say_units(boolean imperial_units) { + return "degrees"; + } + + public int show_fraction(int width, boolean imperial_units) { + return 1; + } +} + +class AltosMagUnits extends AltosUnits { + + public double value(double p, boolean imperial_units) { + return p; + } + + public double inverse(double p, boolean imperial_units) { + return p; + } + + public String show_units(boolean imperial_units) { + return "Ga"; + } + + public String say_units(boolean imperial_units) { + return "gauss"; + } + + public int show_fraction(int width, boolean imperial_units) { + return 2; + } +} + public class AltosGraph extends AltosUIGraph { static final private Color height_color = new Color(194,31,31); @@ -146,14 +215,28 @@ public class AltosGraph extends AltosUIGraph { static final private Color temperature_color = new Color (31, 194, 194); static final private Color dbm_color = new Color(31, 100, 100); static final private Color state_color = new Color(0,0,0); + static final private Color accel_x_color = new Color(255, 0, 0); + static final private Color accel_y_color = new Color(0, 255, 0); + static final private Color accel_z_color = new Color(0, 0, 255); + static final private Color gyro_x_color = new Color(192, 0, 0); + static final private Color gyro_y_color = new Color(0, 192, 0); + static final private Color gyro_z_color = new Color(0, 0, 192); + static final private Color mag_x_color = new Color(128, 0, 0); + static final private Color mag_y_color = new Color(0, 128, 0); + static final private Color mag_z_color = new Color(0, 0, 128); + static final private Color orient_color = new Color(31, 31, 31); static AltosVoltage voltage_units = new AltosVoltage(); static AltosPressure pressure_units = new AltosPressure(); static AltosNsat nsat_units = new AltosNsat(); static AltosDbm dbm_units = new AltosDbm(); + static AltosGyroUnits gyro_units = new AltosGyroUnits(); + static AltosOrientUnits orient_units = new AltosOrientUnits(); + static AltosMagUnits mag_units = new AltosMagUnits(); AltosUIAxis height_axis, speed_axis, accel_axis, voltage_axis, temperature_axis, nsat_axis, dbm_axis; AltosUIAxis distance_axis, pressure_axis; + AltosUIAxis gyro_axis, orient_axis, mag_axis; public AltosGraph(AltosUIEnable enable, AltosFlightStats stats, AltosGraphDataSet dataSet) { super(enable); @@ -169,6 +252,10 @@ public class AltosGraph extends AltosUIGraph { dbm_axis = newAxis("Signal Strength", dbm_units, dbm_color, 0); distance_axis = newAxis("Distance", AltosConvert.distance, range_color); + gyro_axis = newAxis("Rotation Rate", gyro_units, gyro_z_color, 0); + orient_axis = newAxis("Tilt Angle", orient_units, orient_color, 0); + mag_axis = newAxis("Magnetic Field", mag_units, mag_x_color, 0); + addMarker("State", AltosGraphDataPoint.data_state, state_color); addSeries("Height", AltosGraphDataPoint.data_height, @@ -260,6 +347,72 @@ public class AltosGraph extends AltosUIGraph { voltage_axis); } + if (stats.has_imu) { + addSeries("Acceleration X", + AltosGraphDataPoint.data_accel_x, + AltosConvert.accel, + accel_x_color, + false, + accel_axis); + addSeries("Acceleration Y", + AltosGraphDataPoint.data_accel_y, + AltosConvert.accel, + accel_y_color, + false, + accel_axis); + addSeries("Acceleration Z", + AltosGraphDataPoint.data_accel_z, + AltosConvert.accel, + accel_z_color, + false, + accel_axis); + addSeries("Rotation Rate X", + AltosGraphDataPoint.data_gyro_x, + gyro_units, + gyro_x_color, + false, + gyro_axis); + addSeries("Rotation Rate Y", + AltosGraphDataPoint.data_gyro_y, + gyro_units, + gyro_y_color, + false, + gyro_axis); + addSeries("Rotation Rate Z", + AltosGraphDataPoint.data_gyro_z, + gyro_units, + gyro_z_color, + false, + gyro_axis); + } + if (stats.has_mag) { + addSeries("Magnetometer X", + AltosGraphDataPoint.data_mag_x, + mag_units, + mag_x_color, + false, + mag_axis); + addSeries("Magnetometer Y", + AltosGraphDataPoint.data_mag_y, + mag_units, + mag_y_color, + false, + mag_axis); + addSeries("Magnetometer Z", + AltosGraphDataPoint.data_mag_z, + mag_units, + mag_z_color, + false, + mag_axis); + } + if (stats.has_orient) + addSeries("Tilt Angle", + AltosGraphDataPoint.data_orient, + orient_units, + orient_color, + false, + orient_axis); + setDataSet(dataSet); } } \ No newline at end of file diff --git a/altosui/AltosGraphDataPoint.java b/altosui/AltosGraphDataPoint.java index d8191f5d..b2782459 100644 --- a/altosui/AltosGraphDataPoint.java +++ b/altosui/AltosGraphDataPoint.java @@ -40,6 +40,16 @@ public class AltosGraphDataPoint implements AltosUIDataPoint { public static final int data_range = 13; public static final int data_distance = 14; public static final int data_pressure = 15; + public static final int data_accel_x = 16; + public static final int data_accel_y = 17; + public static final int data_accel_z = 18; + public static final int data_gyro_x = 19; + public static final int data_gyro_y = 20; + public static final int data_gyro_z = 21; + public static final int data_mag_x = 22; + public static final int data_mag_y = 23; + public static final int data_mag_z = 24; + public static final int data_orient = 25; public double x() throws AltosUIDataMissing { double time = state.time_since_boost(); @@ -99,6 +109,58 @@ public class AltosGraphDataPoint implements AltosUIDataPoint { case data_pressure: y = state.pressure(); break; + + case data_accel_x: + case data_accel_y: + case data_accel_z: + case data_gyro_x: + case data_gyro_y: + case data_gyro_z: + AltosIMU imu = state.imu; + if (imu == null) + break; + switch (index) { + case data_accel_x: + y = imu.accel_x; + break; + case data_accel_y: + y = imu.accel_y; + break; + case data_accel_z: + y = imu.accel_z; + break; + case data_gyro_x: + y = imu.gyro_x; + break; + case data_gyro_y: + y = imu.gyro_y; + break; + case data_gyro_z: + y = imu.gyro_z; + break; + } + break; + case data_mag_x: + case data_mag_y: + case data_mag_z: + AltosMag mag = state.mag; + if (mag == null) + break; + switch (index) { + case data_mag_x: + y = mag.x; + break; + case data_mag_y: + y = mag.y; + break; + case data_mag_z: + y = mag.z; + break; + } + break; + case data_orient: + y = state.orient(); + break; } if (y == AltosLib.MISSING) throw new AltosUIDataMissing(index); -- cgit v1.2.3 From b89fb51a963635e2effe3a31f803bfc29c2c46b7 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 20 Dec 2013 19:44:38 -0800 Subject: altoslib: Bump library version Prepare for next release by making sure we notice that the API/ABI for this library has changed. Signed-off-by: Keith Packard --- altosdroid/src/org/altusmetrum/AltosDroid/AltosBluetooth.java | 2 +- altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java | 2 +- altosdroid/src/org/altusmetrum/AltosDroid/AltosDroidPreferences.java | 2 +- altosdroid/src/org/altusmetrum/AltosDroid/AltosDroidTab.java | 2 +- altosdroid/src/org/altusmetrum/AltosDroid/AltosVoice.java | 2 +- altosdroid/src/org/altusmetrum/AltosDroid/TabAscent.java | 2 +- altosdroid/src/org/altusmetrum/AltosDroid/TabDescent.java | 2 +- altosdroid/src/org/altusmetrum/AltosDroid/TabLanded.java | 2 +- altosdroid/src/org/altusmetrum/AltosDroid/TabMap.java | 2 +- altosdroid/src/org/altusmetrum/AltosDroid/TabPad.java | 2 +- altosdroid/src/org/altusmetrum/AltosDroid/TelemetryLogger.java | 2 +- altosdroid/src/org/altusmetrum/AltosDroid/TelemetryReader.java | 2 +- altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java | 2 +- altoslib/AltosAccel.java | 2 +- altoslib/AltosCRCException.java | 2 +- altoslib/AltosCompanion.java | 2 +- altoslib/AltosConfigData.java | 2 +- altoslib/AltosConfigValues.java | 2 +- altoslib/AltosConvert.java | 2 +- altoslib/AltosDebug.java | 2 +- altoslib/AltosDistance.java | 2 +- altoslib/AltosEeprom.java | 2 +- altoslib/AltosEepromChunk.java | 2 +- altoslib/AltosEepromDownload.java | 2 +- altoslib/AltosEepromFile.java | 2 +- altoslib/AltosEepromHeader.java | 2 +- altoslib/AltosEepromIterable.java | 2 +- altoslib/AltosEepromList.java | 2 +- altoslib/AltosEepromLog.java | 2 +- altoslib/AltosEepromMega.java | 2 +- altoslib/AltosEepromMetrum2.java | 2 +- altoslib/AltosEepromMini.java | 2 +- altoslib/AltosEepromMonitor.java | 2 +- altoslib/AltosEepromTM.java | 2 +- altoslib/AltosEepromTm.java | 2 +- altoslib/AltosFile.java | 2 +- altoslib/AltosFlash.java | 2 +- altoslib/AltosFlashListener.java | 2 +- altoslib/AltosFlightReader.java | 2 +- altoslib/AltosFrequency.java | 2 +- altoslib/AltosGPS.java | 2 +- altoslib/AltosGPSSat.java | 2 +- altoslib/AltosGreatCircle.java | 2 +- altoslib/AltosHeight.java | 2 +- altoslib/AltosHexfile.java | 2 +- altoslib/AltosHexsym.java | 2 +- altoslib/AltosIMU.java | 2 +- altoslib/AltosIdle.java | 2 +- altoslib/AltosIdleFetch.java | 2 +- altoslib/AltosIdleMonitor.java | 2 +- altoslib/AltosIdleMonitorListener.java | 2 +- altoslib/AltosIgnite.java | 2 +- altoslib/AltosLib.java | 2 +- altoslib/AltosLine.java | 2 +- altoslib/AltosLink.java | 2 +- altoslib/AltosListenerState.java | 2 +- altoslib/AltosLog.java | 2 +- altoslib/AltosMag.java | 2 +- altoslib/AltosMma655x.java | 2 +- altoslib/AltosMs5607.java | 2 +- altoslib/AltosNoSymbol.java | 2 +- altoslib/AltosParse.java | 2 +- altoslib/AltosPreferences.java | 2 +- altoslib/AltosPreferencesBackend.java | 2 +- altoslib/AltosProgrammer.java | 2 +- altoslib/AltosPyro.java | 2 +- altoslib/AltosReplayReader.java | 2 +- altoslib/AltosRomconfig.java | 2 +- altoslib/AltosSelfFlash.java | 2 +- altoslib/AltosSensorEMini.java | 2 +- altoslib/AltosSensorMM.java | 2 +- altoslib/AltosSensorMega.java | 2 +- altoslib/AltosSensorMetrum.java | 2 +- altoslib/AltosSensorTM.java | 2 +- altoslib/AltosSensorTMini.java | 2 +- altoslib/AltosSpeed.java | 2 +- altoslib/AltosState.java | 2 +- altoslib/AltosStateIterable.java | 2 +- altoslib/AltosStateUpdate.java | 2 +- altoslib/AltosTelemetry.java | 2 +- altoslib/AltosTelemetryConfiguration.java | 2 +- altoslib/AltosTelemetryFile.java | 2 +- altoslib/AltosTelemetryIterable.java | 2 +- altoslib/AltosTelemetryLegacy.java | 2 +- altoslib/AltosTelemetryLocation.java | 2 +- altoslib/AltosTelemetryMap.java | 2 +- altoslib/AltosTelemetryMegaData.java | 2 +- altoslib/AltosTelemetryMegaSensor.java | 2 +- altoslib/AltosTelemetryMetrumData.java | 2 +- altoslib/AltosTelemetryMetrumSensor.java | 2 +- altoslib/AltosTelemetryMini.java | 2 +- altoslib/AltosTelemetryRaw.java | 2 +- altoslib/AltosTelemetryReader.java | 2 +- altoslib/AltosTelemetrySatellite.java | 2 +- altoslib/AltosTelemetrySensor.java | 2 +- altoslib/AltosTelemetryStandard.java | 2 +- altoslib/AltosTemperature.java | 2 +- altoslib/AltosUnits.java | 2 +- altoslib/AltosUnitsListener.java | 2 +- altosui/Altos.java | 2 +- altosui/AltosAscent.java | 2 +- altosui/AltosBTKnown.java | 2 +- altosui/AltosCSV.java | 2 +- altosui/AltosCSVUI.java | 2 +- altosui/AltosCompanionInfo.java | 2 +- altosui/AltosConfig.java | 2 +- altosui/AltosConfigFreqUI.java | 2 +- altosui/AltosConfigPyroUI.java | 2 +- altosui/AltosConfigTD.java | 2 +- altosui/AltosConfigTDUI.java | 2 +- altosui/AltosConfigUI.java | 2 +- altosui/AltosDataChooser.java | 2 +- altosui/AltosDescent.java | 2 +- altosui/AltosDisplayThread.java | 2 +- altosui/AltosEepromDelete.java | 2 +- altosui/AltosEepromManage.java | 2 +- altosui/AltosEepromMonitorUI.java | 2 +- altosui/AltosEepromSelect.java | 2 +- altosui/AltosFlashUI.java | 2 +- altosui/AltosFlightDisplay.java | 2 +- altosui/AltosFlightStats.java | 2 +- altosui/AltosFlightStatsTable.java | 2 +- altosui/AltosFlightStatus.java | 2 +- altosui/AltosFlightStatusTableModel.java | 2 +- altosui/AltosFlightStatusUpdate.java | 2 +- altosui/AltosFlightUI.java | 2 +- altosui/AltosFreqList.java | 2 +- altosui/AltosGraph.java | 2 +- altosui/AltosGraphDataPoint.java | 2 +- altosui/AltosGraphDataSet.java | 2 +- altosui/AltosGraphUI.java | 2 +- altosui/AltosIdleMonitorUI.java | 2 +- altosui/AltosIgniteUI.java | 2 +- altosui/AltosInfoTable.java | 2 +- altosui/AltosKML.java | 2 +- altosui/AltosLanded.java | 2 +- altosui/AltosPad.java | 2 +- altosui/AltosRomconfigUI.java | 2 +- altosui/AltosScanUI.java | 2 +- altosui/AltosSerial.java | 2 +- altosui/AltosSiteMap.java | 2 +- altosui/AltosSiteMapTile.java | 2 +- altosui/AltosUI.java | 2 +- altosui/AltosUIPreferencesBackend.java | 2 +- altosui/AltosWriter.java | 2 +- altosuilib/AltosUIAxis.java | 2 +- altosuilib/AltosUIEnable.java | 2 +- altosuilib/AltosUIGraph.java | 2 +- altosuilib/AltosUIGrapher.java | 2 +- altosuilib/AltosUILib.java | 2 +- altosuilib/AltosUIMarker.java | 2 +- altosuilib/AltosUIPreferences.java | 2 +- altosuilib/AltosUIPreferencesBackend.java | 2 +- altosuilib/AltosUISeries.java | 2 +- configure.ac | 2 +- micropeak/MicroData.java | 2 +- micropeak/MicroDownload.java | 2 +- micropeak/MicroExport.java | 2 +- micropeak/MicroFile.java | 2 +- micropeak/MicroFileChooser.java | 2 +- micropeak/MicroGraph.java | 2 +- micropeak/MicroPeak.java | 2 +- micropeak/MicroRaw.java | 2 +- micropeak/MicroSave.java | 2 +- micropeak/MicroStats.java | 2 +- micropeak/MicroStatsTable.java | 2 +- 166 files changed, 166 insertions(+), 166 deletions(-) diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/AltosBluetooth.java b/altosdroid/src/org/altusmetrum/AltosDroid/AltosBluetooth.java index 643e94f5..634769cc 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_2.*; +import org.altusmetrum.altoslib_3.*; public class AltosBluetooth extends AltosLink { diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java b/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java index 92287476..9125d56b 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_2.*; +import org.altusmetrum.altoslib_3.*; 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 59fef842..067cb620 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_2.*; +import org.altusmetrum.altoslib_3.*; 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 c652a169..9d155385 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_2.*; +import org.altusmetrum.altoslib_3.*; 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 f17cb821..b50cab22 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_2.*; +import org.altusmetrum.altoslib_3.*; public class AltosVoice { diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/TabAscent.java b/altosdroid/src/org/altusmetrum/AltosDroid/TabAscent.java index 3eaf12db..edfd8245 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_2.*; +import org.altusmetrum.altoslib_3.*; 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 e4a954ca..cc070b0d 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_2.*; +import org.altusmetrum.altoslib_3.*; 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 40399f2a..5a703978 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_2.*; +import org.altusmetrum.altoslib_3.*; 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 a4e224aa..5fe88f51 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_2.*; +import org.altusmetrum.altoslib_3.*; 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 b9e878f1..3f0a1887 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_2.*; +import org.altusmetrum.altoslib_3.*; 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 4d793413..c8c61838 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_2.*; +import org.altusmetrum.altoslib_3.*; 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 45604284..2a2cc404 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_2.*; +import org.altusmetrum.altoslib_3.*; public class TelemetryReader extends Thread { diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java b/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java index 76efa749..96cedad8 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_2.*; +import org.altusmetrum.altoslib_3.*; public class TelemetryService extends Service implements LocationListener { diff --git a/altoslib/AltosAccel.java b/altoslib/AltosAccel.java index b838d30b..43dc20bd 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_2; +package org.altusmetrum.altoslib_3; public class AltosAccel extends AltosUnits { diff --git a/altoslib/AltosCRCException.java b/altoslib/AltosCRCException.java index be2ec4fe..94962731 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_2; +package org.altusmetrum.altoslib_3; public class AltosCRCException extends Exception { public int rssi; diff --git a/altoslib/AltosCompanion.java b/altoslib/AltosCompanion.java index 57bb21af..47ca328e 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_2; +package org.altusmetrum.altoslib_3; public class AltosCompanion { public final static int board_id_telescience = 0x0a; diff --git a/altoslib/AltosConfigData.java b/altoslib/AltosConfigData.java index 1c3085bd..c4e108f8 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_2; +package org.altusmetrum.altoslib_3; import java.util.*; import java.text.*; diff --git a/altoslib/AltosConfigValues.java b/altoslib/AltosConfigValues.java index fd5584c2..4aa55d6a 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_2; +package org.altusmetrum.altoslib_3; public interface AltosConfigValues { /* set and get all of the dialog values */ diff --git a/altoslib/AltosConvert.java b/altoslib/AltosConvert.java index 8d0b74dd..ace9d62e 100644 --- a/altoslib/AltosConvert.java +++ b/altoslib/AltosConvert.java @@ -18,7 +18,7 @@ /* * Sensor data conversion functions */ -package org.altusmetrum.altoslib_2; +package org.altusmetrum.altoslib_3; public class AltosConvert { /* diff --git a/altoslib/AltosDebug.java b/altoslib/AltosDebug.java index fb11d39a..4dfb31e5 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_2; +package org.altusmetrum.altoslib_3; import java.io.*; diff --git a/altoslib/AltosDistance.java b/altoslib/AltosDistance.java index 8d359feb..71ee81d7 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_2; +package org.altusmetrum.altoslib_3; public class AltosDistance extends AltosUnits { diff --git a/altoslib/AltosEeprom.java b/altoslib/AltosEeprom.java index dd5993c7..57ee73ad 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_2; +package org.altusmetrum.altoslib_3; import java.io.*; import java.util.*; diff --git a/altoslib/AltosEepromChunk.java b/altoslib/AltosEepromChunk.java index c03fa931..c884b659 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_2; +package org.altusmetrum.altoslib_3; import java.text.*; import java.util.concurrent.*; diff --git a/altoslib/AltosEepromDownload.java b/altoslib/AltosEepromDownload.java index 1b043167..04101079 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_2; +package org.altusmetrum.altoslib_3; import java.io.*; import java.util.*; diff --git a/altoslib/AltosEepromFile.java b/altoslib/AltosEepromFile.java index 60ab2573..91ffc223 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_2; +package org.altusmetrum.altoslib_3; import java.io.*; import java.util.*; diff --git a/altoslib/AltosEepromHeader.java b/altoslib/AltosEepromHeader.java index 0aeb78dd..6ce7ddd3 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_2; +package org.altusmetrum.altoslib_3; import java.io.*; import java.util.*; diff --git a/altoslib/AltosEepromIterable.java b/altoslib/AltosEepromIterable.java index fc793579..081721b3 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_2; +package org.altusmetrum.altoslib_3; import java.io.*; import java.util.*; diff --git a/altoslib/AltosEepromList.java b/altoslib/AltosEepromList.java index 763bd1e2..a9dac13a 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_2; +package org.altusmetrum.altoslib_3; import java.io.*; import java.util.*; diff --git a/altoslib/AltosEepromLog.java b/altoslib/AltosEepromLog.java index 95c0c3f6..cc298207 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_2; +package org.altusmetrum.altoslib_3; import java.text.*; import java.util.concurrent.*; diff --git a/altoslib/AltosEepromMega.java b/altoslib/AltosEepromMega.java index 47013b5e..1ac72b1c 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_2; +package org.altusmetrum.altoslib_3; import java.io.*; import java.util.*; diff --git a/altoslib/AltosEepromMetrum2.java b/altoslib/AltosEepromMetrum2.java index c1d62c0c..f1bca6dc 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_2; +package org.altusmetrum.altoslib_3; import java.io.*; import java.util.*; diff --git a/altoslib/AltosEepromMini.java b/altoslib/AltosEepromMini.java index a09a62ce..fb3b4d23 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_2; +package org.altusmetrum.altoslib_3; import java.io.*; import java.util.*; diff --git a/altoslib/AltosEepromMonitor.java b/altoslib/AltosEepromMonitor.java index eeef0678..9ab1a5ab 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_2; +package org.altusmetrum.altoslib_3; public interface AltosEepromMonitor { diff --git a/altoslib/AltosEepromTM.java b/altoslib/AltosEepromTM.java index 36803912..c8b1e60c 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_2; +package org.altusmetrum.altoslib_3; import java.io.*; import java.util.*; diff --git a/altoslib/AltosEepromTm.java b/altoslib/AltosEepromTm.java index b8914131..049dd340 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_2; +package org.altusmetrum.altoslib_3; import java.io.*; import java.util.*; diff --git a/altoslib/AltosFile.java b/altoslib/AltosFile.java index f39c3962..37bf7075 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_2; +package org.altusmetrum.altoslib_3; import java.io.File; import java.util.*; diff --git a/altoslib/AltosFlash.java b/altoslib/AltosFlash.java index 0977070e..25c76863 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_2; +package org.altusmetrum.altoslib_3; import java.io.*; diff --git a/altoslib/AltosFlashListener.java b/altoslib/AltosFlashListener.java index 777ae635..b7fcd73b 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_2; +package org.altusmetrum.altoslib_3; public interface AltosFlashListener { public void position(String label, int percent); diff --git a/altoslib/AltosFlightReader.java b/altoslib/AltosFlightReader.java index b251e7cc..86757e82 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_2; +package org.altusmetrum.altoslib_3; import java.text.*; import java.io.*; diff --git a/altoslib/AltosFrequency.java b/altoslib/AltosFrequency.java index ece7525a..5770b646 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_2; +package org.altusmetrum.altoslib_3; public class AltosFrequency { public double frequency; diff --git a/altoslib/AltosGPS.java b/altoslib/AltosGPS.java index f5162225..01e6fdbc 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_2; +package org.altusmetrum.altoslib_3; import java.text.*; import java.util.concurrent.*; diff --git a/altoslib/AltosGPSSat.java b/altoslib/AltosGPSSat.java index 0e17d7f2..76fa3a56 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_2; +package org.altusmetrum.altoslib_3; public class AltosGPSSat { public int svid; diff --git a/altoslib/AltosGreatCircle.java b/altoslib/AltosGreatCircle.java index 2c84bf4a..b884a3bc 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_2; +package org.altusmetrum.altoslib_3; import java.lang.Math; diff --git a/altoslib/AltosHeight.java b/altoslib/AltosHeight.java index 84bd42d9..a81897e7 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_2; +package org.altusmetrum.altoslib_3; public class AltosHeight extends AltosUnits { diff --git a/altoslib/AltosHexfile.java b/altoslib/AltosHexfile.java index 717c1c5d..60f4ecdc 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_2; +package org.altusmetrum.altoslib_3; import java.io.*; import java.util.LinkedList; diff --git a/altoslib/AltosHexsym.java b/altoslib/AltosHexsym.java index 810a4803..a98ef0fc 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_2; +package org.altusmetrum.altoslib_3; public class AltosHexsym { String name; diff --git a/altoslib/AltosIMU.java b/altoslib/AltosIMU.java index e6e70401..260f3587 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_2; +package org.altusmetrum.altoslib_3; import java.util.concurrent.*; diff --git a/altoslib/AltosIdle.java b/altoslib/AltosIdle.java index 456a9247..c7b546b6 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_2; +package org.altusmetrum.altoslib_3; import java.io.*; import java.util.*; diff --git a/altoslib/AltosIdleFetch.java b/altoslib/AltosIdleFetch.java index 4adc6c41..02cb7a94 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_2; +package org.altusmetrum.altoslib_3; import java.io.*; import java.util.*; diff --git a/altoslib/AltosIdleMonitor.java b/altoslib/AltosIdleMonitor.java index d9d71143..8342f8a5 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_2; +package org.altusmetrum.altoslib_3; import java.io.*; import java.util.concurrent.*; diff --git a/altoslib/AltosIdleMonitorListener.java b/altoslib/AltosIdleMonitorListener.java index 0b03b897..dcaa77a6 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_2; +package org.altusmetrum.altoslib_3; public interface AltosIdleMonitorListener { public void update(AltosState state, AltosListenerState listener_state); diff --git a/altoslib/AltosIgnite.java b/altoslib/AltosIgnite.java index fc9599b6..ca9f419c 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_2; +package org.altusmetrum.altoslib_3; import java.io.*; import java.util.concurrent.*; diff --git a/altoslib/AltosLib.java b/altoslib/AltosLib.java index efbc3ddb..05f0af8d 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_2; +package org.altusmetrum.altoslib_3; import java.util.*; import java.io.*; diff --git a/altoslib/AltosLine.java b/altoslib/AltosLine.java index e5dd13fc..9d796a89 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_2; +package org.altusmetrum.altoslib_3; public class AltosLine { public String line; diff --git a/altoslib/AltosLink.java b/altoslib/AltosLink.java index ee1f9785..8346d281 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_2; +package org.altusmetrum.altoslib_3; import java.io.*; import java.util.concurrent.*; diff --git a/altoslib/AltosListenerState.java b/altoslib/AltosListenerState.java index 01dd7afb..53ed33f9 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_2; +package org.altusmetrum.altoslib_3; public class AltosListenerState { public int crc_errors; diff --git a/altoslib/AltosLog.java b/altoslib/AltosLog.java index d4fbee97..70c017b7 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_2; +package org.altusmetrum.altoslib_3; import java.io.*; import java.text.*; diff --git a/altoslib/AltosMag.java b/altoslib/AltosMag.java index 5136bfd2..d2bb9da6 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_2; +package org.altusmetrum.altoslib_3; import java.util.concurrent.*; diff --git a/altoslib/AltosMma655x.java b/altoslib/AltosMma655x.java index f8256190..0d90c351 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_2; +package org.altusmetrum.altoslib_3; import java.util.concurrent.*; diff --git a/altoslib/AltosMs5607.java b/altoslib/AltosMs5607.java index 2319d5b8..97d08c3e 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_2; +package org.altusmetrum.altoslib_3; import java.util.concurrent.*; diff --git a/altoslib/AltosNoSymbol.java b/altoslib/AltosNoSymbol.java index e94687cd..791899c0 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_2; +package org.altusmetrum.altoslib_3; public class AltosNoSymbol extends Exception { public AltosNoSymbol(String name) { diff --git a/altoslib/AltosParse.java b/altoslib/AltosParse.java index ca96a8f9..5137fef8 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_2; +package org.altusmetrum.altoslib_3; import java.text.*; diff --git a/altoslib/AltosPreferences.java b/altoslib/AltosPreferences.java index c4051f9b..b8920d26 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_2; +package org.altusmetrum.altoslib_3; import java.io.*; import java.util.*; diff --git a/altoslib/AltosPreferencesBackend.java b/altoslib/AltosPreferencesBackend.java index 1ea28b01..2eb29702 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_2; +package org.altusmetrum.altoslib_3; import java.io.File; diff --git a/altoslib/AltosProgrammer.java b/altoslib/AltosProgrammer.java index b010d564..750e1f02 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_2; +package org.altusmetrum.altoslib_3; import java.io.*; diff --git a/altoslib/AltosPyro.java b/altoslib/AltosPyro.java index a219468c..aefc6fbd 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_2; +package org.altusmetrum.altoslib_3; import java.util.*; import java.text.*; diff --git a/altoslib/AltosReplayReader.java b/altoslib/AltosReplayReader.java index 19091d3d..4cf642ca 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_2; +package org.altusmetrum.altoslib_3; import java.io.*; import java.util.*; diff --git a/altoslib/AltosRomconfig.java b/altoslib/AltosRomconfig.java index 2f106deb..1273fbc6 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_2; +package org.altusmetrum.altoslib_3; import java.io.*; diff --git a/altoslib/AltosSelfFlash.java b/altoslib/AltosSelfFlash.java index 3bf7ce41..aae993eb 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_2; +package org.altusmetrum.altoslib_3; import java.io.*; diff --git a/altoslib/AltosSensorEMini.java b/altoslib/AltosSensorEMini.java index 5f9eed55..f888754c 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_2; +package org.altusmetrum.altoslib_3; import java.util.concurrent.TimeoutException; diff --git a/altoslib/AltosSensorMM.java b/altoslib/AltosSensorMM.java index 0ef42cf6..0c23d671 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_2; +package org.altusmetrum.altoslib_3; import java.util.concurrent.TimeoutException; diff --git a/altoslib/AltosSensorMega.java b/altoslib/AltosSensorMega.java index e715242a..c52f688d 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_2; +package org.altusmetrum.altoslib_3; import java.util.concurrent.TimeoutException; diff --git a/altoslib/AltosSensorMetrum.java b/altoslib/AltosSensorMetrum.java index c30eaebd..bb794a1e 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_2; +package org.altusmetrum.altoslib_3; import java.util.concurrent.TimeoutException; diff --git a/altoslib/AltosSensorTM.java b/altoslib/AltosSensorTM.java index f867de4b..b8f54bcb 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_2; +package org.altusmetrum.altoslib_3; import java.util.concurrent.TimeoutException; diff --git a/altoslib/AltosSensorTMini.java b/altoslib/AltosSensorTMini.java index ee030910..35857e35 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_2; +package org.altusmetrum.altoslib_3; import java.util.concurrent.TimeoutException; diff --git a/altoslib/AltosSpeed.java b/altoslib/AltosSpeed.java index 6618c539..d93229dd 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_2; +package org.altusmetrum.altoslib_3; public class AltosSpeed extends AltosUnits { diff --git a/altoslib/AltosState.java b/altoslib/AltosState.java index 4ddcc4ed..6a5b2a46 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_2; +package org.altusmetrum.altoslib_3; public class AltosState implements Cloneable { diff --git a/altoslib/AltosStateIterable.java b/altoslib/AltosStateIterable.java index 6d637419..5a919b66 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_2; +package org.altusmetrum.altoslib_3; import java.io.*; import java.util.*; diff --git a/altoslib/AltosStateUpdate.java b/altoslib/AltosStateUpdate.java index 97a5dfe2..4614c67a 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_2; +package org.altusmetrum.altoslib_3; public interface AltosStateUpdate { public void update_state(AltosState state) throws InterruptedException; diff --git a/altoslib/AltosTelemetry.java b/altoslib/AltosTelemetry.java index 03ca9f80..01bedd5e 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_2; +package org.altusmetrum.altoslib_3; import java.text.*; diff --git a/altoslib/AltosTelemetryConfiguration.java b/altoslib/AltosTelemetryConfiguration.java index e5d444dd..67a43748 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_2; +package org.altusmetrum.altoslib_3; public class AltosTelemetryConfiguration extends AltosTelemetryStandard { diff --git a/altoslib/AltosTelemetryFile.java b/altoslib/AltosTelemetryFile.java index 7566d946..09d7d3f8 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_2; +package org.altusmetrum.altoslib_3; import java.io.*; import java.util.*; diff --git a/altoslib/AltosTelemetryIterable.java b/altoslib/AltosTelemetryIterable.java index bf30b4c8..002f53b4 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_2; +package org.altusmetrum.altoslib_3; import java.io.*; import java.util.*; diff --git a/altoslib/AltosTelemetryLegacy.java b/altoslib/AltosTelemetryLegacy.java index 132b9e80..d302addd 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_2; +package org.altusmetrum.altoslib_3; import java.text.*; diff --git a/altoslib/AltosTelemetryLocation.java b/altoslib/AltosTelemetryLocation.java index 6e880914..8dcda9e1 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_2; +package org.altusmetrum.altoslib_3; public class AltosTelemetryLocation extends AltosTelemetryStandard { diff --git a/altoslib/AltosTelemetryMap.java b/altoslib/AltosTelemetryMap.java index 37883a1c..37b2527b 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_2; +package org.altusmetrum.altoslib_3; import java.text.*; import java.util.HashMap; diff --git a/altoslib/AltosTelemetryMegaData.java b/altoslib/AltosTelemetryMegaData.java index f5cc01d0..a4df70be 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_2; +package org.altusmetrum.altoslib_3; public class AltosTelemetryMegaData extends AltosTelemetryStandard { int state; diff --git a/altoslib/AltosTelemetryMegaSensor.java b/altoslib/AltosTelemetryMegaSensor.java index 3c4f1f8f..d1a463c0 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_2; +package org.altusmetrum.altoslib_3; public class AltosTelemetryMegaSensor extends AltosTelemetryStandard { int accel; diff --git a/altoslib/AltosTelemetryMetrumData.java b/altoslib/AltosTelemetryMetrumData.java index b6239971..b8f7e9ea 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_2; +package org.altusmetrum.altoslib_3; public class AltosTelemetryMetrumData extends AltosTelemetryStandard { diff --git a/altoslib/AltosTelemetryMetrumSensor.java b/altoslib/AltosTelemetryMetrumSensor.java index fc047afd..232468bb 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_2; +package org.altusmetrum.altoslib_3; public class AltosTelemetryMetrumSensor extends AltosTelemetryStandard { diff --git a/altoslib/AltosTelemetryMini.java b/altoslib/AltosTelemetryMini.java index e7109460..e0a493dc 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_2; +package org.altusmetrum.altoslib_3; public class AltosTelemetryMini extends AltosTelemetryStandard { diff --git a/altoslib/AltosTelemetryRaw.java b/altoslib/AltosTelemetryRaw.java index dbe70fe9..91cfbb18 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_2; +package org.altusmetrum.altoslib_3; public class AltosTelemetryRaw extends AltosTelemetryStandard { public AltosTelemetryRaw(int[] bytes) { diff --git a/altoslib/AltosTelemetryReader.java b/altoslib/AltosTelemetryReader.java index eeb35cb5..5e283587 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_2; +package org.altusmetrum.altoslib_3; import java.text.*; import java.io.*; diff --git a/altoslib/AltosTelemetrySatellite.java b/altoslib/AltosTelemetrySatellite.java index fde3d86d..01252bde 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_2; +package org.altusmetrum.altoslib_3; public class AltosTelemetrySatellite extends AltosTelemetryStandard { int channels; diff --git a/altoslib/AltosTelemetrySensor.java b/altoslib/AltosTelemetrySensor.java index e1106440..d6389865 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_2; +package org.altusmetrum.altoslib_3; public class AltosTelemetrySensor extends AltosTelemetryStandard { diff --git a/altoslib/AltosTelemetryStandard.java b/altoslib/AltosTelemetryStandard.java index 3186ae09..c9531fcb 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_2; +package org.altusmetrum.altoslib_3; public abstract class AltosTelemetryStandard extends AltosTelemetry { int[] bytes; diff --git a/altoslib/AltosTemperature.java b/altoslib/AltosTemperature.java index a636533f..36e26564 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_2; +package org.altusmetrum.altoslib_3; public class AltosTemperature extends AltosUnits { diff --git a/altoslib/AltosUnits.java b/altoslib/AltosUnits.java index 8f9ccded..e573a43b 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_2; +package org.altusmetrum.altoslib_3; public abstract class AltosUnits { diff --git a/altoslib/AltosUnitsListener.java b/altoslib/AltosUnitsListener.java index 1e3ad655..e9b29f9a 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_2; +package org.altusmetrum.altoslib_3; public interface AltosUnitsListener { public void units_changed(boolean imperial_units); diff --git a/altosui/Altos.java b/altosui/Altos.java index 07280b4a..4b171fa7 100644 --- a/altosui/Altos.java +++ b/altosui/Altos.java @@ -20,7 +20,7 @@ package altosui; import java.awt.*; import libaltosJNI.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; public class Altos extends AltosUILib { diff --git a/altosui/AltosAscent.java b/altosui/AltosAscent.java index ba4fc614..c8ce2caa 100644 --- a/altosui/AltosAscent.java +++ b/altosui/AltosAscent.java @@ -19,7 +19,7 @@ package altosui; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; public class AltosAscent extends JComponent implements AltosFlightDisplay { GridBagLayout layout; diff --git a/altosui/AltosBTKnown.java b/altosui/AltosBTKnown.java index a1652ec4..968d72d5 100644 --- a/altosui/AltosBTKnown.java +++ b/altosui/AltosBTKnown.java @@ -17,7 +17,7 @@ package altosui; import java.util.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; public class AltosBTKnown implements Iterable { diff --git a/altosui/AltosCSV.java b/altosui/AltosCSV.java index 7598eca0..13f29f07 100644 --- a/altosui/AltosCSV.java +++ b/altosui/AltosCSV.java @@ -19,7 +19,7 @@ package altosui; import java.io.*; import java.util.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; public class AltosCSV implements AltosWriter { File name; diff --git a/altosui/AltosCSVUI.java b/altosui/AltosCSVUI.java index c41ea74b..05cabcdf 100644 --- a/altosui/AltosCSVUI.java +++ b/altosui/AltosCSVUI.java @@ -21,7 +21,7 @@ import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.io.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; public class AltosCSVUI diff --git a/altosui/AltosCompanionInfo.java b/altosui/AltosCompanionInfo.java index 1f446700..4cc6c462 100644 --- a/altosui/AltosCompanionInfo.java +++ b/altosui/AltosCompanionInfo.java @@ -19,7 +19,7 @@ package altosui; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; public class AltosCompanionInfo extends JTable { private AltosFlightInfoTableModel model; diff --git a/altosui/AltosConfig.java b/altosui/AltosConfig.java index 206cbee3..e1805fc1 100644 --- a/altosui/AltosConfig.java +++ b/altosui/AltosConfig.java @@ -22,7 +22,7 @@ import javax.swing.*; import java.io.*; import java.util.concurrent.*; import java.text.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; public class AltosConfig implements ActionListener { diff --git a/altosui/AltosConfigFreqUI.java b/altosui/AltosConfigFreqUI.java index 555af3b6..e9923a32 100644 --- a/altosui/AltosConfigFreqUI.java +++ b/altosui/AltosConfigFreqUI.java @@ -21,7 +21,7 @@ import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; class AltosEditFreqUI extends AltosUIDialog implements ActionListener { diff --git a/altosui/AltosConfigPyroUI.java b/altosui/AltosConfigPyroUI.java index 81d12111..f59a0f0d 100644 --- a/altosui/AltosConfigPyroUI.java +++ b/altosui/AltosConfigPyroUI.java @@ -21,7 +21,7 @@ import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; public class AltosConfigPyroUI diff --git a/altosui/AltosConfigTD.java b/altosui/AltosConfigTD.java index f879ff88..ad9ebbfa 100644 --- a/altosui/AltosConfigTD.java +++ b/altosui/AltosConfigTD.java @@ -21,7 +21,7 @@ import java.awt.event.*; import javax.swing.*; import java.io.*; import java.util.concurrent.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; public class AltosConfigTD implements ActionListener { diff --git a/altosui/AltosConfigTDUI.java b/altosui/AltosConfigTDUI.java index b5a6cd7c..3ce0d98c 100644 --- a/altosui/AltosConfigTDUI.java +++ b/altosui/AltosConfigTDUI.java @@ -21,7 +21,7 @@ import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; public class AltosConfigTDUI diff --git a/altosui/AltosConfigUI.java b/altosui/AltosConfigUI.java index a7d95903..21ea50e6 100644 --- a/altosui/AltosConfigUI.java +++ b/altosui/AltosConfigUI.java @@ -21,7 +21,7 @@ import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; public class AltosConfigUI diff --git a/altosui/AltosDataChooser.java b/altosui/AltosDataChooser.java index c0d66682..a9344a01 100644 --- a/altosui/AltosDataChooser.java +++ b/altosui/AltosDataChooser.java @@ -20,7 +20,7 @@ package altosui; import javax.swing.*; import javax.swing.filechooser.FileNameExtensionFilter; import java.io.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; public class AltosDataChooser extends JFileChooser { diff --git a/altosui/AltosDescent.java b/altosui/AltosDescent.java index e73d990c..d1379083 100644 --- a/altosui/AltosDescent.java +++ b/altosui/AltosDescent.java @@ -19,7 +19,7 @@ package altosui; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; public class AltosDescent extends JComponent implements AltosFlightDisplay { GridBagLayout layout; diff --git a/altosui/AltosDisplayThread.java b/altosui/AltosDisplayThread.java index 4b4cc3b9..2a33f996 100644 --- a/altosui/AltosDisplayThread.java +++ b/altosui/AltosDisplayThread.java @@ -21,7 +21,7 @@ import java.awt.*; import javax.swing.*; import java.io.*; import java.text.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; public class AltosDisplayThread extends Thread { diff --git a/altosui/AltosEepromDelete.java b/altosui/AltosEepromDelete.java index 9984d1a2..b2d2e291 100644 --- a/altosui/AltosEepromDelete.java +++ b/altosui/AltosEepromDelete.java @@ -21,7 +21,7 @@ import java.awt.event.*; import javax.swing.*; import java.io.*; import java.util.concurrent.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; public class AltosEepromDelete implements Runnable { AltosEepromList flights; diff --git a/altosui/AltosEepromManage.java b/altosui/AltosEepromManage.java index da0a9777..e3635571 100644 --- a/altosui/AltosEepromManage.java +++ b/altosui/AltosEepromManage.java @@ -21,7 +21,7 @@ import java.awt.event.*; import javax.swing.*; import java.io.*; import java.util.concurrent.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; public class AltosEepromManage implements ActionListener { diff --git a/altosui/AltosEepromMonitorUI.java b/altosui/AltosEepromMonitorUI.java index 6ad4ca5c..c2e925a2 100644 --- a/altosui/AltosEepromMonitorUI.java +++ b/altosui/AltosEepromMonitorUI.java @@ -21,7 +21,7 @@ import java.awt.*; import java.awt.event.*; import javax.swing.*; import org.altusmetrum.altosuilib_1.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; public class AltosEepromMonitorUI extends AltosUIDialog implements AltosEepromMonitor { JFrame owner; diff --git a/altosui/AltosEepromSelect.java b/altosui/AltosEepromSelect.java index 8f86eebf..b7cdbb72 100644 --- a/altosui/AltosEepromSelect.java +++ b/altosui/AltosEepromSelect.java @@ -21,7 +21,7 @@ import javax.swing.*; import javax.swing.border.*; import java.awt.*; import java.awt.event.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; class AltosEepromItem implements ActionListener { diff --git a/altosui/AltosFlashUI.java b/altosui/AltosFlashUI.java index 296ad8ef..5913e506 100644 --- a/altosui/AltosFlashUI.java +++ b/altosui/AltosFlashUI.java @@ -23,7 +23,7 @@ import javax.swing.*; import javax.swing.filechooser.FileNameExtensionFilter; import java.io.*; import java.util.concurrent.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; public class AltosFlashUI diff --git a/altosui/AltosFlightDisplay.java b/altosui/AltosFlightDisplay.java index 289ddd01..c1264259 100644 --- a/altosui/AltosFlightDisplay.java +++ b/altosui/AltosFlightDisplay.java @@ -17,7 +17,7 @@ package altosui; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; public interface AltosFlightDisplay { void reset(); diff --git a/altosui/AltosFlightStats.java b/altosui/AltosFlightStats.java index b3ee14ac..bf5644c3 100644 --- a/altosui/AltosFlightStats.java +++ b/altosui/AltosFlightStats.java @@ -18,7 +18,7 @@ package altosui; import java.io.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; public class AltosFlightStats { double max_height; diff --git a/altosui/AltosFlightStatsTable.java b/altosui/AltosFlightStatsTable.java index db875b3b..3e7e9fe1 100644 --- a/altosui/AltosFlightStatsTable.java +++ b/altosui/AltosFlightStatsTable.java @@ -19,7 +19,7 @@ package altosui; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; public class AltosFlightStatsTable extends JComponent { GridBagLayout layout; diff --git a/altosui/AltosFlightStatus.java b/altosui/AltosFlightStatus.java index 9d575e4c..c6d75420 100644 --- a/altosui/AltosFlightStatus.java +++ b/altosui/AltosFlightStatus.java @@ -19,7 +19,7 @@ package altosui; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; public class AltosFlightStatus extends JComponent implements AltosFlightDisplay { GridBagLayout layout; diff --git a/altosui/AltosFlightStatusTableModel.java b/altosui/AltosFlightStatusTableModel.java index 08154fda..e372d401 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_2.*; +import org.altusmetrum.altoslib_3.*; public class AltosFlightStatusTableModel extends AbstractTableModel { private String[] columnNames = { diff --git a/altosui/AltosFlightStatusUpdate.java b/altosui/AltosFlightStatusUpdate.java index 7821a777..93399a13 100644 --- a/altosui/AltosFlightStatusUpdate.java +++ b/altosui/AltosFlightStatusUpdate.java @@ -18,7 +18,7 @@ package altosui; import java.awt.event.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; public class AltosFlightStatusUpdate implements ActionListener { diff --git a/altosui/AltosFlightUI.java b/altosui/AltosFlightUI.java index c151177e..e8cf7f08 100644 --- a/altosui/AltosFlightUI.java +++ b/altosui/AltosFlightUI.java @@ -21,7 +21,7 @@ import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.concurrent.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; public class AltosFlightUI extends AltosUIFrame implements AltosFlightDisplay, AltosFontListener { diff --git a/altosui/AltosFreqList.java b/altosui/AltosFreqList.java index 17a995d4..039b5f22 100644 --- a/altosui/AltosFreqList.java +++ b/altosui/AltosFreqList.java @@ -18,7 +18,7 @@ package altosui; import javax.swing.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; public class AltosFreqList extends JComboBox { diff --git a/altosui/AltosGraph.java b/altosui/AltosGraph.java index fa1a5b72..ef26f4f9 100644 --- a/altosui/AltosGraph.java +++ b/altosui/AltosGraph.java @@ -22,7 +22,7 @@ import java.util.ArrayList; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; import org.jfree.ui.*; diff --git a/altosui/AltosGraphDataPoint.java b/altosui/AltosGraphDataPoint.java index b2782459..61a1a227 100644 --- a/altosui/AltosGraphDataPoint.java +++ b/altosui/AltosGraphDataPoint.java @@ -18,7 +18,7 @@ package altosui; import org.altusmetrum.altosuilib_1.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; public class AltosGraphDataPoint implements AltosUIDataPoint { diff --git a/altosui/AltosGraphDataSet.java b/altosui/AltosGraphDataSet.java index 4e6c46d1..d2773a3f 100644 --- a/altosui/AltosGraphDataSet.java +++ b/altosui/AltosGraphDataSet.java @@ -20,7 +20,7 @@ package altosui; import java.lang.*; import java.io.*; import java.util.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; class AltosGraphIterator implements Iterator { diff --git a/altosui/AltosGraphUI.java b/altosui/AltosGraphUI.java index c42f7b5f..40d2f7f4 100644 --- a/altosui/AltosGraphUI.java +++ b/altosui/AltosGraphUI.java @@ -9,7 +9,7 @@ import java.util.ArrayList; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; import org.jfree.chart.ChartPanel; diff --git a/altosui/AltosIdleMonitorUI.java b/altosui/AltosIdleMonitorUI.java index 6a79604e..88779c93 100644 --- a/altosui/AltosIdleMonitorUI.java +++ b/altosui/AltosIdleMonitorUI.java @@ -24,7 +24,7 @@ import javax.swing.event.*; import java.io.*; import java.util.concurrent.*; import java.util.Arrays; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; public class AltosIdleMonitorUI extends AltosUIFrame implements AltosFlightDisplay, AltosFontListener, AltosIdleMonitorListener, DocumentListener { diff --git a/altosui/AltosIgniteUI.java b/altosui/AltosIgniteUI.java index c8024aae..efc87720 100644 --- a/altosui/AltosIgniteUI.java +++ b/altosui/AltosIgniteUI.java @@ -23,7 +23,7 @@ import javax.swing.*; import java.io.*; import java.text.*; import java.util.concurrent.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; public class AltosIgniteUI diff --git a/altosui/AltosInfoTable.java b/altosui/AltosInfoTable.java index feafed21..cf0e4c56 100644 --- a/altosui/AltosInfoTable.java +++ b/altosui/AltosInfoTable.java @@ -20,7 +20,7 @@ package altosui; import java.awt.*; import javax.swing.*; import javax.swing.table.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; public class AltosInfoTable extends JTable { private AltosFlightInfoTableModel model; diff --git a/altosui/AltosKML.java b/altosui/AltosKML.java index fbb0ece4..ae1f8259 100644 --- a/altosui/AltosKML.java +++ b/altosui/AltosKML.java @@ -18,7 +18,7 @@ package altosui; import java.io.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; public class AltosKML implements AltosWriter { diff --git a/altosui/AltosLanded.java b/altosui/AltosLanded.java index cc2053e0..74177753 100644 --- a/altosui/AltosLanded.java +++ b/altosui/AltosLanded.java @@ -21,7 +21,7 @@ import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.io.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; public class AltosLanded extends JComponent implements AltosFlightDisplay, ActionListener { GridBagLayout layout; diff --git a/altosui/AltosPad.java b/altosui/AltosPad.java index 06a0f1ef..7baf0eb2 100644 --- a/altosui/AltosPad.java +++ b/altosui/AltosPad.java @@ -19,7 +19,7 @@ package altosui; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; public class AltosPad extends JComponent implements AltosFlightDisplay { GridBagLayout layout; diff --git a/altosui/AltosRomconfigUI.java b/altosui/AltosRomconfigUI.java index fa780125..694a4e0e 100644 --- a/altosui/AltosRomconfigUI.java +++ b/altosui/AltosRomconfigUI.java @@ -20,7 +20,7 @@ package altosui; import java.awt.*; import java.awt.event.*; import javax.swing.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; public class AltosRomconfigUI diff --git a/altosui/AltosScanUI.java b/altosui/AltosScanUI.java index a5ccb15a..e4a93362 100644 --- a/altosui/AltosScanUI.java +++ b/altosui/AltosScanUI.java @@ -25,7 +25,7 @@ import java.io.*; import java.util.*; import java.text.*; import java.util.concurrent.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; class AltosScanResult { diff --git a/altosui/AltosSerial.java b/altosui/AltosSerial.java index 5e9322e5..2c5d2dfd 100644 --- a/altosui/AltosSerial.java +++ b/altosui/AltosSerial.java @@ -25,7 +25,7 @@ import java.io.*; import java.util.*; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; import libaltosJNI.*; diff --git a/altosui/AltosSiteMap.java b/altosui/AltosSiteMap.java index 9491ce2b..d714e13c 100644 --- a/altosui/AltosSiteMap.java +++ b/altosui/AltosSiteMap.java @@ -23,7 +23,7 @@ import java.io.*; import java.lang.Math; import java.awt.geom.Point2D; import java.util.concurrent.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; public class AltosSiteMap extends JScrollPane implements AltosFlightDisplay { diff --git a/altosui/AltosSiteMapTile.java b/altosui/AltosSiteMapTile.java index 172e6397..7d5b65e1 100644 --- a/altosui/AltosSiteMapTile.java +++ b/altosui/AltosSiteMapTile.java @@ -22,7 +22,7 @@ import java.awt.image.*; import javax.swing.*; import java.awt.geom.Point2D; import java.awt.geom.Line2D; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; public class AltosSiteMapTile extends JLayeredPane { JLabel mapLabel; diff --git a/altosui/AltosUI.java b/altosui/AltosUI.java index 9dad8718..8d5cacd4 100644 --- a/altosui/AltosUI.java +++ b/altosui/AltosUI.java @@ -22,7 +22,7 @@ import java.awt.event.*; import javax.swing.*; import java.io.*; import java.util.concurrent.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; public class AltosUI extends AltosUIFrame { diff --git a/altosui/AltosUIPreferencesBackend.java b/altosui/AltosUIPreferencesBackend.java index fb5f8520..697d9902 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_2.*; +import org.altusmetrum.altoslib_3.*; import javax.swing.filechooser.FileSystemView; public class AltosUIPreferencesBackend implements AltosPreferencesBackend { diff --git a/altosui/AltosWriter.java b/altosui/AltosWriter.java index d664d6e8..5ff44584 100644 --- a/altosui/AltosWriter.java +++ b/altosui/AltosWriter.java @@ -17,7 +17,7 @@ package altosui; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; public interface AltosWriter { diff --git a/altosuilib/AltosUIAxis.java b/altosuilib/AltosUIAxis.java index a38cba63..1638ea29 100644 --- a/altosuilib/AltosUIAxis.java +++ b/altosuilib/AltosUIAxis.java @@ -22,7 +22,7 @@ import java.util.ArrayList; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.jfree.ui.*; import org.jfree.chart.*; diff --git a/altosuilib/AltosUIEnable.java b/altosuilib/AltosUIEnable.java index 36885611..ea4bd00a 100644 --- a/altosuilib/AltosUIEnable.java +++ b/altosuilib/AltosUIEnable.java @@ -23,7 +23,7 @@ import javax.swing.*; import java.io.*; import java.util.concurrent.*; import java.util.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.jfree.ui.*; import org.jfree.chart.*; diff --git a/altosuilib/AltosUIGraph.java b/altosuilib/AltosUIGraph.java index ef0cc677..061a7629 100644 --- a/altosuilib/AltosUIGraph.java +++ b/altosuilib/AltosUIGraph.java @@ -22,7 +22,7 @@ import java.util.ArrayList; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.jfree.ui.*; import org.jfree.chart.*; diff --git a/altosuilib/AltosUIGrapher.java b/altosuilib/AltosUIGrapher.java index d826072f..23e7d9f0 100644 --- a/altosuilib/AltosUIGrapher.java +++ b/altosuilib/AltosUIGrapher.java @@ -22,7 +22,7 @@ import java.util.ArrayList; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.jfree.ui.*; import org.jfree.chart.*; diff --git a/altosuilib/AltosUILib.java b/altosuilib/AltosUILib.java index 9fcaf6d4..307ef19d 100644 --- a/altosuilib/AltosUILib.java +++ b/altosuilib/AltosUILib.java @@ -20,7 +20,7 @@ package org.altusmetrum.altosuilib_1; import java.awt.*; import libaltosJNI.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; public class AltosUILib extends AltosLib { diff --git a/altosuilib/AltosUIMarker.java b/altosuilib/AltosUIMarker.java index e4262abd..ae8eb034 100644 --- a/altosuilib/AltosUIMarker.java +++ b/altosuilib/AltosUIMarker.java @@ -22,7 +22,7 @@ import java.util.ArrayList; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.jfree.ui.*; import org.jfree.chart.*; diff --git a/altosuilib/AltosUIPreferences.java b/altosuilib/AltosUIPreferences.java index fc14f24b..4c995f80 100644 --- a/altosuilib/AltosUIPreferences.java +++ b/altosuilib/AltosUIPreferences.java @@ -21,7 +21,7 @@ import java.io.*; import java.util.*; import java.awt.Component; import javax.swing.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; public class AltosUIPreferences extends AltosPreferences { diff --git a/altosuilib/AltosUIPreferencesBackend.java b/altosuilib/AltosUIPreferencesBackend.java index 55da8d48..64d3e3df 100644 --- a/altosuilib/AltosUIPreferencesBackend.java +++ b/altosuilib/AltosUIPreferencesBackend.java @@ -19,7 +19,7 @@ package org.altusmetrum.altosuilib_1; import java.io.File; import java.util.prefs.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import javax.swing.filechooser.FileSystemView; public class AltosUIPreferencesBackend implements AltosPreferencesBackend { diff --git a/altosuilib/AltosUISeries.java b/altosuilib/AltosUISeries.java index 441eba2b..1f2a1c3f 100644 --- a/altosuilib/AltosUISeries.java +++ b/altosuilib/AltosUISeries.java @@ -22,7 +22,7 @@ import java.util.ArrayList; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.jfree.ui.*; import org.jfree.chart.*; diff --git a/configure.ac b/configure.ac index b92e06a9..eaf8c03d 100644 --- a/configure.ac +++ b/configure.ac @@ -30,7 +30,7 @@ dnl ========================================================================== dnl Java library versions ALTOSUILIB_VERSION=1 -ALTOSLIB_VERSION=2 +ALTOSLIB_VERSION=3 AC_SUBST(ALTOSLIB_VERSION) AC_DEFINE(ALTOSLIB_VERSION,$ALTOSLIB_VERSION,[Version of the AltosLib package]) diff --git a/micropeak/MicroData.java b/micropeak/MicroData.java index 07806fa4..04e9ad32 100644 --- a/micropeak/MicroData.java +++ b/micropeak/MicroData.java @@ -20,7 +20,7 @@ package org.altusmetrum.micropeak; import java.lang.*; import java.io.*; import java.util.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; class MicroIterator implements Iterator { diff --git a/micropeak/MicroDownload.java b/micropeak/MicroDownload.java index a9095f9c..ec76824d 100644 --- a/micropeak/MicroDownload.java +++ b/micropeak/MicroDownload.java @@ -23,7 +23,7 @@ import javax.swing.*; import java.io.*; import java.util.concurrent.*; import java.util.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; public class MicroDownload extends AltosUIDialog implements Runnable, ActionListener { diff --git a/micropeak/MicroExport.java b/micropeak/MicroExport.java index 5af767c6..c170f544 100644 --- a/micropeak/MicroExport.java +++ b/micropeak/MicroExport.java @@ -23,7 +23,7 @@ import java.util.ArrayList; import java.awt.*; import javax.swing.*; import javax.swing.filechooser.FileNameExtensionFilter; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; public class MicroExport extends JFileChooser { diff --git a/micropeak/MicroFile.java b/micropeak/MicroFile.java index 2b02e20a..b6a9d401 100644 --- a/micropeak/MicroFile.java +++ b/micropeak/MicroFile.java @@ -19,7 +19,7 @@ package org.altusmetrum.micropeak; import java.io.*; import java.util.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; public class MicroFile { diff --git a/micropeak/MicroFileChooser.java b/micropeak/MicroFileChooser.java index 3ca128ee..595d1ff7 100644 --- a/micropeak/MicroFileChooser.java +++ b/micropeak/MicroFileChooser.java @@ -20,7 +20,7 @@ package org.altusmetrum.micropeak; import javax.swing.*; import javax.swing.filechooser.FileNameExtensionFilter; import java.io.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; public class MicroFileChooser extends JFileChooser { diff --git a/micropeak/MicroGraph.java b/micropeak/MicroGraph.java index fba62907..5960fe4d 100644 --- a/micropeak/MicroGraph.java +++ b/micropeak/MicroGraph.java @@ -22,7 +22,7 @@ import java.util.ArrayList; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; import org.jfree.ui.*; diff --git a/micropeak/MicroPeak.java b/micropeak/MicroPeak.java index 27a8db02..2a8e2ca6 100644 --- a/micropeak/MicroPeak.java +++ b/micropeak/MicroPeak.java @@ -23,7 +23,7 @@ import javax.swing.*; import java.io.*; import java.util.concurrent.*; import java.util.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; public class MicroPeak extends MicroFrame implements ActionListener, ItemListener { diff --git a/micropeak/MicroRaw.java b/micropeak/MicroRaw.java index 0520fa71..d64da387 100644 --- a/micropeak/MicroRaw.java +++ b/micropeak/MicroRaw.java @@ -20,7 +20,7 @@ package org.altusmetrum.micropeak; import java.awt.*; import java.io.*; import javax.swing.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; public class MicroRaw extends JTextArea { diff --git a/micropeak/MicroSave.java b/micropeak/MicroSave.java index 1f1ef3cb..0addfa88 100644 --- a/micropeak/MicroSave.java +++ b/micropeak/MicroSave.java @@ -24,7 +24,7 @@ import javax.swing.filechooser.FileNameExtensionFilter; import java.io.*; import java.util.concurrent.*; import java.util.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; public class MicroSave extends JFileChooser { diff --git a/micropeak/MicroStats.java b/micropeak/MicroStats.java index 32d94432..765525b0 100644 --- a/micropeak/MicroStats.java +++ b/micropeak/MicroStats.java @@ -18,7 +18,7 @@ package org.altusmetrum.micropeak; import java.io.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; public class MicroStats { diff --git a/micropeak/MicroStatsTable.java b/micropeak/MicroStatsTable.java index 4400a317..ea1609ac 100644 --- a/micropeak/MicroStatsTable.java +++ b/micropeak/MicroStatsTable.java @@ -19,7 +19,7 @@ package org.altusmetrum.micropeak; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; public class MicroStatsTable extends JComponent implements AltosFontListener { -- cgit v1.2.3 From 2a912dcde191e2f750845c464611641a5abdc28a Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 20 Dec 2013 22:04:53 -0800 Subject: altos: Execute self-test on MMA655X part This doesn't check for fine calibration, just makes sure the part is within the broad tolerances specified by the manufacturer. The subtle fix here was actually getting reset working -- there was a typo in the bitpattern definition which caused the reset to fail, making it hard to self-test the part, as self-test is only valid before the part is running. Signed-off-by: Keith Packard --- src/drivers/ao_mma655x.c | 124 ++++++++++++++++++++++++++++------------------- src/drivers/ao_mma655x.h | 8 +++ 2 files changed, 81 insertions(+), 51 deletions(-) diff --git a/src/drivers/ao_mma655x.c b/src/drivers/ao_mma655x.c index ce83a5a3..c36858ad 100644 --- a/src/drivers/ao_mma655x.c +++ b/src/drivers/ao_mma655x.c @@ -20,14 +20,15 @@ #if HAS_MMA655X -#if 0 -#define PRINTD(...) do { printf ("\r%5u %s: ", ao_tick_count, __func__); printf(__VA_ARGS__); } while(0) +#define DEBUG 0 +#define DEBUG_LOW 1 +#define DEBUG_HIGH 2 +#if 1 +#define PRINTD(l, ...) do { if (DEBUG & (l)) { printf ("\r%5u %s: ", ao_tick_count, __func__); printf(__VA_ARGS__); flush(); } } while(0) #else -#define PRINTD(...) +#define PRINTD(l,...) #endif -static uint8_t mma655x_configured; - uint8_t ao_mma655x_spi_index = AO_MMA655X_SPI_INDEX; static void @@ -53,7 +54,7 @@ ao_mma655x_restart(void) { ao_gpio_set(AO_MMA655X_CS_PORT, AO_MMA655X_CS_PIN, AO_MMA655X_CS, 1); /* Emperical testing on STM32L151 at 32MHz for this delay amount */ - for (i = 0; i < 9; i++) + for (i = 0; i < 10; i++) ao_arch_nop(); ao_gpio_set(AO_MMA655X_CS_PORT, AO_MMA655X_CS_PIN, AO_MMA655X_CS, 0); } @@ -72,15 +73,17 @@ ao_parity(uint8_t v) return p; } +#if 0 static void ao_mma655x_cmd(uint8_t d[2]) { ao_mma655x_start(); - PRINTD("\tSEND %02x %02x\n", d[0], d[1]); + PRINTD(DEBUG_LOW, "\tSEND %02x %02x\n", d[0], d[1]); ao_spi_duplex(d, d, 2, AO_MMA655X_SPI_INDEX); - PRINTD("\t\tRECV %02x %02x\n", d[0], d[1]); + PRINTD(DEBUG_LOW, "\t\tRECV %02x %02x\n", d[0], d[1]); ao_mma655x_stop(); } +#endif static uint8_t ao_mma655x_reg_read(uint8_t addr) @@ -97,6 +100,7 @@ ao_mma655x_reg_read(uint8_t addr) d[1] = 0x00; ao_spi_duplex(&d, &d, 2, AO_MMA655X_SPI_INDEX); ao_mma655x_stop(); + PRINTD(DEBUG_LOW, "read %x = %x %x\n", addr, d[0], d[1]); return d[1]; } @@ -105,6 +109,7 @@ ao_mma655x_reg_write(uint8_t addr, uint8_t value) { uint8_t d[2]; + PRINTD(DEBUG_LOW, "write %x %x\n", addr, value); addr |= (1 << 6); /* write mode */ d[0] = addr | (ao_parity(addr^value) << 7); d[1] = value; @@ -113,8 +118,6 @@ ao_mma655x_reg_write(uint8_t addr, uint8_t value) ao_mma655x_stop(); addr &= ~(1 << 6); - PRINTD("write %x %x = %x\n", - addr, value, ao_mma655x_reg_read(addr)); } static uint16_t @@ -131,14 +134,14 @@ ao_mma655x_value(void) (0 << 1) | /* Arm disabled */ (1 << 0)); /* Odd parity */ ao_mma655x_start(); - PRINTD("value SEND %02x %02x\n", d[0], d[1]); + PRINTD(DEBUG_LOW, "value SEND %02x %02x\n", d[0], d[1]); ao_spi_send(d, 2, AO_MMA655X_SPI_INDEX); ao_mma655x_restart(); d[0] = 0x80; d[1] = 0x00; ao_spi_duplex(d, d, 2, AO_MMA655X_SPI_INDEX); ao_mma655x_stop(); - PRINTD("value RECV %02x %02x\n", d[0], d[1]); + PRINTD(DEBUG_LOW, "value RECV %02x %02x\n", d[0], d[1]); v = (uint16_t) d[1] << 2; v |= d[0] >> 6; @@ -148,15 +151,16 @@ ao_mma655x_value(void) static void ao_mma655x_reset(void) { + PRINTD(DEBUG_HIGH, "reset\n"); ao_mma655x_reg_write(AO_MMA655X_DEVCTL, (0 << AO_MMA655X_DEVCTL_RES_1) | - (0 << AO_MMA655X_DEVCTL_RES_1)); + (0 << AO_MMA655X_DEVCTL_RES_0)); ao_mma655x_reg_write(AO_MMA655X_DEVCTL, (1 << AO_MMA655X_DEVCTL_RES_1) | - (1 << AO_MMA655X_DEVCTL_RES_1)); + (1 << AO_MMA655X_DEVCTL_RES_0)); ao_mma655x_reg_write(AO_MMA655X_DEVCTL, (0 << AO_MMA655X_DEVCTL_RES_1) | - (1 << AO_MMA655X_DEVCTL_RES_1)); + (1 << AO_MMA655X_DEVCTL_RES_0)); } #define DEVCFG_VALUE (\ @@ -169,54 +173,73 @@ ao_mma655x_reset(void) { (0 << AO_MMA655X_AXISCFG_LPF)) /* 100Hz 4-pole filter */ +#define AO_ST_TRIES 10 +#define AO_ST_DELAY AO_MS_TO_TICKS(100) + static void ao_mma655x_setup(void) { - uint8_t v; uint16_t a, a_st; - uint8_t stdefl; - uint8_t i; + int16_t st_change; + int tries; + uint8_t devstat; +#if 0 uint8_t s0, s1, s2, s3; - uint8_t pn; uint32_t lot; - uint16_t serial; - - - if (mma655x_configured) - return; - mma655x_configured = 1; - ao_delay(AO_MS_TO_TICKS(10)); /* Top */ - ao_mma655x_reset(); - ao_delay(AO_MS_TO_TICKS(10)); /* Top */ - (void) ao_mma655x_reg_read(AO_MMA655X_DEVSTAT); - v = ao_mma655x_reg_read(AO_MMA655X_DEVSTAT); - - /* Configure R/W register values. - * Most of them relate to the arming feature, which - * we don't use, so the only registers we need to - * write are DEVCFG and AXISCFG - */ +#endif - ao_mma655x_reg_write(AO_MMA655X_DEVCFG, - DEVCFG_VALUE | (0 << AO_MMA655X_DEVCFG_ENDINIT)); + for (tries = 0; tries < AO_ST_TRIES; tries++) { + ao_delay(AO_MS_TO_TICKS(10)); + ao_mma655x_reset(); + ao_delay(AO_MS_TO_TICKS(10)); - /* Test X axis - */ + devstat = ao_mma655x_reg_read(AO_MMA655X_DEVSTAT); + PRINTD(DEBUG_HIGH, "devstat %x\n", devstat); + + if (!(devstat & (1 << AO_MMA655X_DEVSTAT_DEVRES))) + continue; + + /* Configure R/W register values. + * Most of them relate to the arming feature, which + * we don't use, so the only registers we need to + * write are DEVCFG and AXISCFG + */ + + ao_mma655x_reg_write(AO_MMA655X_DEVCFG, + DEVCFG_VALUE | (0 << AO_MMA655X_DEVCFG_ENDINIT)); + + /* Test X axis + */ - ao_mma655x_reg_write(AO_MMA655X_AXISCFG, - AXISCFG_VALUE | - (1 << AO_MMA655X_AXISCFG_ST)); - a_st = ao_mma655x_value(); + ao_mma655x_reg_write(AO_MMA655X_AXISCFG, + AXISCFG_VALUE | + (1 << AO_MMA655X_AXISCFG_ST)); + ao_delay(AO_MS_TO_TICKS(10)); + + a_st = ao_mma655x_value(); + + ao_mma655x_reg_write(AO_MMA655X_AXISCFG, + AXISCFG_VALUE | + (0 << AO_MMA655X_AXISCFG_ST)); + + ao_delay(AO_MS_TO_TICKS(10)); + + a = ao_mma655x_value(); - stdefl = ao_mma655x_reg_read(AO_MMA655X_STDEFL); + st_change = a_st - a; - ao_mma655x_reg_write(AO_MMA655X_AXISCFG, - AXISCFG_VALUE | - (0 << AO_MMA655X_AXISCFG_ST)); - a = ao_mma655x_value(); + PRINTD(DEBUG_HIGH, "self test %d normal %d change %d\n", a_st, a, st_change); + + if (AO_ST_MIN <= st_change && st_change <= AO_ST_MAX) + break; + ao_delay(AO_ST_DELAY); + } + if (tries == AO_ST_TRIES) + ao_sensor_errors = 1; ao_mma655x_reg_write(AO_MMA655X_DEVCFG, DEVCFG_VALUE | (1 << AO_MMA655X_DEVCFG_ENDINIT)); +#if 0 s0 = ao_mma655x_reg_read(AO_MMA655X_SN0); s1 = ao_mma655x_reg_read(AO_MMA655X_SN1); s2 = ao_mma655x_reg_read(AO_MMA655X_SN2); @@ -226,6 +249,7 @@ ao_mma655x_setup(void) serial = lot & 0x1fff; lot >>= 12; pn = ao_mma655x_reg_read(AO_MMA655X_PN); +#endif } uint16_t ao_mma655x_current; @@ -259,8 +283,6 @@ static __xdata struct ao_task ao_mma655x_task; void ao_mma655x_init(void) { - mma655x_configured = 0; - ao_cmd_register(&ao_mma655x_cmds[0]); ao_spi_init_cs(AO_MMA655X_CS_PORT, (1 << AO_MMA655X_CS_PIN)); diff --git a/src/drivers/ao_mma655x.h b/src/drivers/ao_mma655x.h index 2d951e07..e57e3377 100644 --- a/src/drivers/ao_mma655x.h +++ b/src/drivers/ao_mma655x.h @@ -78,6 +78,14 @@ #define AO_MMA655X_COUNT 0x15 #define AO_MMA655X_OFFCORR 0x16 +/* + * Range of valid self-test difference from + * normal measurement + */ + +#define AO_ST_MIN 300 +#define AO_ST_MAX 800 + extern uint16_t ao_mma655x_current; void -- cgit v1.2.3 From c8b27410e45cc3d80ad4b896bffe70e9aec5e3aa Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 20 Dec 2013 22:06:52 -0800 Subject: altos: 3-axis accel calibration was invalid in explicit accel cal mode When explicit Z-axis accel calibration values were provided to the 'c a' command, the 3-axis accelerometer calibration values would get set to uninitialized values. Not so helpful. Signed-off-by: Keith Packard --- src/core/ao_config.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/core/ao_config.c b/src/core/ao_config.c index a30ec64a..4a1c58b9 100644 --- a/src/core/ao_config.c +++ b/src/core/ao_config.c @@ -353,9 +353,9 @@ ao_config_accel_calibrate_set(void) __reentrant { int16_t up, down; #if HAS_GYRO - int16_t accel_along_up, accel_along_down; - int16_t accel_across_up, accel_across_down; - int16_t accel_through_up, accel_through_down; + int16_t accel_along_up = 0, accel_along_down = 0; + int16_t accel_across_up = 0, accel_across_down = 0; + int16_t accel_through_up = 0, accel_through_down = 0; #endif ao_cmd_decimal(); @@ -390,9 +390,11 @@ ao_config_accel_calibrate_set(void) __reentrant ao_config.accel_plus_g = up; ao_config.accel_minus_g = down; #if HAS_GYRO - ao_config.accel_zero_along = (accel_along_up + accel_along_down) / 2; - ao_config.accel_zero_across = (accel_across_up + accel_across_down) / 2; - ao_config.accel_zero_through = (accel_through_up + accel_through_down) / 2; + if (ao_cmd_lex_i == 0) { + ao_config.accel_zero_along = (accel_along_up + accel_along_down) / 2; + ao_config.accel_zero_across = (accel_across_up + accel_across_down) / 2; + ao_config.accel_zero_through = (accel_through_up + accel_through_down) / 2; + } #endif _ao_config_edit_finish(); } -- cgit v1.2.3 From 758acb92cccbe4b64a35a1883b42713738c90630 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 20 Dec 2013 22:08:11 -0800 Subject: altos: Complain about sensor self-test errors only in idle mode When the accelerometer says to go into pad mode, don't look for other sensor self test errors. Only look for sensor self test errors to choose between idle and invalid mode. This will prevent minor sensor self test errors from letting the rocket fly safely. Signed-off-by: Keith Packard --- src/core/ao_flight.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/core/ao_flight.c b/src/core/ao_flight.c index 463ff4a2..5918b997 100644 --- a/src/core/ao_flight.c +++ b/src/core/ao_flight.c @@ -104,9 +104,6 @@ ao_flight(void) ao_config.accel_minus_g == 0 || ao_ground_accel < ao_config.accel_plus_g - ACCEL_NOSE_UP || ao_ground_accel > ao_config.accel_minus_g + ACCEL_NOSE_UP || -#if HAS_IMU - ao_sensor_errors || -#endif ao_ground_height < -1000 || ao_ground_height > 7000) { @@ -152,7 +149,11 @@ ao_flight(void) #endif } else { /* Set idle mode */ - ao_flight_state = ao_flight_idle; + ao_flight_state = ao_flight_idle; +#if HAS_IMU + if (ao_sensor_errors) + ao_flight_state = ao_flight_invalid; +#endif #if HAS_ACCEL && HAS_RADIO && PACKET_HAS_SLAVE /* Turn on packet system in idle mode on TeleMetrum */ -- cgit v1.2.3 From 755082d36231c1b247bc0e1f13919dd9b5c362a8 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 20 Dec 2013 22:13:32 -0800 Subject: altos: mma655x also needs ao_sensor_errors TeleMetrum has an MMA655X but no IMU, so it needs an explicit addition for sensor errors. Signed-off-by: Keith Packard --- src/core/ao_flight.c | 4 ++-- src/core/ao_flight.h | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/core/ao_flight.c b/src/core/ao_flight.c index 5918b997..aac6880d 100644 --- a/src/core/ao_flight.c +++ b/src/core/ao_flight.c @@ -46,7 +46,7 @@ __pdata enum ao_flight_state ao_flight_state; /* current flight state */ __pdata uint16_t ao_boost_tick; /* time of launch detect */ __pdata uint16_t ao_motor_number; /* number of motors burned so far */ -#if HAS_IMU +#if HAS_SENSOR_ERRORS /* Any sensor can set this to mark the flight computer as 'broken' */ __xdata uint8_t ao_sensor_errors; #endif @@ -150,7 +150,7 @@ ao_flight(void) } else { /* Set idle mode */ ao_flight_state = ao_flight_idle; -#if HAS_IMU +#if HAS_SENSOR_ERRORS if (ao_sensor_errors) ao_flight_state = ao_flight_invalid; #endif diff --git a/src/core/ao_flight.h b/src/core/ao_flight.h index c7c02ccf..01d21c11 100644 --- a/src/core/ao_flight.h +++ b/src/core/ao_flight.h @@ -41,7 +41,11 @@ extern __pdata enum ao_flight_state ao_flight_state; extern __pdata uint16_t ao_boost_tick; extern __pdata uint16_t ao_motor_number; -#if HAS_IMU +#if HAS_IMU || HAS_MMA655X +#define HAS_SENSOR_ERRORS 1 +#endif + +#if HAS_SENSOR_ERRORS extern __xdata uint8_t ao_sensor_errors; #endif -- cgit v1.2.3 From b31b4622d5bd92c0cc0851818f5b595dbdb60ead Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 20 Dec 2013 22:15:25 -0800 Subject: altos: Clean up some minor warnings from -Wall Unused variables, functions and labels, missing enums in switch. Signed-off-by: Keith Packard --- src/core/ao_gps_report_mega.c | 1 - src/core/ao_ignite.c | 4 ++++ src/core/ao_telemetry.c | 1 - src/drivers/ao_cc1120.c | 10 ++++------ src/drivers/ao_hmc5883.c | 1 - src/drivers/ao_mpu6000.c | 1 - src/stm/ao_adc_stm.c | 4 +++- src/stm/ao_i2c_stm.c | 6 ------ src/stm/ao_usb_stm.c | 4 ---- 9 files changed, 11 insertions(+), 21 deletions(-) diff --git a/src/core/ao_gps_report_mega.c b/src/core/ao_gps_report_mega.c index d13885dd..07a2bc5b 100644 --- a/src/core/ao_gps_report_mega.c +++ b/src/core/ao_gps_report_mega.c @@ -24,7 +24,6 @@ ao_gps_report_mega(void) static __xdata struct ao_log_mega gps_log; static __xdata struct ao_telemetry_location gps_data; static __xdata struct ao_telemetry_satellite gps_tracking_data; - uint8_t date_reported = 0; uint8_t new; uint8_t c, n, i; diff --git a/src/core/ao_ignite.c b/src/core/ao_ignite.c index 9f2ec0a7..823d003c 100644 --- a/src/core/ao_ignite.c +++ b/src/core/ao_ignite.c @@ -114,6 +114,8 @@ ao_igniter_fire(enum ao_igniter igniter) ao_delay(AO_IGNITER_FIRE_TIME); AO_IGNITER_SET_MAIN(0); break; + default: + break; } break; case AO_IGNITE_MODE_MAIN: @@ -127,6 +129,8 @@ ao_igniter_fire(enum ao_igniter igniter) ao_delay(AO_IGNITER_FIRE_TIME); AO_IGNITER_SET_MAIN(0); break; + default: + break; } break; } diff --git a/src/core/ao_telemetry.c b/src/core/ao_telemetry.c index c118d007..e529b717 100644 --- a/src/core/ao_telemetry.c +++ b/src/core/ao_telemetry.c @@ -473,7 +473,6 @@ ao_telemetry(void) } else time = ao_time(); - bottom: ; } } } diff --git a/src/drivers/ao_cc1120.c b/src/drivers/ao_cc1120.c index 37d04927..3429768b 100644 --- a/src/drivers/ao_cc1120.c +++ b/src/drivers/ao_cc1120.c @@ -152,6 +152,7 @@ ao_radio_strobe(uint8_t addr) return in; } +#if 0 static uint8_t ao_radio_fifo_read(uint8_t *data, uint8_t len) { @@ -166,6 +167,7 @@ ao_radio_fifo_read(uint8_t *data, uint8_t len) ao_radio_deselect(); return status; } +#endif static uint8_t ao_radio_fifo_write_start(void) @@ -207,11 +209,13 @@ ao_radio_tx_fifo_space(void) return CC1120_FIFO_SIZE - ao_radio_reg_read(CC1120_NUM_TXBYTES); } +#if 0 static uint8_t ao_radio_status(void) { return ao_radio_strobe (CC1120_SNOP); } +#endif void ao_radio_recv_abort(void) @@ -751,13 +755,11 @@ static uint8_t tx_data[(AO_RADIO_MAX_SEND + 4) * 2]; void ao_radio_send(const void *d, uint8_t size) { - uint8_t marc_status; uint8_t *e = tx_data; uint8_t encode_len; uint8_t this_len; uint8_t started = 0; uint8_t fifo_space; - uint8_t q; encode_len = ao_fec_encode(d, size, tx_data); @@ -948,11 +950,9 @@ uint8_t ao_radio_recv(__xdata void *d, uint8_t size, uint8_t timeout) { uint8_t len; - uint16_t i; uint8_t radio_rssi = 0; uint8_t rssi0; uint8_t ret; - static int been_here = 0; size -= 2; /* status bytes */ if (size > AO_RADIO_MAX_RECV) { @@ -1334,8 +1334,6 @@ static const struct ao_cmds ao_radio_cmds[] = { void ao_radio_init(void) { - int i; - ao_radio_configured = 0; ao_spi_init_cs (AO_CC1120_SPI_CS_PORT, (1 << AO_CC1120_SPI_CS_PIN)); diff --git a/src/drivers/ao_hmc5883.c b/src/drivers/ao_hmc5883.c index 782d03f4..2d217bcf 100644 --- a/src/drivers/ao_hmc5883.c +++ b/src/drivers/ao_hmc5883.c @@ -70,7 +70,6 @@ ao_hmc5883_sample(struct ao_hmc5883_sample *sample) { uint16_t *d = (uint16_t *) sample; int i = sizeof (*sample) / 2; - uint8_t single = HMC5883_MODE_SINGLE; ao_hmc5883_done = 0; ao_exti_enable(AO_HMC5883_INT_PORT, AO_HMC5883_INT_PIN); diff --git a/src/drivers/ao_mpu6000.c b/src/drivers/ao_mpu6000.c index f8ce7346..0689d7a7 100644 --- a/src/drivers/ao_mpu6000.c +++ b/src/drivers/ao_mpu6000.c @@ -21,7 +21,6 @@ #if HAS_MPU6000 -static uint8_t ao_mpu6000_wake; static uint8_t ao_mpu6000_configured; #ifndef AO_MPU6000_I2C_INDEX diff --git a/src/stm/ao_adc_stm.c b/src/stm/ao_adc_stm.c index 53f19b40..505addfa 100644 --- a/src/stm/ao_adc_stm.c +++ b/src/stm/ao_adc_stm.c @@ -109,8 +109,10 @@ static void ao_adc_dump(void) __reentrant { struct ao_data packet; - int16_t *d; +#ifndef AO_ADC_DUMP uint8_t i; + int16_t *d; +#endif ao_data_get(&packet); #ifdef AO_ADC_DUMP diff --git a/src/stm/ao_i2c_stm.c b/src/stm/ao_i2c_stm.c index 809b5c6f..1c90cdb8 100644 --- a/src/stm/ao_i2c_stm.c +++ b/src/stm/ao_i2c_stm.c @@ -185,7 +185,6 @@ uint8_t ao_i2c_start(uint8_t index, uint16_t addr) { struct stm_i2c *stm_i2c = ao_i2c_stm_info[index].stm_i2c; - uint32_t sr1, sr2; int t; ao_i2c_state[index] = I2C_IDLE; @@ -239,10 +238,7 @@ uint8_t ao_i2c_send(void *block, uint16_t len, uint8_t index, uint8_t stop) { struct stm_i2c *stm_i2c = ao_i2c_stm_info[index].stm_i2c; - uint8_t *b = block; - uint32_t sr1; uint8_t tx_dma_index = ao_i2c_stm_info[index].tx_dma_index; - int t; /* Clear any pending ADDR bit */ (void) stm_i2c->sr2; @@ -304,8 +300,6 @@ uint8_t ao_i2c_recv(void *block, uint16_t len, uint8_t index, uint8_t stop) { struct stm_i2c *stm_i2c = ao_i2c_stm_info[index].stm_i2c; - uint8_t *b = block; - int t; uint8_t ret = TRUE; if (len == 0) diff --git a/src/stm/ao_usb_stm.c b/src/stm/ao_usb_stm.c index 28a9f9f3..27b82357 100644 --- a/src/stm/ao_usb_stm.c +++ b/src/stm/ao_usb_stm.c @@ -119,7 +119,6 @@ static uint8_t ao_usb_in_pending; static uint8_t ao_usb_out_avail; static uint8_t ao_usb_running; static uint8_t ao_usb_configuration; -static uint8_t ueienx_0; #define AO_USB_EP0_GOT_RESET 1 #define AO_USB_EP0_GOT_SETUP 2 @@ -313,7 +312,6 @@ ao_usb_init_ep(uint8_t ep, uint32_t addr, uint32_t type, uint32_t stat_rx, uint3 static void ao_usb_set_ep0(void) { - uint32_t epr; int e; ao_usb_sram_addr = 0; @@ -356,8 +354,6 @@ ao_usb_set_ep0(void) static void ao_usb_set_configuration(void) { - uint32_t epr; - debug ("ao_usb_set_configuration\n"); /* Set up the INT end point */ -- cgit v1.2.3 From db8f3426ac1cf756a2e4974ca61a5ae9048c80ce Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 20 Dec 2013 22:21:23 -0800 Subject: altos: Turn on -Wall for stm compiles The warnings are all cleaned up now, leave this on by default Signed-off-by: Keith Packard --- src/stm/Makefile.defs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/stm/Makefile.defs b/src/stm/Makefile.defs index 9adcfeb3..d0e5a699 100644 --- a/src/stm/Makefile.defs +++ b/src/stm/Makefile.defs @@ -24,8 +24,11 @@ include $(TOPDIR)/Makedefs CC=$(ARM_CC) LIBS=$(PDCLIB_LIBS_M3) -lgcc +WARN_FLAGS=-Wall + AO_CFLAGS=-I. -I../stm -I../core -I../drivers -I../math -I.. $(PDCLIB_INCLUDES) -STM_CFLAGS=-std=gnu99 -mlittle-endian -mcpu=cortex-m3 -mthumb -ffreestanding -nostdlib $(AO_CFLAGS) +STM_CFLAGS=-std=gnu99 -mlittle-endian -mcpu=cortex-m3 -mthumb \ + -ffreestanding -nostdlib $(AO_CFLAGS) $(WARN_FLAGS) LDFLAGS=-L../stm -Wl,-Taltos.ld -- cgit v1.2.3 From 5c9172ba5681ff93d63c9c263a453d0025170045 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 20 Dec 2013 22:43:18 -0800 Subject: altos: Clean up -Wextra warnings Unused variables, mismatching signed/unsigned and a few other misc warnings. Signed-off-by: Keith Packard --- src/aes/ao_aes.c | 1 + src/core/ao_config.c | 2 ++ src/core/ao_fec.h | 2 +- src/core/ao_gps_report_metrum.c | 3 +-- src/core/ao_log_metrum.c | 1 - src/core/ao_radio_cmac.c | 1 - src/core/ao_telemetry.c | 1 - src/drivers/ao_cc1120.c | 4 ++-- src/drivers/ao_companion.c | 4 ++-- src/drivers/ao_event.c | 2 +- src/drivers/ao_event.h | 2 +- src/drivers/ao_lco_cmd.c | 1 - src/drivers/ao_lco_func.c | 1 - src/drivers/ao_mpu6000.c | 16 ++++++++-------- src/math/ef_rem_pio2.c | 2 +- src/stm/ao_adc_stm.c | 1 + src/stm/ao_exti_stm.c | 5 +++++ src/stm/ao_lcd_stm.c | 3 +-- src/stm/ao_profile.h | 2 +- src/stm/ao_spi_stm_slave.c | 2 +- src/stm/stm32l.h | 6 +++--- src/telelco-v0.2/ao_lco.c | 4 ---- 22 files changed, 32 insertions(+), 34 deletions(-) diff --git a/src/aes/ao_aes.c b/src/aes/ao_aes.c index 52463f5d..a04174c6 100644 --- a/src/aes/ao_aes.c +++ b/src/aes/ao_aes.c @@ -367,6 +367,7 @@ static uint8_t iv[16]; void ao_aes_set_mode(enum ao_aes_mode mode) { + (void) mode; /* we only do CBC_MAC anyways... */ } diff --git a/src/core/ao_config.c b/src/core/ao_config.c index 4a1c58b9..590d8a49 100644 --- a/src/core/ao_config.c +++ b/src/core/ao_config.c @@ -658,8 +658,10 @@ ao_config_help(void) __reentrant; static void ao_config_show(void) __reentrant; +#if HAS_EEPROM static void ao_config_save(void) __reentrant; +#endif __code struct ao_config_var ao_config_vars[] = { #if HAS_FLIGHT diff --git a/src/core/ao_fec.h b/src/core/ao_fec.h index eedea8f4..618756c1 100644 --- a/src/core/ao_fec.h +++ b/src/core/ao_fec.h @@ -31,7 +31,7 @@ void ao_fec_dump_bytes(const uint8_t *bytes, uint16_t len, const char *name); #endif -static uint16_t inline +static inline uint16_t ao_fec_crc_byte(uint8_t byte, uint16_t crc) { uint8_t bit; diff --git a/src/core/ao_gps_report_metrum.c b/src/core/ao_gps_report_metrum.c index fa038976..696a833b 100644 --- a/src/core/ao_gps_report_metrum.c +++ b/src/core/ao_gps_report_metrum.c @@ -24,9 +24,8 @@ ao_gps_report_metrum(void) static __xdata struct ao_log_metrum gps_log; static __xdata struct ao_telemetry_location gps_data; static __xdata struct ao_telemetry_satellite gps_tracking_data; - uint8_t c, n, i, p, valid, packets; + uint8_t c, n, i; uint8_t svid; - uint8_t date_reported = 0; uint8_t new; for (;;) { diff --git a/src/core/ao_log_metrum.c b/src/core/ao_log_metrum.c index 43441e7a..91624d98 100644 --- a/src/core/ao_log_metrum.c +++ b/src/core/ao_log_metrum.c @@ -81,7 +81,6 @@ void ao_log(void) { __pdata uint16_t next_sensor, next_other; - uint8_t i; ao_storage_setup(); diff --git a/src/core/ao_radio_cmac.c b/src/core/ao_radio_cmac.c index 3ca3c313..bff848f6 100644 --- a/src/core/ao_radio_cmac.c +++ b/src/core/ao_radio_cmac.c @@ -21,7 +21,6 @@ static __xdata uint8_t ao_radio_cmac_mutex; __pdata int8_t ao_radio_cmac_rssi; static __xdata uint8_t cmac_data[AO_CMAC_MAX_LEN + AO_CMAC_KEY_LEN + 2 + AO_CMAC_KEY_LEN]; -static __pdata uint8_t ao_radio_cmac_len; static uint8_t round_len(uint8_t len) diff --git a/src/core/ao_telemetry.c b/src/core/ao_telemetry.c index e529b717..86158063 100644 --- a/src/core/ao_telemetry.c +++ b/src/core/ao_telemetry.c @@ -211,7 +211,6 @@ ao_send_metrum_data(void) { if (--ao_telemetry_metrum_data_cur <= 0) { __xdata struct ao_data *packet = (__xdata struct ao_data *) &ao_data_ring[ao_data_ring_prev(ao_sample_data)]; - uint8_t i; telemetry.generic.tick = packet->tick; telemetry.generic.type = AO_TELEMETRY_METRUM_DATA; diff --git a/src/drivers/ao_cc1120.c b/src/drivers/ao_cc1120.c index 3429768b..31225939 100644 --- a/src/drivers/ao_cc1120.c +++ b/src/drivers/ao_cc1120.c @@ -509,7 +509,7 @@ static void ao_radio_set_mode(uint16_t new_mode) { uint16_t changes; - int i; + unsigned int i; if (new_mode == ao_radio_mode) return; @@ -563,7 +563,7 @@ static uint8_t ao_radio_configured = 0; static void ao_radio_setup(void) { - int i; + unsigned int i; ao_radio_strobe(CC1120_SRES); diff --git a/src/drivers/ao_companion.c b/src/drivers/ao_companion.c index 0f405253..570b9e40 100644 --- a/src/drivers/ao_companion.c +++ b/src/drivers/ao_companion.c @@ -67,8 +67,8 @@ ao_companion_get_setup(void) ao_companion_send_command(AO_COMPANION_SETUP); ao_spi_recv(&ao_companion_setup, sizeof (ao_companion_setup), AO_COMPANION_SPI_BUS); COMPANION_DESELECT(); - return (ao_companion_setup.board_id == - (uint16_t) ~ao_companion_setup.board_id_inverse); + return ((int16_t) ao_companion_setup.board_id == + (int16_t) (uint16_t) (~ao_companion_setup.board_id_inverse)); } static void diff --git a/src/drivers/ao_event.c b/src/drivers/ao_event.c index c428125d..5c0d2863 100644 --- a/src/drivers/ao_event.c +++ b/src/drivers/ao_event.c @@ -30,7 +30,7 @@ uint8_t ao_event_queue_insert; uint8_t ao_event_queue_remove; -uint8_t +void ao_event_get(struct ao_event *ev) { ao_arch_critical( diff --git a/src/drivers/ao_event.h b/src/drivers/ao_event.h index ed9a7433..584a845a 100644 --- a/src/drivers/ao_event.h +++ b/src/drivers/ao_event.h @@ -29,7 +29,7 @@ struct ao_event { int32_t value; }; -uint8_t +void ao_event_get(struct ao_event *ev); void diff --git a/src/drivers/ao_lco_cmd.c b/src/drivers/ao_lco_cmd.c index 9c35b324..acbf589a 100644 --- a/src/drivers/ao_lco_cmd.c +++ b/src/drivers/ao_lco_cmd.c @@ -119,7 +119,6 @@ lco_report_cmd(void) __reentrant static void lco_fire_cmd(void) __reentrant { - static __xdata struct ao_pad_command command; uint8_t secs; uint8_t i; int8_t r; diff --git a/src/drivers/ao_lco_func.c b/src/drivers/ao_lco_func.c index 99e58b76..a5d28e61 100644 --- a/src/drivers/ao_lco_func.c +++ b/src/drivers/ao_lco_func.c @@ -26,7 +26,6 @@ static __xdata uint8_t ao_lco_mutex; int8_t ao_lco_query(uint16_t box, struct ao_pad_query *query, uint16_t *tick_offset) { - uint8_t i; int8_t r; uint16_t sent_time; diff --git a/src/drivers/ao_mpu6000.c b/src/drivers/ao_mpu6000.c index 0689d7a7..c0458027 100644 --- a/src/drivers/ao_mpu6000.c +++ b/src/drivers/ao_mpu6000.c @@ -132,7 +132,7 @@ ao_mpu6000_gyro(int16_t v) #endif static uint8_t -ao_mpu6000_accel_check(int16_t normal, int16_t test, char *which) +ao_mpu6000_accel_check(int16_t normal, int16_t test) { int16_t diff = test - normal; @@ -146,7 +146,7 @@ ao_mpu6000_accel_check(int16_t normal, int16_t test, char *which) } static uint8_t -ao_mpu6000_gyro_check(int16_t normal, int16_t test, char *which) +ao_mpu6000_gyro_check(int16_t normal, int16_t test) { int16_t diff = test - normal; @@ -292,13 +292,13 @@ _ao_mpu6000_setup(void) ao_delay(AO_MS_TO_TICKS(200)); _ao_mpu6000_sample(&normal_mode); - errors += ao_mpu6000_accel_check(normal_mode.accel_x, test_mode.accel_x, "x"); - errors += ao_mpu6000_accel_check(normal_mode.accel_y, test_mode.accel_y, "y"); - errors += ao_mpu6000_accel_check(normal_mode.accel_z, test_mode.accel_z, "z"); + errors += ao_mpu6000_accel_check(normal_mode.accel_x, test_mode.accel_x); + errors += ao_mpu6000_accel_check(normal_mode.accel_y, test_mode.accel_y); + errors += ao_mpu6000_accel_check(normal_mode.accel_z, test_mode.accel_z); - errors += ao_mpu6000_gyro_check(normal_mode.gyro_x, test_mode.gyro_x, "x"); - errors += ao_mpu6000_gyro_check(normal_mode.gyro_y, test_mode.gyro_y, "y"); - errors += ao_mpu6000_gyro_check(normal_mode.gyro_z, test_mode.gyro_z, "z"); + errors += ao_mpu6000_gyro_check(normal_mode.gyro_x, test_mode.gyro_x); + errors += ao_mpu6000_gyro_check(normal_mode.gyro_y, test_mode.gyro_y); + errors += ao_mpu6000_gyro_check(normal_mode.gyro_z, test_mode.gyro_z); if (!errors) break; } diff --git a/src/math/ef_rem_pio2.c b/src/math/ef_rem_pio2.c index f1191d09..3e58f809 100644 --- a/src/math/ef_rem_pio2.c +++ b/src/math/ef_rem_pio2.c @@ -142,7 +142,7 @@ pio2_3t = 6.1232342629e-17; /* 0x248d3132 */ fn = (float)n; r = t-fn*pio2_1; w = fn*pio2_1t; /* 1st round good to 40 bit */ - if(n<32&&(ix&0xffffff00)!=npio2_hw[n-1]) { + if(n<32&&(ix&(__int32_t)0xffffff00)!=npio2_hw[n-1]) { y[0] = r-w; /* quick check no cancellation */ } else { __uint32_t high; diff --git a/src/stm/ao_adc_stm.c b/src/stm/ao_adc_stm.c index 505addfa..53d4b8c3 100644 --- a/src/stm/ao_adc_stm.c +++ b/src/stm/ao_adc_stm.c @@ -41,6 +41,7 @@ static uint8_t ao_adc_ready; */ static void ao_adc_done(int index) { + (void) index; AO_DATA_PRESENT(AO_DATA_ADC); ao_dma_done_transfer(STM_DMA_INDEX(STM_DMA_CHANNEL_ADC1)); if (ao_data_present == AO_DATA_ALL) { diff --git a/src/stm/ao_exti_stm.c b/src/stm/ao_exti_stm.c index c1dcdf85..35958cf8 100644 --- a/src/stm/ao_exti_stm.c +++ b/src/stm/ao_exti_stm.c @@ -119,6 +119,8 @@ ao_exti_setup (struct stm_gpio *gpio, uint8_t pin, uint8_t mode, void (*callback void ao_exti_set_mode(struct stm_gpio *gpio, uint8_t pin, uint8_t mode) { + (void) gpio; + uint32_t mask = 1 << pin; if (mode & AO_EXTI_MODE_RISING) @@ -133,12 +135,14 @@ ao_exti_set_mode(struct stm_gpio *gpio, uint8_t pin, uint8_t mode) { void ao_exti_set_callback(struct stm_gpio *gpio, uint8_t pin, void (*callback)()) { + (void) gpio; ao_exti_callback[pin] = callback; } void ao_exti_enable(struct stm_gpio *gpio, uint8_t pin) { uint32_t mask = (1 << pin); + (void) gpio; stm_exti.pr = mask; stm_exti.imr |= (1 << pin); } @@ -146,6 +150,7 @@ ao_exti_enable(struct stm_gpio *gpio, uint8_t pin) { void ao_exti_disable(struct stm_gpio *gpio, uint8_t pin) { uint32_t mask = (1 << pin); + (void) gpio; stm_exti.imr &= ~mask; stm_exti.pr = mask; } diff --git a/src/stm/ao_lcd_stm.c b/src/stm/ao_lcd_stm.c index 47ea374e..95af53d1 100644 --- a/src/stm/ao_lcd_stm.c +++ b/src/stm/ao_lcd_stm.c @@ -346,8 +346,7 @@ static const struct ao_cmds ao_lcd_stm_cmds[] = { void ao_lcd_stm_init(void) { - int s, c; - int r; + unsigned int s, c; uint32_t csr; stm_rcc.ahbenr |= ((AO_LCD_STM_USES_GPIOA << STM_RCC_AHBENR_GPIOAEN) | diff --git a/src/stm/ao_profile.h b/src/stm/ao_profile.h index f7dd029d..f8a0c25e 100644 --- a/src/stm/ao_profile.h +++ b/src/stm/ao_profile.h @@ -20,7 +20,7 @@ void ao_profile_init(); -static uint32_t inline ao_profile_tick(void) { +static inline uint32_t ao_profile_tick(void) { uint16_t hi, lo, second_hi; do { diff --git a/src/stm/ao_spi_stm_slave.c b/src/stm/ao_spi_stm_slave.c index 98022442..962ff2c6 100644 --- a/src/stm/ao_spi_stm_slave.c +++ b/src/stm/ao_spi_stm_slave.c @@ -97,7 +97,6 @@ ao_spi_slave_send(void *block, uint16_t len) ao_dma_done_transfer(miso_dma_index); } - uint8_t ao_spi_slave_recv(void *block, uint16_t len) { @@ -153,6 +152,7 @@ ao_spi_slave_recv(void *block, uint16_t len) ao_dma_done_transfer(mosi_dma_index); ao_dma_done_transfer(miso_dma_index); + return 1; } static void diff --git a/src/stm/stm32l.h b/src/stm/stm32l.h index ff3f5336..302f4d24 100644 --- a/src/stm/stm32l.h +++ b/src/stm/stm32l.h @@ -52,7 +52,7 @@ stm_moder_set(struct stm_gpio *gpio, int pin, vuint32_t value) { value << STM_MODER_SHIFT(pin)); } -static inline vuint32_t +static inline uint32_t stm_moder_get(struct stm_gpio *gpio, int pin) { return (gpio->moder >> STM_MODER_SHIFT(pin)) & STM_MODER_MASK; } @@ -69,7 +69,7 @@ stm_otyper_set(struct stm_gpio *gpio, int pin, vuint32_t value) { value << STM_OTYPER_SHIFT(pin)); } -static inline vuint32_t +static inline uint32_t stm_otyper_get(struct stm_gpio *gpio, int pin) { return (gpio->otyper >> STM_OTYPER_SHIFT(pin)) & STM_OTYPER_MASK; } @@ -88,7 +88,7 @@ stm_ospeedr_set(struct stm_gpio *gpio, int pin, vuint32_t value) { value << STM_OSPEEDR_SHIFT(pin)); } -static inline vuint32_t +static inline uint32_t stm_ospeedr_get(struct stm_gpio *gpio, int pin) { return (gpio->ospeedr >> STM_OSPEEDR_SHIFT(pin)) & STM_OSPEEDR_MASK; } diff --git a/src/telelco-v0.2/ao_lco.c b/src/telelco-v0.2/ao_lco.c index e8d16ca9..0bbb76f1 100644 --- a/src/telelco-v0.2/ao_lco.c +++ b/src/telelco-v0.2/ao_lco.c @@ -37,7 +37,6 @@ static uint8_t ao_lco_debug; #define AO_LCO_BOX_DIGIT_10 2 static uint8_t ao_lco_min_box, ao_lco_max_box; -static uint8_t ao_lco_mutex; static uint8_t ao_lco_pad; static uint8_t ao_lco_box; static uint8_t ao_lco_armed; @@ -281,12 +280,9 @@ static void ao_lco_igniter_status(void) { uint8_t c; - uint16_t delay; for (;;) { -// ao_alarm(delay); ao_sleep(&ao_pad_query); -// ao_clear_alarm(); if (!ao_lco_valid) { ao_led_on(AO_LED_RED); ao_led_off(AO_LED_GREEN|AO_LED_AMBER); -- cgit v1.2.3 From 316d898715746a379068ac8511692bdb9da14b39 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 20 Dec 2013 22:44:20 -0800 Subject: altos: unsigned value in ao_pyro_set checked for negative value No sense checking unsigned values for less than zero. Signed-off-by: Keith Packard --- src/core/ao_pyro.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ao_pyro.c b/src/core/ao_pyro.c index a260aa99..e59f5bc4 100644 --- a/src/core/ao_pyro.c +++ b/src/core/ao_pyro.c @@ -436,7 +436,7 @@ ao_pyro_set(void) if (ao_cmd_status != ao_cmd_success) return; p = ao_cmd_lex_i; - if (p < 0 || AO_PYRO_NUM <= p) { + if (AO_PYRO_NUM <= p) { printf ("invalid pyro channel %d\n", p); return; } -- cgit v1.2.3 From 1406a5b0721a135913a9801e9eea9e91f0a536b4 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 20 Dec 2013 22:45:01 -0800 Subject: altos: Add default button return value from ao_button_get This "can't" happen, but it's not unreasonable to have a default return value. Signed-off-by: Keith Packard --- src/drivers/ao_button.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/drivers/ao_button.c b/src/drivers/ao_button.c index 25c0cd5c..cdf07352 100644 --- a/src/drivers/ao_button.c +++ b/src/drivers/ao_button.c @@ -59,6 +59,7 @@ _ao_button_get(struct ao_debounce *debounce) case 4: return ao_button_value(4); #endif } + return 0; } static void -- cgit v1.2.3 From 4ed108fb86676daea17264d7159c2cff9ea7a6e4 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 20 Dec 2013 22:45:56 -0800 Subject: altos/stm: Turn on -Wextra All of the warnings for STM projects are cleaned up now Signed-off-by: Keith Packard --- src/stm/Makefile.defs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stm/Makefile.defs b/src/stm/Makefile.defs index d0e5a699..1e31e590 100644 --- a/src/stm/Makefile.defs +++ b/src/stm/Makefile.defs @@ -24,7 +24,7 @@ include $(TOPDIR)/Makedefs CC=$(ARM_CC) LIBS=$(PDCLIB_LIBS_M3) -lgcc -WARN_FLAGS=-Wall +WARN_FLAGS=-Wall -Wextra AO_CFLAGS=-I. -I../stm -I../core -I../drivers -I../math -I.. $(PDCLIB_INCLUDES) STM_CFLAGS=-std=gnu99 -mlittle-endian -mcpu=cortex-m3 -mthumb \ -- cgit v1.2.3 From e11fcc299f4a1a0461a3442ca13f8984d76c30ff Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 20 Dec 2013 22:58:10 -0800 Subject: altos: Clean up warnings for LPC products Unused varibles, functions and parameters. Signed-off-by: Keith Packard --- src/core/ao_log.c | 2 ++ src/core/ao_log_mini.c | 4 ++-- src/core/ao_notask.c | 1 + src/core/ao_telemetry.c | 2 +- src/drivers/ao_cc115l.c | 26 +++++++++++--------------- src/lpc/ao_adc_lpc.c | 2 ++ src/lpc/ao_spi_lpc.c | 2 -- src/lpc/ao_usb_lpc.c | 10 ++++++++-- src/product/ao_flash_task.c | 1 + 9 files changed, 28 insertions(+), 22 deletions(-) diff --git a/src/core/ao_log.c b/src/core/ao_log.c index 701c81ab..20febefe 100644 --- a/src/core/ao_log.c +++ b/src/core/ao_log.c @@ -196,7 +196,9 @@ ao_log_full(void) return ao_log_current_pos == ao_log_end_pos; } +#if HAS_ADC static __xdata struct ao_task ao_log_task; +#endif void ao_log_list(void) __reentrant diff --git a/src/core/ao_log_mini.c b/src/core/ao_log_mini.c index 99a85982..29e3bd9f 100644 --- a/src/core/ao_log_mini.c +++ b/src/core/ao_log_mini.c @@ -78,7 +78,7 @@ typedef uint8_t check_log_size[1-(256 % sizeof(struct ao_log_mini))] ; void ao_log(void) { - __pdata uint16_t next_sensor, next_other; + __pdata uint16_t next_sensor; ao_storage_setup(); @@ -99,7 +99,7 @@ ao_log(void) * when starting up. */ ao_log_data_pos = ao_data_ring_next(ao_data_head); - next_other = next_sensor = ao_data_ring[ao_log_data_pos].tick; + next_sensor = ao_data_ring[ao_log_data_pos].tick; ao_log_state = ao_flight_startup; for (;;) { /* Write samples to EEPROM */ diff --git a/src/core/ao_notask.c b/src/core/ao_notask.c index a41712d2..6f967e6d 100644 --- a/src/core/ao_notask.c +++ b/src/core/ao_notask.c @@ -41,5 +41,6 @@ ao_sleep(__xdata void *wchan) void ao_wakeup(__xdata void *wchan) { + (void) wchan; ao_wchan = 0; } diff --git a/src/core/ao_telemetry.c b/src/core/ao_telemetry.c index 86158063..5a00d825 100644 --- a/src/core/ao_telemetry.c +++ b/src/core/ao_telemetry.c @@ -24,9 +24,9 @@ #endif static __pdata uint16_t ao_telemetry_interval; -static __pdata uint8_t ao_rdf = 0; #if HAS_RDF +static __pdata uint8_t ao_rdf = 0; static __pdata uint16_t ao_rdf_time; #endif diff --git a/src/drivers/ao_cc115l.c b/src/drivers/ao_cc115l.c index 0fa1e899..5d4f3bd6 100644 --- a/src/drivers/ao_cc115l.c +++ b/src/drivers/ao_cc115l.c @@ -29,8 +29,6 @@ static uint8_t ao_radio_fifo; /* fifo drained interrupt received */ static uint8_t ao_radio_done; /* tx done interrupt received */ static uint8_t ao_radio_wake; /* sleep address for radio interrupts */ static uint8_t ao_radio_abort; /* radio operation should abort */ -static uint8_t ao_radio_mcu_wake; /* MARC status change */ -static uint8_t ao_radio_marcstate; /* Last read MARC state value */ /* Debugging commands */ #define CC115L_DEBUG 0 @@ -106,7 +104,6 @@ static uint8_t ao_radio_reg_read(uint8_t addr) { uint8_t data[1]; - uint8_t d; data[0] = ((1 << CC115L_READ) | (0 << CC115L_BURST) | @@ -123,7 +120,6 @@ static void ao_radio_reg_write(uint8_t addr, uint8_t value) { uint8_t data[2]; - uint8_t d; trace_add(trace_write, addr, value, NULL); data[0] = ((0 << CC115L_READ) | @@ -135,11 +131,11 @@ ao_radio_reg_write(uint8_t addr, uint8_t value) ao_radio_deselect(); } +#if UNUSED static void ao_radio_burst_read_start (uint16_t addr) { uint8_t data[1]; - uint8_t d; data[0] = ((1 << CC115L_READ) | (1 << CC115L_BURST) | @@ -153,6 +149,7 @@ ao_radio_burst_read_stop (void) { ao_radio_deselect(); } +#endif static uint8_t @@ -200,19 +197,23 @@ ao_radio_tx_fifo_space(void) return CC115L_FIFO_SIZE - (ao_radio_reg_read(CC115L_TXBYTES) & CC115L_TXBYTES_NUM_TX_BYTES_MASK); } +#if UNUSED static uint8_t ao_radio_status(void) { return ao_radio_strobe (CC115L_SNOP); } +#endif #define ao_radio_rdf_value 0x55 +#if UNUSED static uint8_t ao_radio_get_marcstate(void) { return ao_radio_reg_read(CC115L_MARCSTATE) & CC115L_MARCSTATE_MASK; } +#endif static void ao_radio_done_isr(void) @@ -232,11 +233,6 @@ ao_radio_fifo_isr(void) ao_wakeup(&ao_radio_wake); } -static void -ao_radio_start_tx(void) -{ -} - static void ao_radio_idle(void) { @@ -401,7 +397,7 @@ static void ao_radio_set_mode(uint16_t new_mode) { uint16_t changes; - int i; + unsigned int i; if (new_mode == ao_radio_mode) return; @@ -466,7 +462,7 @@ static uint8_t ao_radio_configured = 0; static void ao_radio_setup(void) { - int i; + unsigned int i; ao_radio_strobe(CC115L_SRES); ao_delay(AO_MS_TO_TICKS(10)); @@ -730,8 +726,6 @@ ao_radio_send_fill(uint8_t *buf, int16_t len) void ao_radio_send(const void *d, uint8_t size) { - int i; - ao_radio_get(); ao_radio_send_len = ao_fec_encode(d, size, tx_data); ao_radio_send_buf = tx_data; @@ -912,7 +906,6 @@ static void ao_radio_packet(void) { ao_radio_send(packet, sizeof (packet)); } -#endif /* CC115L_DEBUG */ #if HAS_APRS #include @@ -926,6 +919,7 @@ ao_radio_aprs() ao_aprs_send(); } #endif +#endif /* CC115L_DEBUG */ static const struct ao_cmds ao_radio_cmds[] = { { ao_radio_test_cmd, "C <1 start, 0 stop, none both>\0Radio carrier test" }, @@ -943,7 +937,9 @@ static const struct ao_cmds ao_radio_cmds[] = { void ao_radio_init(void) { +#if 0 int i; +#endif ao_radio_configured = 0; ao_spi_init_cs (AO_CC115L_SPI_CS_PORT, (1 << AO_CC115L_SPI_CS_PIN)); diff --git a/src/lpc/ao_adc_lpc.c b/src/lpc/ao_adc_lpc.c index 7005f86e..e1aae0e4 100644 --- a/src/lpc/ao_adc_lpc.c +++ b/src/lpc/ao_adc_lpc.c @@ -149,8 +149,10 @@ static void ao_adc_dump(void) __reentrant { struct ao_data packet; +#ifndef AO_ADC_DUMP int16_t *d; uint8_t i; +#endif ao_data_get(&packet); #ifdef AO_ADC_DUMP diff --git a/src/lpc/ao_spi_lpc.c b/src/lpc/ao_spi_lpc.c index a889137c..e72b8286 100644 --- a/src/lpc/ao_spi_lpc.c +++ b/src/lpc/ao_spi_lpc.c @@ -21,8 +21,6 @@ static uint8_t ao_spi_mutex[LPC_NUM_SPI]; static struct lpc_ssp * const ao_lpc_ssp[LPC_NUM_SPI] = { &lpc_ssp0, &lpc_ssp1 }; -static uint8_t spi_dev_null; - #define tx_busy(lpc_ssp) (lpc_ssp->sr & ((1 << LPC_SSP_SR_BSY) | (1 << LPC_SSP_SR_TNF))) != (1 << LPC_SSP_SR_TNF) #define rx_busy(lpc_ssp) (lpc_ssp->sr & ((1 << LPC_SSP_SR_BSY) | (1 << LPC_SSP_SR_RNE))) != (1 << LPC_SSP_SR_RNE) diff --git a/src/lpc/ao_usb_lpc.c b/src/lpc/ao_usb_lpc.c index 686dc3a4..d02ccdd6 100644 --- a/src/lpc/ao_usb_lpc.c +++ b/src/lpc/ao_usb_lpc.c @@ -111,7 +111,6 @@ static uint8_t ao_usb_in_pending; static uint8_t ao_usb_out_avail; static uint8_t ao_usb_running; static uint8_t ao_usb_configuration; -static uint8_t ueienx_0; #define AO_USB_EP0_GOT_RESET 1 #define AO_USB_EP0_GOT_SETUP 2 @@ -246,11 +245,13 @@ ao_usb_epn_in(uint8_t n) return &lpc_usb_endpoint.epn[n-1].in[0]; } +#if UNUSED static void ao_usb_set_epn_in(uint8_t n, uint8_t *addr, uint16_t nbytes) { ao_usb_set_ep(ao_usb_epn_in(n), addr, nbytes); } +#endif static void ao_usb_set_epn_out(uint8_t n, uint8_t *addr, uint16_t nbytes) @@ -633,11 +634,12 @@ ao_usb_ep0_handle(uint8_t receive) } } -static uint16_t control_count; +#if USB_DEBUG static uint16_t int_count; static uint16_t in_count; static uint16_t out_count; static uint16_t reset_count; +#endif void lpc_usb_irq_isr(void) @@ -665,7 +667,9 @@ lpc_usb_irq_isr(void) /* Handle OUT packets */ if (intstat & (1 << LPC_USB_INT_EPOUT(AO_USB_OUT_EP))) { +#if USB_DEBUG ++out_count; +#endif _rx_dbg1("RX ISR", *ao_usb_epn_out(AO_USB_OUT_EP)); ao_usb_out_avail = 1; _rx_dbg0("out avail set"); @@ -675,7 +679,9 @@ lpc_usb_irq_isr(void) /* Handle IN packets */ if (intstat & (1 << LPC_USB_INT_EPIN(AO_USB_IN_EP))) { +#if USB_DEBUG ++in_count; +#endif _tx_dbg1("TX ISR", *ao_usb_epn_in(AO_USB_IN_EP)); ao_usb_in_pending = 0; ao_wakeup(&ao_usb_in_pending); diff --git a/src/product/ao_flash_task.c b/src/product/ao_flash_task.c index 4cfbf75f..6cb308e1 100644 --- a/src/product/ao_flash_task.c +++ b/src/product/ao_flash_task.c @@ -24,6 +24,7 @@ void ao_panic(uint8_t reason) { + (void) reason; } void -- cgit v1.2.3 From 48f996a9d65631238b4de446530f31f83acb99f5 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 20 Dec 2013 22:59:42 -0800 Subject: altos: cc115l driver tone_run wasn't recording number of tones This would prevent the cc115l driver from ever sending tones. Signed-off-by: Keith Packard --- src/drivers/ao_cc115l.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/drivers/ao_cc115l.c b/src/drivers/ao_cc115l.c index 5d4f3bd6..f0f72d4d 100644 --- a/src/drivers/ao_cc115l.c +++ b/src/drivers/ao_cc115l.c @@ -564,6 +564,7 @@ ao_radio_tone_run(struct ao_radio_tone *tones, int ntones) ao_radio_tone = tones; ao_radio_tone_current = 0; ao_radio_tone_offset = 0; + ao_radio_tone_count = ntones; _ao_radio_send_lots(ao_radio_tone_fill, AO_RADIO_MODE_RDF); ao_radio_put(); } -- cgit v1.2.3 From 14790172e02d4e1624c35797f87ffd94345d54ff Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 20 Dec 2013 23:00:43 -0800 Subject: altos: lpc exti setup was incorrectly testing mode Check for NOCONFIGURE bit was missing parens Signed-off-by: Keith Packard --- src/lpc/ao_exti_lpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lpc/ao_exti_lpc.c b/src/lpc/ao_exti_lpc.c index 588cf58c..941aa965 100644 --- a/src/lpc/ao_exti_lpc.c +++ b/src/lpc/ao_exti_lpc.c @@ -91,7 +91,7 @@ ao_exti_setup (uint8_t port, uint8_t pin, uint8_t mode, void (*callback)(void)) if (pint == LPC_NUM_PINT) ao_panic(AO_PANIC_EXTI); - if (!mode & AO_EXTI_PIN_NOCONFIGURE) + if (!(mode & AO_EXTI_PIN_NOCONFIGURE)) ao_enable_input(port, pin, mode); ao_arch_block_interrupts(); -- cgit v1.2.3 From f578d9455eec9ea0eccd2d5e21349e274ea4281a Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 20 Dec 2013 23:02:21 -0800 Subject: altos/lpc: Missing */ in definition of PIO0_4 Would maek using these values pretty hard. Signed-off-by: Keith Packard --- src/lpc/lpc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lpc/lpc.h b/src/lpc/lpc.h index 3300c86f..9408ceab 100644 --- a/src/lpc/lpc.h +++ b/src/lpc/lpc.h @@ -120,7 +120,7 @@ extern struct lpc_ioconf lpc_ioconf; #define LPC_IOCONF_FUNC_PIO0_3 0 #define LPC_IOCONF_FUNC_USB_VBUS 1 -/* PIO0_4 +/* PIO0_4 */ #define LPC_IOCONF_FUNC_PIO0_4 0 #define LPC_IOCONF_FUNC_I2C_SCL 1 -- cgit v1.2.3 From 16b37b49985daf21ebb93b3d6ae64af67533be22 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 20 Dec 2013 23:02:51 -0800 Subject: altos: Turn on warnings for LPC products too Signed-off-by: Keith Packard --- src/lpc/Makefile-lpc.defs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lpc/Makefile-lpc.defs b/src/lpc/Makefile-lpc.defs index 3d55cf67..b9687196 100644 --- a/src/lpc/Makefile-lpc.defs +++ b/src/lpc/Makefile-lpc.defs @@ -26,8 +26,11 @@ endif ELFTOHEX=$(TOPDIR)/../ao-tools/ao-elftohex/ao-elftohex CC=$(ARM_CC) +WARN_FLAGS=-Wall -Wextra + AO_CFLAGS=-I. -I$(TOPDIR)/lpc -I$(TOPDIR)/core -I$(TOPDIR)/drivers -I$(TOPDIR)/product -I$(TOPDIR) $(PDCLIB_INCLUDES) -LPC_CFLAGS=-std=gnu99 -mlittle-endian -mcpu=cortex-m0 -mthumb -ffreestanding -nostdlib $(AO_CFLAGS) +LPC_CFLAGS=-std=gnu99 -mlittle-endian -mcpu=cortex-m0 -mthumb\ + -ffreestanding -nostdlib $(AO_CFLAGS) $(WARN_FLAGS) NICKLE=nickle -- cgit v1.2.3 From 9289200ccb661b10ff892760ecbc752c7745de6b Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 20 Dec 2013 23:04:43 -0800 Subject: altos: Turn on -Werror for STM and LPC builds Now that the build completes with no warnings, make future warnings into errors. Signed-off-by: Keith Packard --- src/lpc/Makefile-lpc.defs | 2 +- src/stm/Makefile.defs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lpc/Makefile-lpc.defs b/src/lpc/Makefile-lpc.defs index b9687196..dd2bf0e6 100644 --- a/src/lpc/Makefile-lpc.defs +++ b/src/lpc/Makefile-lpc.defs @@ -26,7 +26,7 @@ endif ELFTOHEX=$(TOPDIR)/../ao-tools/ao-elftohex/ao-elftohex CC=$(ARM_CC) -WARN_FLAGS=-Wall -Wextra +WARN_FLAGS=-Wall -Wextra -Werror AO_CFLAGS=-I. -I$(TOPDIR)/lpc -I$(TOPDIR)/core -I$(TOPDIR)/drivers -I$(TOPDIR)/product -I$(TOPDIR) $(PDCLIB_INCLUDES) LPC_CFLAGS=-std=gnu99 -mlittle-endian -mcpu=cortex-m0 -mthumb\ diff --git a/src/stm/Makefile.defs b/src/stm/Makefile.defs index 1e31e590..42adfd09 100644 --- a/src/stm/Makefile.defs +++ b/src/stm/Makefile.defs @@ -24,7 +24,7 @@ include $(TOPDIR)/Makedefs CC=$(ARM_CC) LIBS=$(PDCLIB_LIBS_M3) -lgcc -WARN_FLAGS=-Wall -Wextra +WARN_FLAGS=-Wall -Wextra -Werror AO_CFLAGS=-I. -I../stm -I../core -I../drivers -I../math -I.. $(PDCLIB_INCLUDES) STM_CFLAGS=-std=gnu99 -mlittle-endian -mcpu=cortex-m3 -mthumb \ -- cgit v1.2.3 From 9cf9a67f937185c0c0bb5b2bae4f420755965799 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 21 Dec 2013 06:46:46 -0800 Subject: altosui: Switch from radio buttons to check boxes in pyro config. Add close First of (we hope) many review comments from Troj. Signed-off-by: Keith Packard --- altosui/AltosConfigPyroUI.java | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/altosui/AltosConfigPyroUI.java b/altosui/AltosConfigPyroUI.java index f59a0f0d..47b2b662 100644 --- a/altosui/AltosConfigPyroUI.java +++ b/altosui/AltosConfigPyroUI.java @@ -26,7 +26,7 @@ import org.altusmetrum.altosuilib_1.*; public class AltosConfigPyroUI extends AltosUIDialog - implements ItemListener, DocumentListener, AltosUnitsListener + implements ItemListener, DocumentListener, AltosUnitsListener, ActionListener { AltosConfigUI owner; Container pane; @@ -48,7 +48,7 @@ public class AltosConfigPyroUI class PyroItem implements ItemListener, DocumentListener, AltosUnitsListener { public int flag; - public JRadioButton enable; + public JCheckBox enable; public JTextField value; public JComboBox combo; AltosConfigPyroUI ui; @@ -146,7 +146,7 @@ public class AltosConfigPyroUI c.fill = GridBagConstraints.NONE; c.anchor = GridBagConstraints.LINE_START; c.insets = il; - enable = new JRadioButton(); + enable = new JCheckBox(); enable.addItemListener(this); pane.add(enable, c); @@ -309,6 +309,14 @@ public class AltosConfigPyroUI } } + /* Listen for events from our buttons */ + public void actionPerformed(ActionEvent e) { + String cmd = e.getActionCommand(); + + if (cmd.equals("Close")) + setVisible(false); + } + public AltosConfigPyroUI(AltosConfigUI in_owner, AltosPyro[] pyros) { super(in_owner, "Configure Pyro Channels", false); @@ -353,6 +361,17 @@ public class AltosConfigPyroUI columns[i] = new PyroColumn(this, i*2 + 1, 0, i); columns[i].set(pyros[i]); } + + c = new GridBagConstraints(); + c.gridx = pyros.length*2-1; + c.fill = GridBagConstraints.HORIZONTAL; + c.gridwidth = 2; + c.gridy = 1000; + JButton close = new JButton("Close"); + pane.add(close, c); + close.addActionListener(this); + close.setActionCommand("Close"); + addWindowListener(new ConfigListener(this, owner)); AltosPreferences.register_units_listener(this); } -- cgit v1.2.3 From 081455dcba860f3e4df8cd66f3fe686b204034ad Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 21 Dec 2013 08:56:00 -0800 Subject: altosui: Extend Fire Igniter to additional channels This lets the UI test fire other pyro channels on TeleMega Signed-off-by: Keith Packard --- altoslib/AltosIgnite.java | 59 ++++++++----- altosui/AltosIgniteUI.java | 209 +++++++++++++++++++++++++++++---------------- 2 files changed, 173 insertions(+), 95 deletions(-) diff --git a/altoslib/AltosIgnite.java b/altoslib/AltosIgnite.java index ca9f419c..d3c21796 100644 --- a/altoslib/AltosIgnite.java +++ b/altoslib/AltosIgnite.java @@ -17,6 +17,7 @@ package org.altusmetrum.altoslib_3; +import java.util.*; import java.io.*; import java.util.concurrent.*; @@ -24,10 +25,12 @@ public class AltosIgnite { AltosLink link; boolean remote; boolean link_started; + boolean have_npyro = false; + int npyro; - public final static int None = 0; - public final static int Apogee = 1; - public final static int Main = 2; + public final static String None = null; + public final static String Apogee = "drogue"; + public final static String Main = "main"; public final static int Unknown = 0; public final static int Ready = 1; @@ -81,7 +84,7 @@ public class AltosIgnite { } */ - private int status(String status_name) { + private int map_status(String status_name) { if (status_name.equals("unknown")) return Unknown; if (status_name.equals("ready")) @@ -93,13 +96,34 @@ public class AltosIgnite { return Unknown; } - public int status(int igniter) throws InterruptedException, TimeoutException { - int status = Unknown; + private void get_npyro() throws InterruptedException, TimeoutException { + AltosConfigData config_data = link.config_data(); + npyro = config_data.npyro; + have_npyro = true; + } + + public int npyro() throws InterruptedException, TimeoutException { + if (!have_npyro) { + start_link(); + get_npyro(); + stop_link(); + } + return npyro; + } + + public HashMap status() throws InterruptedException, TimeoutException { + HashMap status = new HashMap(); + if (link == null) return status; - //string_ref status_name = new string_ref(); try { start_link(); + get_npyro(); + + String last_igniter = Main; + if (npyro > 0) + last_igniter = String.format("%d", npyro - 1); + link.printf("t\n"); for (;;) { String line = link.get_reply(5000); @@ -116,14 +140,10 @@ public class AltosIgnite { if (!items[2].equals("Status:")) continue; - if (items[1].equals("drogue")) { - if (igniter == Apogee) - status = status(items[3]); - } else if (items[1].equals("main")) { - if (igniter == Main) - status = status(items[3]); + status.put(items[1], map_status(items[3])); + + if (items[1].equals(last_igniter)) break; - } } } finally { stop_link(); @@ -141,19 +161,12 @@ public class AltosIgnite { } } - public void fire(int igniter) throws InterruptedException { + public void fire(String igniter) throws InterruptedException { if (link == null) return; try { start_link(); - switch (igniter) { - case Main: - link.printf("i DoIt main\n"); - break; - case Apogee: - link.printf("i DoIt drogue\n"); - break; - } + link.printf("i DoIt %s\n", igniter); } catch (TimeoutException te) { } finally { stop_link(); diff --git a/altosui/AltosIgniteUI.java b/altosui/AltosIgniteUI.java index efc87720..9d063702 100644 --- a/altosui/AltosIgniteUI.java +++ b/altosui/AltosIgniteUI.java @@ -22,6 +22,7 @@ import java.awt.event.*; import javax.swing.*; import java.io.*; import java.text.*; +import java.util.*; import java.util.concurrent.*; import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; @@ -33,17 +34,13 @@ public class AltosIgniteUI AltosDevice device; JFrame owner; JLabel label; - JRadioButton apogee; - JLabel apogee_status_label; - JRadioButton main; - JLabel main_status_label; JToggleButton arm; JButton fire; javax.swing.Timer timer; JButton close; + ButtonGroup group; - int apogee_status; - int main_status; + int npyro; final static int timeout = 1 * 1000; @@ -52,6 +49,64 @@ public class AltosIgniteUI LinkedBlockingQueue command_queue; + LinkedBlockingQueue reply_queue; + + class Igniter { + JRadioButton button; + JLabel status_label; + String name; + int status; + + void set_status (int status) { + this.status = status; + status_label.setText(String.format("\"%s\"", AltosIgnite.status_string(status))); + } + + Igniter(AltosIgniteUI ui, String label, String name, int y) { + Container pane = getContentPane(); + GridBagConstraints c = new GridBagConstraints(); + Insets i = new Insets(4,4,4,4); + + this.name = name; + this.status = AltosIgnite.Unknown; + + c.gridx = 0; + c.gridy = y; + c.gridwidth = 1; + c.anchor = GridBagConstraints.WEST; + button = new JRadioButton (label); + pane.add(button, c); + button.addActionListener(ui); + button.setActionCommand(name); + group.add(button); + + c.gridx = 1; + c.gridy = y; + c.gridwidth = 1; + c.anchor = GridBagConstraints.WEST; + status_label = new JLabel("plenty of text"); + pane.add(status_label, c); + + status = AltosIgnite.Unknown; + } + } + + Igniter igniters[]; + + void set_status(String _name, int _status) { + + final String name = _name; + final int status = _status; + Runnable r = new Runnable() { + public void run() { + for (int p = 0; p < igniters.length; p++) + if (name.equals(igniters[p].name)) + igniters[p].set_status(status); + } + }; + SwingUtilities.invokeLater(r); + } + class IgniteHandler implements Runnable { AltosIgnite ignite; JFrame owner; @@ -86,20 +141,23 @@ public class AltosIgniteUI String reply = null; if (command.equals("get_status")) { - apogee_status = ignite.status(AltosIgnite.Apogee); - main_status = ignite.status(AltosIgnite.Main); + HashMap status_map = ignite.status(); + + for (int p = 0; p < igniters.length; p++) { + Integer i = status_map.get(igniters[p].name); + if (i != null) + set_status(igniters[p].name, i); + } reply = "status"; - } else if (command.equals("main")) { - ignite.fire(AltosIgnite.Main); - reply = "fired"; - } else if (command.equals("apogee")) { - ignite.fire(AltosIgnite.Apogee); - reply = "fired"; + } else if (command.equals("get_npyro")) { + put_reply(String.format("%d", ignite.npyro())); + continue; } else if (command.equals("quit")) { ignite.close(); break; } else { - throw new ParseException(String.format("invalid command %s", command), 0); + ignite.fire(command); + reply = "fired"; } final String f_reply = reply; r = new Runnable() { @@ -170,16 +228,15 @@ public class AltosIgniteUI void stop_timer() { time_remaining = 0; - arm.setSelected(false); - arm.setEnabled(false); fire.setEnabled(false); timer_running = false; + arm.setSelected(false); + arm.setEnabled(false); set_arm_text(); } void cancel () { - apogee.setSelected(false); - main.setSelected(false); + group.clearSelection(); fire.setEnabled(false); stop_timer(); } @@ -192,13 +249,30 @@ public class AltosIgniteUI } } + void put_reply(String reply) { + try { + reply_queue.put(reply); + } catch (Exception ex) { + ignite_exception(ex); + } + } + + String get_reply() { + String reply = ""; + try { + reply = reply_queue.take(); + } catch (Exception ex) { + ignite_exception(ex); + } + return reply; + } + boolean getting_status = false; boolean visible = false; + void set_ignite_status() { getting_status = false; - apogee_status_label.setText(String.format("\"%s\"", AltosIgnite.status_string(apogee_status))); - main_status_label.setText(String.format("\"%s\"", AltosIgnite.status_string(main_status))); if (!visible) { visible = true; setVisible(true); @@ -212,6 +286,12 @@ public class AltosIgniteUI } } + int get_npyro() { + send_command("get_npyro"); + String reply = get_reply(); + return Integer.parseInt(reply); + } + boolean firing = false; void start_fire(String which) { @@ -247,10 +327,12 @@ public class AltosIgniteUI void fire() { if (arm.isEnabled() && arm.isSelected() && time_remaining > 0) { String igniter = "none"; - if (apogee.isSelected() && !main.isSelected()) - igniter = "apogee"; - else if (main.isSelected() && !apogee.isSelected()) - igniter = "main"; + + for (int p = 0; p < igniters.length; p++) + if (igniters[p].button.isSelected()) { + igniter = igniters[p].name; + break; + } send_command(igniter); cancel(); } @@ -258,18 +340,13 @@ public class AltosIgniteUI public void actionPerformed(ActionEvent e) { String cmd = e.getActionCommand(); - if (cmd.equals("apogee") || cmd.equals("main")) { - stop_timer(); - } - if (cmd.equals("apogee") && apogee.isSelected()) { - main.setSelected(false); - arm.setEnabled(true); - } - if (cmd.equals("main") && main.isSelected()) { - apogee.setSelected(false); - arm.setEnabled(true); - } + for (int p = 0; p < igniters.length; p++) + if (cmd.equals(igniters[p].name)) { + stop_timer(); + arm.setEnabled(true); + break; + } if (cmd.equals("arm")) { if (arm.isSelected()) { @@ -282,9 +359,8 @@ public class AltosIgniteUI fire(); if (cmd.equals("tick")) tick_timer(); - if (cmd.equals("close")) { + if (cmd.equals("close")) close(); - } } /* A window listener to catch closing events and tell the config code */ @@ -304,6 +380,7 @@ public class AltosIgniteUI private boolean open() { command_queue = new LinkedBlockingQueue(); + reply_queue = new LinkedBlockingQueue(); device = AltosDeviceUIDialog.show(owner, Altos.product_any); if (device != null) { @@ -318,13 +395,14 @@ public class AltosIgniteUI public AltosIgniteUI(JFrame in_owner) { owner = in_owner; - apogee_status = AltosIgnite.Unknown; - main_status = AltosIgnite.Unknown; if (!open()) return; + group = new ButtonGroup(); + Container pane = getContentPane(); + GridBagConstraints c = new GridBagConstraints(); Insets i = new Insets(4,4,4,4); @@ -343,47 +421,32 @@ public class AltosIgniteUI c.weightx = 0; c.weighty = 0; + int y = 0; + c.gridx = 0; - c.gridy = 0; + c.gridy = y; c.gridwidth = 2; c.anchor = GridBagConstraints.CENTER; label = new JLabel ("Fire Igniter"); pane.add(label, c); - c.gridx = 0; - c.gridy = 1; - c.gridwidth = 1; - c.anchor = GridBagConstraints.WEST; - apogee = new JRadioButton ("Apogee"); - pane.add(apogee, c); - apogee.addActionListener(this); - apogee.setActionCommand("apogee"); + y++; - c.gridx = 1; - c.gridy = 1; - c.gridwidth = 1; - c.anchor = GridBagConstraints.WEST; - apogee_status_label = new JLabel(); - pane.add(apogee_status_label, c); + int npyro = get_npyro(); - c.gridx = 0; - c.gridy = 2; - c.gridwidth = 1; - c.anchor = GridBagConstraints.WEST; - main = new JRadioButton ("Main"); - pane.add(main, c); - main.addActionListener(this); - main.setActionCommand("main"); + igniters = new Igniter[2 + npyro]; - c.gridx = 1; - c.gridy = 2; - c.gridwidth = 1; - c.anchor = GridBagConstraints.WEST; - main_status_label = new JLabel(); - pane.add(main_status_label, c); + igniters[0] = new Igniter(this, "Apogee", AltosIgnite.Apogee, y++); + igniters[1] = new Igniter(this, "Main", AltosIgnite.Main, y++); + + for (int p = 0; p < npyro; p++) { + String name = String.format("%d", p); + String label = String.format("%c", 'A' + p); + igniters[2+p] = new Igniter(this, label, name, y++); + } c.gridx = 0; - c.gridy = 3; + c.gridy = y; c.gridwidth = 1; c.anchor = GridBagConstraints.CENTER; arm = new JToggleButton ("Arm"); @@ -393,7 +456,7 @@ public class AltosIgniteUI arm.setEnabled(false); c.gridx = 1; - c.gridy = 3; + c.gridy = y; c.gridwidth = 1; c.anchor = GridBagConstraints.CENTER; fire = new JButton ("Fire"); @@ -402,8 +465,10 @@ public class AltosIgniteUI fire.addActionListener(this); fire.setActionCommand("fire"); + y++; + c.gridx = 0; - c.gridy = 4; + c.gridy = y; c.gridwidth = 2; c.anchor = GridBagConstraints.CENTER; close = new JButton ("Close"); -- cgit v1.2.3 From 053d092b3dca4ebb98e97ec0fe24f5f5e1c31f88 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 28 Dec 2013 10:13:05 -0800 Subject: altoslib: Add AltosOrient class and max_orient() This adds the class necessary to put orient into a UI. Signed-off-by: Keith Packard --- altoslib/AltosConvert.java | 2 ++ altoslib/AltosOrient.java | 41 +++++++++++++++++++++++++++++++++++++++++ altoslib/AltosState.java | 4 ++++ altoslib/Makefile.am | 1 + 4 files changed, 48 insertions(+) create mode 100644 altoslib/AltosOrient.java diff --git a/altoslib/AltosConvert.java b/altoslib/AltosConvert.java index ace9d62e..8f214c8b 100644 --- a/altoslib/AltosConvert.java +++ b/altoslib/AltosConvert.java @@ -330,6 +330,8 @@ public class AltosConvert { public static AltosTemperature temperature = new AltosTemperature(); + public static AltosOrient orient = new AltosOrient(); + public static String show_gs(String format, double a) { a = meters_to_g(a); format = format.concat(" g"); diff --git a/altoslib/AltosOrient.java b/altoslib/AltosOrient.java new file mode 100644 index 00000000..d916a0fb --- /dev/null +++ b/altoslib/AltosOrient.java @@ -0,0 +1,41 @@ +/* + * Copyright © 2013 Keith Packard + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ + +package org.altusmetrum.altoslib_3; + +public class AltosOrient extends AltosUnits { + + public double value(double p, boolean imperial_units) { + return p; + } + + public double inverse(double p, boolean imperial_units) { + return p; + } + + public String show_units(boolean imperial_units) { + return "°"; + } + + public String say_units(boolean imperial_units) { + return "degrees"; + } + + public int show_fraction(int width, boolean imperial_units) { + return 0; + } +} \ No newline at end of file diff --git a/altoslib/AltosState.java b/altoslib/AltosState.java index 6a5b2a46..134aeb4e 100644 --- a/altoslib/AltosState.java +++ b/altoslib/AltosState.java @@ -474,6 +474,10 @@ public class AltosState implements Cloneable { return orient.value(); } + public double max_orient() { + return orient.max(); + } + public AltosValue kalman_height, kalman_speed, kalman_acceleration; public void set_kalman(double height, double speed, double acceleration) { diff --git a/altoslib/Makefile.am b/altoslib/Makefile.am index 6d396635..2ee4d89f 100644 --- a/altoslib/Makefile.am +++ b/altoslib/Makefile.am @@ -70,6 +70,7 @@ altoslib_JAVA = \ AltosMma655x.java \ AltosMs5607.java \ AltosNoSymbol.java \ + AltosOrient.java \ AltosParse.java \ AltosPreferences.java \ AltosPreferencesBackend.java \ -- cgit v1.2.3 From bbc4940730e6b431f1b9ccd9bbaf9faa0ffb2b1f Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 28 Dec 2013 10:15:26 -0800 Subject: altosui: Add orient to ascent and info table views This adds 'tilt angle' to both ascent and info table views Signed-off-by: Keith Packard --- altosui/AltosAscent.java | 32 ++++++++++++++++++++++++-------- altosui/AltosInfoTable.java | 4 ++++ 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/altosui/AltosAscent.java b/altosui/AltosAscent.java index c8ce2caa..3f74fdd1 100644 --- a/altosui/AltosAscent.java +++ b/altosui/AltosAscent.java @@ -271,6 +271,17 @@ public class AltosAscent extends JComponent implements AltosFlightDisplay { Accel accel; + class Orient extends AscentValueHold { + void show (AltosState state, AltosListenerState listener_state) { + show(AltosConvert.orient, state.orient()); + } + public Orient (GridBagLayout layout, int y) { + super (layout, y, "Tilt Angle"); + } + } + + Orient orient; + String pos(double p, String pos, String neg) { String h = pos; if (p < 0) { @@ -342,6 +353,7 @@ public class AltosAscent extends JComponent implements AltosFlightDisplay { height.reset(); speed.reset(); accel.reset(); + orient.reset(); } public void set_font() { @@ -354,6 +366,7 @@ public class AltosAscent extends JComponent implements AltosFlightDisplay { height.set_font(); speed.set_font(); accel.set_font(); + orient.set_font(); } public void show(AltosState state, AltosListenerState listener_state) { @@ -375,6 +388,7 @@ public class AltosAscent extends JComponent implements AltosFlightDisplay { apogee.hide(); speed.show(state, listener_state); accel.show(state, listener_state); + orient.show(state, listener_state); } public void labels(GridBagLayout layout, int y) { @@ -410,13 +424,15 @@ public class AltosAscent extends JComponent implements AltosFlightDisplay { * lon * height */ - labels(layout, 0); - height = new Height(layout, 1); - speed = new Speed(layout, 2); - accel = new Accel(layout, 3); - lat = new Lat(layout, 4); - lon = new Lon(layout, 5); - apogee = new Apogee(layout, 6); - main = new Main(layout, 7); + int y = 0; + labels(layout, y++); + height = new Height(layout, y++); + speed = new Speed(layout, y++); + accel = new Accel(layout, y++); + orient = new Orient(layout, y++); + lat = new Lat(layout, y++); + lon = new Lon(layout, y++); + apogee = new Apogee(layout, y++); + main = new Main(layout, y++); } } diff --git a/altosui/AltosInfoTable.java b/altosui/AltosInfoTable.java index cf0e4c56..7ba62d01 100644 --- a/altosui/AltosInfoTable.java +++ b/altosui/AltosInfoTable.java @@ -125,6 +125,10 @@ public class AltosInfoTable extends JTable { info_add_row(0, "Speed", "%8.1f m/s", state.speed()); if (state.max_speed() != AltosLib.MISSING) info_add_row(0, "Max Speed", "%8.1f m/s", state.max_speed()); + if (state.orient() != AltosLib.MISSING) + info_add_row(0, "Tilt", "%4.0f °", state.orient()); + if (state.max_orient() != AltosLib.MISSING) + info_add_row(0, "Max Tilt", "%4.0f °", state.max_orient()); if (state.temperature != AltosLib.MISSING) info_add_row(0, "Temperature", "%9.2f °C", state.temperature); if (state.battery_voltage != AltosLib.MISSING) -- cgit v1.2.3 From aa01f06acfbf029958a55f68175b6868817b333f Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 28 Dec 2013 10:16:24 -0800 Subject: altosui: Adjust info table column width Make sure the info table can show a full longitude value Signed-off-by: Keith Packard --- altosui/AltosInfoTable.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/altosui/AltosInfoTable.java b/altosui/AltosInfoTable.java index 7ba62d01..158b61f0 100644 --- a/altosui/AltosInfoTable.java +++ b/altosui/AltosInfoTable.java @@ -46,9 +46,9 @@ public class AltosInfoTable extends JTable { TableColumn column = getColumnModel().getColumn(i); if ((i & 1) == 0) - column.setPreferredWidth(text_width(" Satellites Visible ")); + column.setPreferredWidth(text_width(" Satellites Visible")); else - column.setPreferredWidth(text_width(" 179°59.99999' ")); + column.setPreferredWidth(text_width("W 179°59.99999' ")); } } -- cgit v1.2.3 From 9877f6b880a0e89fbfbf1a39ded94bdc1891f3d9 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 28 Dec 2013 10:17:37 -0800 Subject: altosui: Switch Graph to AltosOrient type The graph was using a private class for orient type, use the altoslib one Signed-off-by: Keith Packard --- altosui/AltosGraph.java | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/altosui/AltosGraph.java b/altosui/AltosGraph.java index ef26f4f9..42334e31 100644 --- a/altosui/AltosGraph.java +++ b/altosui/AltosGraph.java @@ -150,29 +150,6 @@ class AltosGyroUnits extends AltosUnits { } } -class AltosOrientUnits extends AltosUnits { - - public double value(double p, boolean imperial_units) { - return p; - } - - public double inverse(double p, boolean imperial_units) { - return p; - } - - public String show_units(boolean imperial_units) { - return "°"; - } - - public String say_units(boolean imperial_units) { - return "degrees"; - } - - public int show_fraction(int width, boolean imperial_units) { - return 1; - } -} - class AltosMagUnits extends AltosUnits { public double value(double p, boolean imperial_units) { @@ -231,7 +208,7 @@ public class AltosGraph extends AltosUIGraph { static AltosNsat nsat_units = new AltosNsat(); static AltosDbm dbm_units = new AltosDbm(); static AltosGyroUnits gyro_units = new AltosGyroUnits(); - static AltosOrientUnits orient_units = new AltosOrientUnits(); + static AltosOrient orient_units = new AltosOrient(); static AltosMagUnits mag_units = new AltosMagUnits(); AltosUIAxis height_axis, speed_axis, accel_axis, voltage_axis, temperature_axis, nsat_axis, dbm_axis; -- cgit v1.2.3 From afc16e805145c3e9ab4ba948f9ab1d9aa2b27afb Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 28 Dec 2013 10:18:53 -0800 Subject: altos: Add 'O' command for TeleMega orient testing Only present when HAS_FLIGHT_DEBUG is enabled, this command lets the user check the orientation tracking code by showing the current orientation and when the calibration values are reset. Signed-off-by: Keith Packard --- src/core/ao_flight.c | 9 +++++++++ src/core/ao_sample.c | 19 +++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/src/core/ao_flight.c b/src/core/ao_flight.c index aac6880d..08302140 100644 --- a/src/core/ao_flight.c +++ b/src/core/ao_flight.c @@ -443,9 +443,18 @@ ao_gyro_test(void) ao_flight_state = ao_flight_idle; } +uint8_t ao_orient_test; + +static void +ao_orient_test_select(void) +{ + ao_orient_test = !ao_orient_test; +} + __code struct ao_cmds ao_flight_cmds[] = { { ao_flight_dump, "F\0Dump flight status" }, { ao_gyro_test, "G\0Test gyro code" }, + { ao_orient_test_select,"O\0Test orientation code" }, { 0, NULL }, }; #endif diff --git a/src/core/ao_sample.c b/src/core/ao_sample.c index adf8399d..34658951 100644 --- a/src/core/ao_sample.c +++ b/src/core/ao_sample.c @@ -92,6 +92,10 @@ __pdata int32_t ao_sample_roll_sum; static struct ao_quaternion ao_rotation; #endif +#if HAS_FLIGHT_DEBUG +extern uint8_t ao_orient_test; +#endif + static void ao_sample_preflight_add(void) { @@ -159,7 +163,11 @@ ao_sample_preflight_set(void) * that as the current rotation vector */ ao_quaternion_vectors_to_rotation(&ao_rotation, &up, &orient); +#if HAS_FLIGHT_DEBUG + if (ao_orient_test) + printf("\n\treset\n"); #endif +#endif nsamples = 0; } @@ -210,6 +218,17 @@ ao_sample_rotate(void) rotz = ao_rotation.z * ao_rotation.z - ao_rotation.y * ao_rotation.y - ao_rotation.x * ao_rotation.x + ao_rotation.r * ao_rotation.r; ao_sample_orient = acosf(rotz) * (float) (180.0/M_PI); + +#if HAS_FLIGHT_DEBUG + if (ao_orient_test) { + printf ("rot %d %d %d orient %d \r", + (int) (x * 1000), + (int) (y * 1000), + (int) (z * 1000), + ao_sample_orient); + } +#endif + } #endif -- cgit v1.2.3 From c35ea586b9e792c45b287924fd256928308d9a36 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 1 Jan 2014 21:12:20 -0800 Subject: altos: Flip acceleration data consistently for orientation changes Must flip the acceleration calibration data using the same function as flipping the actual acceleration data or the calibration will no longer be valid after changing orientation. For the MMA655x, this means using 4095 in both places, rather than using 0x7fff for the calibration data changes and 4095 for the data value changes. For the MPU6000, this means using 0 in both places. Signed-off-by: Keith Packard --- src/core/ao_config.c | 10 +++++++--- src/core/ao_data.h | 8 ++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/core/ao_config.c b/src/core/ao_config.c index 590d8a49..4482f673 100644 --- a/src/core/ao_config.c +++ b/src/core/ao_config.c @@ -514,6 +514,10 @@ ao_config_pad_orientation_show(void) __reentrant printf("Pad orientation: %d\n", ao_config.pad_orientation); } +#ifndef AO_ACCEL_INVERT +#define AO_ACCEL_INVERT 0x7fff +#endif + void ao_config_pad_orientation_set(void) __reentrant { @@ -523,10 +527,10 @@ ao_config_pad_orientation_set(void) __reentrant _ao_config_edit_start(); ao_cmd_lex_i &= 1; if (ao_config.pad_orientation != ao_cmd_lex_i) { - uint16_t t; + int16_t t; t = ao_config.accel_plus_g; - ao_config.accel_plus_g = 0x7fff - ao_config.accel_minus_g; - ao_config.accel_minus_g = 0x7fff - t; + ao_config.accel_plus_g = AO_ACCEL_INVERT - ao_config.accel_minus_g; + ao_config.accel_minus_g = AO_ACCEL_INVERT - t; } ao_config.pad_orientation = ao_cmd_lex_i; _ao_config_edit_finish(); diff --git a/src/core/ao_data.h b/src/core/ao_data.h index e1d8a139..c4b062fd 100644 --- a/src/core/ao_data.h +++ b/src/core/ao_data.h @@ -273,14 +273,16 @@ typedef int16_t accel_t; /* MMA655X is hooked up so that positive values represent negative acceleration */ +#define AO_ACCEL_INVERT 4095 + #define ao_data_accel(packet) ((packet)->mma655x) #if AO_MMA655X_INVERT -#define ao_data_accel_cook(packet) (4095 - (packet)->mma655x) +#define ao_data_accel_cook(packet) (AO_ACCEL_INVERT - (packet)->mma655x) #else #define ao_data_accel_cook(packet) ((packet)->mma655x) #endif #define ao_data_set_accel(packet, accel) ((packet)->mma655x = (accel)) -#define ao_data_accel_invert(accel) (4095 - (accel)) +#define ao_data_accel_invert(accel) (AO_ACCEL_INVERT - (accel)) #endif @@ -288,6 +290,8 @@ typedef int16_t accel_t; #define HAS_ACCEL 1 +#define AO_ACCEL_INVERT 0 + typedef int16_t accel_t; /* MPU6000 is hooked up so that positive y is positive acceleration */ -- cgit v1.2.3 From b15bd24bbe48e338497c6257f5fe2c7fd1cbffbb Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 1 Jan 2014 22:00:24 -0800 Subject: altosui: Handle a missing libaltos when starting up Skip a null list of devices when figuring out what to open monitor windows for during startup. Signed-off-by: Keith Packard --- altosui/AltosUI.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/altosui/AltosUI.java b/altosui/AltosUI.java index 8d5cacd4..50c5baab 100644 --- a/altosui/AltosUI.java +++ b/altosui/AltosUI.java @@ -560,8 +560,9 @@ public class AltosUI extends AltosUIFrame { AltosUI altosui = new AltosUI(); java.util.List devices = AltosUSBDevice.list(Altos.product_basestation); - for (AltosDevice device : devices) - altosui.telemetry_window(device); + if (devices != null) + for (AltosDevice device : devices) + altosui.telemetry_window(device); } else { int process = process_none; for (int i = 0; i < args.length; i++) { -- cgit v1.2.3 From 95d77eaff708397d8b1e29904dc47d8ea09e8754 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 1 Jan 2014 22:02:04 -0800 Subject: Bump version to 1.3.9.1 Lots of new features; let's not release with 1.3 set Signed-off-by: Keith Packard --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index eaf8c03d..1214564b 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.3) +AC_INIT([altos], 1.3.9.1) AC_CONFIG_SRCDIR([src/core/ao.h]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE -- cgit v1.2.3 From 8bff2822c242d2878b408b9c0d8a7647108ea4b1 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 1 Jan 2014 22:02:56 -0800 Subject: libaltos: Build -m64 and -m32 for fat tarball when possible Check to see if we can compile libaltos for both 32 bit and 64 bit systems, and then use those when generating the linux tarball. Signed-off-by: Keith Packard --- altosui/Makefile.am | 16 +++++++++++++- altosuilib/AltosUILib.java | 16 ++++++++------ configure.ac | 54 +++++++++++++++++++++++++++++++++++++++++++++- libaltos/Makefile.am | 30 ++++++++++++++++++++++++-- 4 files changed, 105 insertions(+), 11 deletions(-) diff --git a/altosui/Makefile.am b/altosui/Makefile.am index 71e96004..dc34c444 100644 --- a/altosui/Makefile.am +++ b/altosui/Makefile.am @@ -175,7 +175,13 @@ WINDOWS_DIST=Altos-Windows-$(VERSION_DASH).exe FAT_FILES=$(FATJAR) $(ALTOSLIB_CLASS) $(ALTOSUILIB_CLASS) $(FREETTS_CLASS) $(JFREECHART_CLASS) $(JCOMMON_CLASS) -LINUX_FILES=$(FAT_FILES) libaltos.so $(FIRMWARE) $(DOC) +if MULTI_ARCH +LINUX_LIBS=libaltos32.so libaltos64.so +else +LINUX_LIBS=libaltos.so +endif + +LINUX_FILES=$(FAT_FILES) $(LINUX_LIBS) $(FIRMWARE) $(DOC) LINUX_EXTRA=altosui-fat MACOSX_INFO_PLIST=Info.plist @@ -269,6 +275,14 @@ libaltos.so: build-libaltos -rm -f "$@" $(LN_S) ../libaltos/.libs/"$@" . +libaltos32.so: build-libaltos + -rm -f "$@" + $(LN_S) ../libaltos/.libs/"$@" . + +libaltos64.so: build-libaltos + -rm -f "$@" + $(LN_S) ../libaltos/.libs/"$@" . + libaltos.dylib: -rm -f "$@" $(LN_S) ../libaltos/"$@" . diff --git a/altosuilib/AltosUILib.java b/altosuilib/AltosUILib.java index 307ef19d..18c4c3d9 100644 --- a/altosuilib/AltosUILib.java +++ b/altosuilib/AltosUILib.java @@ -81,18 +81,20 @@ public class AltosUILib extends AltosLib { static public boolean initialized = false; static public boolean loaded_library = false; + static final String[] library_names = { "altos", "altos32", "altos64" }; + public static boolean load_library() { if (!initialized) { - try { - System.loadLibrary("altos"); - libaltos.altos_init(); - loaded_library = true; - } catch (UnsatisfiedLinkError e) { + for (String name : library_names) { try { - System.loadLibrary("altos64"); + System.out.printf ("Trying library %s\n", name); + System.loadLibrary(name); libaltos.altos_init(); loaded_library = true; - } catch (UnsatisfiedLinkError e2) { + System.out.printf ("Using library %s\n", name); + break; + } catch (UnsatisfiedLinkError e) { + System.out.printf("Link error %s\n", e.getMessage()); loaded_library = false; } } diff --git a/configure.ac b/configure.ac index 1214564b..20acdf5f 100644 --- a/configure.ac +++ b/configure.ac @@ -430,7 +430,58 @@ if test x"$HAVE_STLINK" = "xyes"; then AC_DEFINE(HAVE_STLINK,1,[Using STlink library]) fi -AM_CONDITIONAL([LIBSTLINK], [test x$HAVE_STLINK == xyes]) +AM_CONDITIONAL([LIBSTLINK], [test x$HAVE_STLINK = xyes]) + +AC_ARG_ENABLE([multi-arch], + [AS_HELP_STRING([--enable-multi-arch], + [enable building both i386 and amd64 libraries (default=auto)])], + [MULTI_ARCH=$enableval], + [MULTI_ARCH=auto]) + +case x"$MULTI_ARCH" in +xauto) + arch=`uname -m` + case x"$arch" in + xx86_64|xi*86) + save_CFLAGS="$CFLAGS" + save_LIBS="$LIBS" + LIBS="-lbluetooth" + CFLAGS="-m64" + AC_MSG_CHECKING([if ]$CC[ ]$CFLAGS[ can link programs]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([])], + [M64_LINK=yes], + [M64_LINK=no]) + AC_MSG_RESULT([$M64_LINK]) + CFLAGS="-m32" + AC_MSG_CHECKING([if ]$CC[ ]$CFLAGS[ can link programs]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([])], + [M32_LINK=yes], + [M32_LINK=no]) + AC_MSG_RESULT([$M32_LINK]) + CFLAGS="$save_CFLAGS" + LIBS="$save_LIBS" + case x"$M64_LINK"x"$M32_LINK" in + xyesxyes) + MULTI_ARCH=yes + ;; + *) + MULTI_ARCH=no + ;; + esac + ;; + *) + MULTI_ARCH=no + ;; + esac + ;; +xyes|xno) + ;; +*) + MULTI_ARCH="no" + ;; +esac + +AM_CONDITIONAL([MULTI_ARCH], [test x$MULTI_ARCH = xyes]) AC_OUTPUT([ Makefile @@ -483,6 +534,7 @@ echo " AVR support.................: ${HAVE_AVR_CC}" echo " Android support.............: ${HAVE_ANDROID_SDK}" echo " STlink support..............: ${HAVE_STLINK}" echo " Local pdclib................: ${HAVE_PDCLIB}" +echo " i386 and amd64 libaltos.....: ${MULTI_ARCH}" echo "" echo " Java paths" echo " freetts.....................: ${FREETTS}" diff --git a/libaltos/Makefile.am b/libaltos/Makefile.am index 831432fc..969aa8ad 100644 --- a/libaltos/Makefile.am +++ b/libaltos/Makefile.am @@ -5,8 +5,7 @@ AM_JAVACFLAGS=-target 1.6 -encoding UTF-8 -Xlint:deprecation -source 6 altoslibdir=$(libdir)/altos altoslib_LTLIBRARIES=libaltos.la - -libaltos_la_LDFLAGS = -version-info 1:0:1 +libaltos_la_LDFLAGS=-version-info 1:0:1 libaltos_la_SOURCES=\ libaltos.c \ @@ -14,8 +13,35 @@ libaltos_la_SOURCES=\ noinst_PROGRAMS=cjnitest +cjnitest_SOURCES=cjnitest.c cjnitest_LDADD=libaltos.la +if MULTI_ARCH +altoslib_LTLIBRARIES+=libaltos32.la libaltos64.la + +libaltos32_la_LDFLAGS=$(libaltos_la_LDFLAGS) +libaltos64_la_LDFLAGS=$(libaltos_la_LDFLAGS) + +libaltos32_la_CFLAGS=-m32 $(AM_CFLAGS) +libaltos64_la_CFLAGS=-m64 $(AM_CFLAGS) + +libaltos32_la_SOURCES=$(libaltos_la_SOURCES) +libaltos64_la_SOURCES=$(libaltos_la_SOURCES) + +noinst_PROGRAMS+=cjnitest32 cjnitest64 + +cjnitest32_CFLAGS=-m32 +cjnitest64_CFLAGS=-m64 + +cjnitest32_SOURCES=$(cjnitest_SOURCES) +cjnitest64_SOURCES=$(cjnitest_SOURCES) + +cjnitest32_LDADD=libaltos32.la +cjnitest64_LDADD=libaltos64.la + +endif + + LIBS=-lbluetooth HFILES=libaltos.h -- cgit v1.2.3 From 06ffd8022ff5ac74274c9839d42c0c47274cb8b9 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 1 Jan 2014 22:08:13 -0800 Subject: altosui: Require both libaltos32 and libaltos64 for fat Linux tarball No sense shipping a broken tarball ever Signed-off-by: Keith Packard --- altosui/Makefile.am | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/altosui/Makefile.am b/altosui/Makefile.am index dc34c444..9bc10740 100644 --- a/altosui/Makefile.am +++ b/altosui/Makefile.am @@ -98,7 +98,8 @@ ALTOSUILIB_CLASS=\ altosuilib_$(ALTOSUILIB_VERSION).jar LIBALTOS= \ - libaltos.so \ + libaltos32.so \ + libaltos64.so \ libaltos.dylib \ altos.dll @@ -175,11 +176,7 @@ WINDOWS_DIST=Altos-Windows-$(VERSION_DASH).exe FAT_FILES=$(FATJAR) $(ALTOSLIB_CLASS) $(ALTOSUILIB_CLASS) $(FREETTS_CLASS) $(JFREECHART_CLASS) $(JCOMMON_CLASS) -if MULTI_ARCH LINUX_LIBS=libaltos32.so libaltos64.so -else -LINUX_LIBS=libaltos.so -endif LINUX_FILES=$(FAT_FILES) $(LINUX_LIBS) $(FIRMWARE) $(DOC) LINUX_EXTRA=altosui-fat @@ -271,10 +268,6 @@ altosui-jdb: Makefile echo 'exec jdb -classpath "classes:./*:../libaltos:$(FREETTS)/freetts.jar:$(JCOMMON)/jcommon.jar:$(JFREECHART)/jfreechart.jar" -Djava.library.path="../libaltos/.libs" altosui/AltosUI "$$@"' >> $@ chmod +x $@ -libaltos.so: build-libaltos - -rm -f "$@" - $(LN_S) ../libaltos/.libs/"$@" . - libaltos32.so: build-libaltos -rm -f "$@" $(LN_S) ../libaltos/.libs/"$@" . @@ -295,7 +288,9 @@ altos64.dll: ../libaltos/altos64.dll -rm -f "$@" $(LN_S) ../libaltos/"$@" . -../libaltos/.libs/libaltos.so: build-libaltos +../libaltos/.libs/libaltos64.so: ../libaltos/.libs/libaltos32.so + +../libaltos/.libs/libaltos32.so: build-libaltos ../libaltos/altos.dll: build-altos-dll -- cgit v1.2.3 From f560d5063b1339dbfb3e6723cfadb7b4c5eace25 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 14 Jan 2014 23:18:40 -0800 Subject: doc: Ship telemini outline as pdf file too Build telemini.pdf from telemini.svg and include it in all of the released packages. Signed-off-by: Keith Packard --- altosui/Makefile.am | 2 +- altosui/altos-windows.nsi.in | 1 + debian/docs | 2 ++ doc/telemini.pdf | Bin 0 -> 4183 bytes 4 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 doc/telemini.pdf diff --git a/altosui/Makefile.am b/altosui/Makefile.am index 9bc10740..32a3df97 100644 --- a/altosui/Makefile.am +++ b/altosui/Makefile.am @@ -165,7 +165,7 @@ TEMPLATE_DOC=\ $(top_srcdir)/doc/telemetrum-outline.pdf \ $(top_srcdir)/doc/easymini-outline.pdf \ $(top_srcdir)/doc/telemega-outline.pdf \ - $(top_srcdir)/doc/easymini-outline.pdf + $(top_srcdir)/doc/telemini.pdf DOC=$(ALTUSMETRUM_DOC) $(ALTOS_DOC) $(TELEMETRY_DOC) $(TEMPLATE_DOC) diff --git a/altosui/altos-windows.nsi.in b/altosui/altos-windows.nsi.in index 779b0c12..3832e901 100644 --- a/altosui/altos-windows.nsi.in +++ b/altosui/altos-windows.nsi.in @@ -136,6 +136,7 @@ Section "Documentation" File "../doc/telemetrum-outline.pdf" File "../doc/telemega-outline.pdf" File "../doc/easymini-outline.pdf" + File "../doc/telemini.pdf" SectionEnd Section "Uninstaller" diff --git a/debian/docs b/debian/docs index dcdb7763..4a7eba68 100644 --- a/debian/docs +++ b/debian/docs @@ -8,3 +8,5 @@ doc/altos.html doc/altos.pdf doc/telemetrum-outline.pdf doc/telemega-outline.pdf +doc/easymini-outline.pdf +doc/telemini.pdf diff --git a/doc/telemini.pdf b/doc/telemini.pdf new file mode 100644 index 00000000..9d7f0237 Binary files /dev/null and b/doc/telemini.pdf differ -- cgit v1.2.3 From 9d812b3db418fd9816731b761a0853eb38f5a265 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 14 Jan 2014 23:21:40 -0800 Subject: altos: Switch APRS to compressed position format This provides lat/lon/alt in fewer bytes while improving precision. Signed-off-by: Keith Packard --- src/drivers/ao_aprs.c | 75 +++++++++++++++++++++++++++++++----- src/lpc/Makefile-lpc.defs | 4 +- src/math/ef_log.c | 92 ++++++++++++++++++++++++++++++++++++++++++++ src/math/fdlibm.h | 1 + src/math/math.h | 2 + src/telegps-v0.3/Makefile | 4 ++ src/telemega-v0.1/Makefile | 3 +- src/telemega-v1.0/Makefile | 3 +- src/telemetrum-v2.0/Makefile | 4 ++ 9 files changed, 174 insertions(+), 14 deletions(-) create mode 100644 src/math/ef_log.c diff --git a/src/drivers/ao_aprs.c b/src/drivers/ao_aprs.c index 6ab61e6a..96e90f00 100644 --- a/src/drivers/ao_aprs.c +++ b/src/drivers/ao_aprs.c @@ -144,6 +144,7 @@ #endif #include +#include // Public methods, constants, and data structures for each class. @@ -254,9 +255,9 @@ 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[] = { - '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, \ + '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, 0x03, 0xf0 }; #define TNC_CALLSIGN_OFF 7 @@ -479,6 +480,14 @@ static void tnc1200TimerTick() } // END switch } +static void tncCompressInt(uint8_t *dest, int32_t value, int len) { + int i; + for (i = len - 1; i >= 0; i--) { + dest[i] = value % 91 + 33; + value /= 91; + } +} + /** * Generate the plain text position packet. */ @@ -487,7 +496,14 @@ static int tncPositionPacket(void) int32_t latitude = ao_gps_data.latitude; int32_t longitude = ao_gps_data.longitude; int32_t altitude = ao_gps_data.altitude; + uint8_t *buf; + if (altitude < 0) + altitude = 0; + altitude = (altitude * (int32_t) 10000 + (3048/2)) / (int32_t) 3048; + +#if 0 + char lat_sign = 'N', lon_sign = 'E'; uint16_t lat_deg; uint16_t lon_deg; uint16_t lat_min; @@ -495,8 +511,6 @@ static int tncPositionPacket(void) uint16_t lon_min; uint16_t lon_frac; - char lat_sign = 'N', lon_sign = 'E'; - if (latitude < 0) { lat_sign = 'S'; latitude = -latitude; @@ -529,15 +543,56 @@ static int tncPositionPacket(void) longitude -= lon_min * 10000000; lon_frac = longitude / 100000; - if (altitude < 0) - altitude = 0; - - altitude = (altitude * (int32_t) 10000 + (3048/2)) / (int32_t) 3048; - +#if 0 return sprintf ((char *) tncBuffer, "=%02u%02u.%02u%c\\%03u%02u.%02u%cO /A=%06u\015", lat_deg, lat_min, lat_frac, lat_sign, lon_deg, lon_min, lon_frac, lon_sign, altitude); +#endif + + return sprintf ((char *) tncBuffer, "/%02u%02u%02uh%02u%02u.%02u%c/%03u%02u.%02u%c'/A=%06u\015", + ao_gps_data.hour, + ao_gps_data.minute, + ao_gps_data.second, + lat_deg, lat_min, lat_frac, lat_sign, + lon_deg, lon_min, lon_frac, lon_sign, + altitude); +#endif + buf = tncBuffer; +#if APRS_TIME + sprintf ((char *) buf, "/%02u%02u%02uh", + ao_gps_data.hour, + ao_gps_data.minute, + ao_gps_data.second); + buf += 8; +#else + *buf++ = '!'; +#endif + + /* Symbol table ID */ + *buf++ = '/'; + + latitude = ((uint64_t) 380926 * (900000000 - latitude)) / 10000000; + longitude = ((uint64_t) 190463 * (1800000000 + longitude)) / 10000000; + +#define ALTITUDE_LOG_BASE 0.001998002662673f /* log(1.002) */ + + altitude = logf((float) altitude) * (1/ALTITUDE_LOG_BASE); + + tncCompressInt(buf, latitude, 4); + buf += 4; + tncCompressInt(buf, longitude, 4); + buf += 4; + + /* Symbol code */ + *buf++ = '\''; + + tncCompressInt(buf, altitude, 2); + buf += 2; + + *buf++ = 33 + ((1 << 5) | (2 << 3)); + *buf++ = '\0'; + return buf - tncBuffer; } static int16_t diff --git a/src/lpc/Makefile-lpc.defs b/src/lpc/Makefile-lpc.defs index dd2bf0e6..fecb9135 100644 --- a/src/lpc/Makefile-lpc.defs +++ b/src/lpc/Makefile-lpc.defs @@ -4,7 +4,7 @@ endif include $(TOPDIR)/Makedefs -vpath % $(TOPDIR)/lpc:$(TOPDIR)/product:$(TOPDIR)/drivers:$(TOPDIR)/core:$(TOPDIR)/util:$(TOPDIR)/kalman:$(TOPDIR/aes):$(TOPDIR) +vpath % $(TOPDIR)/lpc:$(TOPDIR)/product:$(TOPDIR)/drivers:$(TOPDIR)/core:$(TOPDIR)/util:$(TOPDIR)/kalman:$(TOPDIR/aes):$(TOPDIR):$(TOPDIR)/math vpath make-altitude $(TOPDIR)/util vpath make-kalman $(TOPDIR)/util vpath kalman.5c $(TOPDIR)/kalman @@ -28,7 +28,7 @@ CC=$(ARM_CC) WARN_FLAGS=-Wall -Wextra -Werror -AO_CFLAGS=-I. -I$(TOPDIR)/lpc -I$(TOPDIR)/core -I$(TOPDIR)/drivers -I$(TOPDIR)/product -I$(TOPDIR) $(PDCLIB_INCLUDES) +AO_CFLAGS=-I. -I$(TOPDIR)/lpc -I$(TOPDIR)/core -I$(TOPDIR)/drivers -I$(TOPDIR)/product -I$(TOPDIR) -I$(TOPDIR)/math -I$(TOPDIR) $(PDCLIB_INCLUDES) LPC_CFLAGS=-std=gnu99 -mlittle-endian -mcpu=cortex-m0 -mthumb\ -ffreestanding -nostdlib $(AO_CFLAGS) $(WARN_FLAGS) diff --git a/src/math/ef_log.c b/src/math/ef_log.c new file mode 100644 index 00000000..619fe909 --- /dev/null +++ b/src/math/ef_log.c @@ -0,0 +1,92 @@ +/* ef_log.c -- float version of e_log.c. + * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com. + */ + +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +static const float +#else +static float +#endif +ln2_hi = 6.9313812256e-01, /* 0x3f317180 */ +ln2_lo = 9.0580006145e-06, /* 0x3717f7d1 */ +two25 = 3.355443200e+07, /* 0x4c000000 */ +Lg1 = 6.6666668653e-01, /* 3F2AAAAB */ +Lg2 = 4.0000000596e-01, /* 3ECCCCCD */ +Lg3 = 2.8571429849e-01, /* 3E924925 */ +Lg4 = 2.2222198546e-01, /* 3E638E29 */ +Lg5 = 1.8183572590e-01, /* 3E3A3325 */ +Lg6 = 1.5313838422e-01, /* 3E1CD04F */ +Lg7 = 1.4798198640e-01; /* 3E178897 */ + +#ifdef __STDC__ +static const float zero = 0.0; +#else +static float zero = 0.0; +#endif + +#ifdef __STDC__ + float __ieee754_logf(float x) +#else + float __ieee754_logf(x) + float x; +#endif +{ + float hfsq,f,s,z,R,w,t1,t2,dk; + __int32_t k,ix,i,j; + + GET_FLOAT_WORD(ix,x); + + k=0; + if (FLT_UWORD_IS_ZERO(ix&0x7fffffff)) + return -two25/zero; /* log(+-0)=-inf */ + if (ix<0) return (x-x)/zero; /* log(-#) = NaN */ + if (!FLT_UWORD_IS_FINITE(ix)) return x+x; + if (FLT_UWORD_IS_SUBNORMAL(ix)) { + k -= 25; x *= two25; /* subnormal number, scale up x */ + GET_FLOAT_WORD(ix,x); + } + k += (ix>>23)-127; + ix &= 0x007fffff; + i = (ix+(0x95f64<<3))&0x800000; + SET_FLOAT_WORD(x,ix|(i^0x3f800000)); /* normalize x or x/2 */ + k += (i>>23); + f = x-(float)1.0; + if((0x007fffff&(15+ix))<16) { /* |f| < 2**-20 */ + if(f==zero) { if(k==0) return zero; else {dk=(float)k; + return dk*ln2_hi+dk*ln2_lo;}} + R = f*f*((float)0.5-(float)0.33333333333333333*f); + if(k==0) return f-R; else {dk=(float)k; + return dk*ln2_hi-((R-dk*ln2_lo)-f);} + } + s = f/((float)2.0+f); + dk = (float)k; + z = s*s; + i = ix-(0x6147a<<3); + w = z*z; + j = (0x6b851<<3)-ix; + t1= w*(Lg2+w*(Lg4+w*Lg6)); + t2= z*(Lg1+w*(Lg3+w*(Lg5+w*Lg7))); + i |= j; + R = t2+t1; + if(i>0) { + hfsq=(float)0.5*f*f; + if(k==0) return f-(hfsq-s*(hfsq+R)); else + return dk*ln2_hi-((hfsq-(s*(hfsq+R)+dk*ln2_lo))-f); + } else { + if(k==0) return f-s*(f-R); else + return dk*ln2_hi-((s*(f-R)-dk*ln2_lo)-f); + } +} diff --git a/src/math/fdlibm.h b/src/math/fdlibm.h index 821619ad..ee9fcb22 100644 --- a/src/math/fdlibm.h +++ b/src/math/fdlibm.h @@ -19,6 +19,7 @@ #define __ieee754_acosf acosf #define __ieee754_sqrtf sqrtf +#define __ieee754_logf logf /* REDHAT LOCAL: Include files. */ #include diff --git a/src/math/math.h b/src/math/math.h index fd543bc2..97dd74cf 100644 --- a/src/math/math.h +++ b/src/math/math.h @@ -34,4 +34,6 @@ float scalbnf(float x, int n); float copysignf(float x, float y); +float logf(float x); + #endif diff --git a/src/telegps-v0.3/Makefile b/src/telegps-v0.3/Makefile index bb9c8c64..5aad32b5 100644 --- a/src/telegps-v0.3/Makefile +++ b/src/telegps-v0.3/Makefile @@ -19,6 +19,9 @@ INC = \ Makefile +MATH_SRC=\ + ef_log.c + ALTOS_SRC = \ ao_interrupt.c \ ao_boot_chain.c \ @@ -47,6 +50,7 @@ ALTOS_SRC = \ ao_log.c \ ao_log_mega.c \ ao_gps_report_mega.c \ + $(MATH_SRC) \ $(SAMPLE_PROFILE) PRODUCT=TeleGPS-v0.3 diff --git a/src/telemega-v0.1/Makefile b/src/telemega-v0.1/Makefile index 0145f49c..35f28b30 100644 --- a/src/telemega-v0.1/Makefile +++ b/src/telemega-v0.1/Makefile @@ -58,7 +58,8 @@ MATH_SRC=\ sf_sin.c \ sf_fabs.c \ sf_floor.c \ - sf_scalbn.c + sf_scalbn.c \ + ef_log.c ALTOS_SRC = \ ao_boot_chain.c \ diff --git a/src/telemega-v1.0/Makefile b/src/telemega-v1.0/Makefile index 543f7e74..b5c1f402 100644 --- a/src/telemega-v1.0/Makefile +++ b/src/telemega-v1.0/Makefile @@ -59,7 +59,8 @@ MATH_SRC=\ sf_fabs.c \ sf_floor.c \ sf_scalbn.c \ - sf_sin.c + sf_sin.c \ + ef_log.c ALTOS_SRC = \ ao_boot_chain.c \ diff --git a/src/telemetrum-v2.0/Makefile b/src/telemetrum-v2.0/Makefile index cebc9cab..0b9e6914 100644 --- a/src/telemetrum-v2.0/Makefile +++ b/src/telemetrum-v2.0/Makefile @@ -37,6 +37,9 @@ INC = \ #STACK_GUARD=ao_mpu_stm.c #STACK_GUARD_DEF=-DHAS_STACK_GUARD=1 +MATH_SRC=\ + ef_log.c + ALTOS_SRC = \ ao_boot_chain.c \ ao_interrupt.c \ @@ -83,6 +86,7 @@ ALTOS_SRC = \ ao_packet.c \ ao_companion.c \ ao_aprs.c \ + $(MATH_SRC) \ $(PROFILE) \ $(SAMPLE_PROFILE) \ $(STACK_GUARD) -- cgit v1.2.3 From cc06242e882cba462791962c199b7c89e79adc65 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 14 Jan 2014 23:29:59 -0800 Subject: altos: Use factory calibration for all acceleration computations The ground acceleration value will vary depending on the tilt angle of the airframe, which will result in incorrect acceleration computations during flight. This also avoids accidental boost detect when moving the airframe around in pad mode. Signed-off-by: Keith Packard --- altoslib/AltosState.java | 12 ++---------- src/core/ao_flight.c | 2 +- src/core/ao_kalman.c | 2 +- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/altoslib/AltosState.java b/altoslib/AltosState.java index 134aeb4e..08dafbb4 100644 --- a/altoslib/AltosState.java +++ b/altoslib/AltosState.java @@ -949,14 +949,8 @@ public class AltosState implements Cloneable { } void update_accel() { - double ground = ground_accel; - - if (ground == AltosLib.MISSING) - ground = ground_accel_avg; if (accel == AltosLib.MISSING) return; - if (ground == AltosLib.MISSING) - return; if (accel_plus_g == AltosLib.MISSING) return; if (accel_minus_g == AltosLib.MISSING) @@ -964,7 +958,7 @@ public class AltosState implements Cloneable { double counts_per_g = (accel_minus_g - accel_plus_g) / 2.0; double counts_per_mss = counts_per_g / 9.80665; - acceleration.set_measured((ground - accel) / counts_per_mss, time); + acceleration.set_measured((accel_plus_g - accel) / counts_per_mss, time); } public void set_accel_g(double accel_plus_g, double accel_minus_g) { @@ -976,10 +970,8 @@ public class AltosState implements Cloneable { } public void set_ground_accel(double ground_accel) { - if (ground_accel != AltosLib.MISSING) { + if (ground_accel != AltosLib.MISSING) this.ground_accel = ground_accel; - update_accel(); - } } public void set_accel(double accel) { diff --git a/src/core/ao_flight.c b/src/core/ao_flight.c index 08302140..702c3403 100644 --- a/src/core/ao_flight.c +++ b/src/core/ao_flight.c @@ -401,7 +401,7 @@ ao_flight_dump(void) #if HAS_ACCEL int16_t accel; - accel = ((ao_ground_accel - ao_sample_accel) * ao_accel_scale) >> 16; + accel = ((ao_config.accel_plus_g - ao_sample_accel) * ao_accel_scale) >> 16; #endif printf ("sample:\n"); diff --git a/src/core/ao_kalman.c b/src/core/ao_kalman.c index 7fd4f889..9aea1f14 100644 --- a/src/core/ao_kalman.c +++ b/src/core/ao_kalman.c @@ -166,7 +166,7 @@ ao_kalman_err_accel(void) { int32_t accel; - accel = (ao_ground_accel - ao_sample_accel) * ao_accel_scale; + accel = (ao_config.accel_plus_g - ao_sample_accel) * ao_accel_scale; /* Can't use ao_accel here as it is the pre-prediction value still */ ao_error_a = (accel - ao_k_accel) >> 16; -- cgit v1.2.3 From c743eaa060080a7bd236466b93cff3abc96f405b Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 15 Jan 2014 12:40:26 -0800 Subject: altos: Report battery, apogee and main voltages over APRS This makes APRS more usable when you mute the RF audio on the HT. Signed-off-by: Keith Packard --- src/core/ao.h | 11 +++++ src/core/ao_convert_volt.c | 33 +++++++++++++++ src/drivers/ao_aprs.c | 94 +++++++++++++------------------------------ src/stm/ao_arch.h | 3 ++ src/telemega-v0.1/Makefile | 1 + src/telemega-v0.1/ao_pins.h | 17 ++++++++ src/telemega-v1.0/Makefile | 1 + src/telemetrum-v2.0/Makefile | 1 + src/telemetrum-v2.0/ao_pins.h | 17 ++++++++ 9 files changed, 113 insertions(+), 65 deletions(-) create mode 100644 src/core/ao_convert_volt.c diff --git a/src/core/ao.h b/src/core/ao.h index 0b634a79..29ad2603 100644 --- a/src/core/ao.h +++ b/src/core/ao.h @@ -307,6 +307,17 @@ ao_altitude_to_pa(alt_t alt); #include #endif +/* + * ao_convert_volt.c + * + * Convert ADC readings to decivolts + */ + +int16_t +ao_battery_decivolt(int16_t adc); + +int16_t +ao_ignite_decivolt(int16_t adc); /* * ao_spi_slave.c diff --git a/src/core/ao_convert_volt.c b/src/core/ao_convert_volt.c new file mode 100644 index 00000000..8556d423 --- /dev/null +++ b/src/core/ao_convert_volt.c @@ -0,0 +1,33 @@ +/* + * Copyright © 2014 Keith Packard + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ + +#include "ao.h" + +#define scale(v,p,m) ((int32_t) (v) * (AO_ADC_REFERENCE_DV * ((p) + (m))) / (AO_ADC_MAX * (m))) + +int16_t +ao_battery_decivolt(int16_t adc) +{ + return scale(adc, AO_BATTERY_DIV_PLUS, AO_BATTERY_DIV_MINUS); +} + +int16_t +ao_ignite_decivolt(int16_t adc) +{ + return scale(adc, AO_IGNITE_DIV_PLUS, AO_IGNITE_DIV_MINUS); +} + diff --git a/src/drivers/ao_aprs.c b/src/drivers/ao_aprs.c index 96e90f00..56d98437 100644 --- a/src/drivers/ao_aprs.c +++ b/src/drivers/ao_aprs.c @@ -488,6 +488,28 @@ static void tncCompressInt(uint8_t *dest, int32_t value, int len) { } } +#if HAS_ADC +static int tncComment(uint8_t *buf) +{ + struct ao_data packet; + + ao_arch_critical(ao_data_get(&packet);); + + int16_t battery = ao_battery_decivolt(packet.adc.v_batt); + int16_t apogee = ao_ignite_decivolt(AO_SENSE_DROGUE(&packet)); + int16_t main = ao_ignite_decivolt(AO_SENSE_MAIN(&packet)); + + return sprintf((char *) buf, + "B:%d.%d A:%d.%d M:%d.%d", + battery/10, + battery % 10, + apogee/10, + apogee%10, + main/10, + main%10); +} +#endif + /** * Generate the plain text position packet. */ @@ -502,72 +524,8 @@ static int tncPositionPacket(void) altitude = 0; altitude = (altitude * (int32_t) 10000 + (3048/2)) / (int32_t) 3048; -#if 0 - char lat_sign = 'N', lon_sign = 'E'; - uint16_t lat_deg; - uint16_t lon_deg; - uint16_t lat_min; - uint16_t lat_frac; - uint16_t lon_min; - uint16_t lon_frac; - - if (latitude < 0) { - lat_sign = 'S'; - latitude = -latitude; - } - - if (longitude < 0) { - lon_sign = 'W'; - longitude = -longitude; - } - - /* Round latitude and longitude by 0.005 minutes */ - latitude = latitude + 833; - if (latitude > 900000000) - latitude = 900000000; - longitude = longitude + 833; - if (longitude > 1800000000) - longitude = 1800000000; - - lat_deg = latitude / 10000000; - latitude -= lat_deg * 10000000; - latitude *= 60; - lat_min = latitude / 10000000; - latitude -= lat_min * 10000000; - lat_frac = latitude / 100000; - - lon_deg = longitude / 10000000; - longitude -= lon_deg * 10000000; - longitude *= 60; - lon_min = longitude / 10000000; - longitude -= lon_min * 10000000; - lon_frac = longitude / 100000; - -#if 0 - return sprintf ((char *) tncBuffer, "=%02u%02u.%02u%c\\%03u%02u.%02u%cO /A=%06u\015", - lat_deg, lat_min, lat_frac, lat_sign, - lon_deg, lon_min, lon_frac, lon_sign, - altitude); -#endif - - return sprintf ((char *) tncBuffer, "/%02u%02u%02uh%02u%02u.%02u%c/%03u%02u.%02u%c'/A=%06u\015", - ao_gps_data.hour, - ao_gps_data.minute, - ao_gps_data.second, - lat_deg, lat_min, lat_frac, lat_sign, - lon_deg, lon_min, lon_frac, lon_sign, - altitude); -#endif buf = tncBuffer; -#if APRS_TIME - sprintf ((char *) buf, "/%02u%02u%02uh", - ao_gps_data.hour, - ao_gps_data.minute, - ao_gps_data.second); - buf += 8; -#else *buf++ = '!'; -#endif /* Symbol table ID */ *buf++ = '/'; @@ -591,7 +549,13 @@ static int tncPositionPacket(void) buf += 2; *buf++ = 33 + ((1 << 5) | (2 << 3)); - *buf++ = '\0'; + +#if HAS_ADC + buf += tncComment(buf); +#else + *buf = '\0'; +#endif + return buf - tncBuffer; } diff --git a/src/stm/ao_arch.h b/src/stm/ao_arch.h index 42fe727a..76fa9194 100644 --- a/src/stm/ao_arch.h +++ b/src/stm/ao_arch.h @@ -135,6 +135,9 @@ extern const uint32_t ao_radio_cal; void ao_adc_init(); +/* ADC maximum reported value */ +#define AO_ADC_MAX 4095 + #define AO_BOOT_APPLICATION_BASE ((uint32_t *) 0x08001000) #define AO_BOOT_LOADER_BASE ((uint32_t *) 0x0) #define HAS_BOOT_LOADER 1 diff --git a/src/telemega-v0.1/Makefile b/src/telemega-v0.1/Makefile index 35f28b30..28ed7c98 100644 --- a/src/telemega-v0.1/Makefile +++ b/src/telemega-v0.1/Makefile @@ -100,6 +100,7 @@ ALTOS_SRC = \ ao_i2c_stm.c \ ao_mpu6000.c \ ao_convert_pa.c \ + ao_convert_volt.c \ ao_log.c \ ao_log_mega.c \ ao_sample.c \ diff --git a/src/telemega-v0.1/ao_pins.h b/src/telemega-v0.1/ao_pins.h index daeb9f17..db397c66 100644 --- a/src/telemega-v0.1/ao_pins.h +++ b/src/telemega-v0.1/ao_pins.h @@ -249,6 +249,23 @@ struct ao_adc { #define AO_ADC_SQ8 AO_ADC_V_PBATT #define AO_ADC_SQ9 AO_ADC_TEMP +/* + * Voltage divider on ADC battery sampler + */ +#define AO_BATTERY_DIV_PLUS 56 /* 5.6k */ +#define AO_BATTERY_DIV_MINUS 100 /* 10k */ + +/* + * Voltage divider on ADC igniter samplers + */ +#define AO_IGNITE_DIV_PLUS 100 /* 100k */ +#define AO_IGNITE_DIV_MINUS 27 /* 27k */ + +/* + * ADC reference in decivolts + */ +#define AO_ADC_REFERENCE_DV 33 + /* * Pressure sensor settings */ diff --git a/src/telemega-v1.0/Makefile b/src/telemega-v1.0/Makefile index b5c1f402..7a0c1195 100644 --- a/src/telemega-v1.0/Makefile +++ b/src/telemega-v1.0/Makefile @@ -101,6 +101,7 @@ ALTOS_SRC = \ ao_i2c_stm.c \ ao_mpu6000.c \ ao_convert_pa.c \ + ao_convert_volt.c \ ao_log.c \ ao_log_mega.c \ ao_sample.c \ diff --git a/src/telemetrum-v2.0/Makefile b/src/telemetrum-v2.0/Makefile index 0b9e6914..83a364dc 100644 --- a/src/telemetrum-v2.0/Makefile +++ b/src/telemetrum-v2.0/Makefile @@ -76,6 +76,7 @@ ALTOS_SRC = \ ao_eeprom_stm.c \ ao_report.c \ ao_convert_pa.c \ + ao_convert_volt.c \ ao_log.c \ ao_log_metrum.c \ ao_sample.c \ diff --git a/src/telemetrum-v2.0/ao_pins.h b/src/telemetrum-v2.0/ao_pins.h index 02f0f5e3..1b5cedc7 100644 --- a/src/telemetrum-v2.0/ao_pins.h +++ b/src/telemetrum-v2.0/ao_pins.h @@ -189,6 +189,23 @@ struct ao_adc { #define AO_ADC_SQ3 AO_ADC_V_BATT #define AO_ADC_SQ4 AO_ADC_TEMP +/* + * Voltage divider on ADC battery sampler + */ +#define AO_BATTERY_DIV_PLUS 56 /* 5.6k */ +#define AO_BATTERY_DIV_MINUS 100 /* 10k */ + +/* + * Voltage divider on ADC igniter samplers + */ +#define AO_IGNITE_DIV_PLUS 100 /* 100k */ +#define AO_IGNITE_DIV_MINUS 27 /* 27k */ + +/* + * ADC reference in decivolts + */ +#define AO_ADC_REFERENCE_DV 33 + /* * GPS */ -- cgit v1.2.3 From 9001d5780a41986017bd3bbc7f8c5556b116c351 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 15 Jan 2014 12:42:59 -0800 Subject: Ignore 32 and 64 bit cjnitest apps --- libaltos/.gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libaltos/.gitignore b/libaltos/.gitignore index 6d043d60..20c3d47a 100644 --- a/libaltos/.gitignore +++ b/libaltos/.gitignore @@ -9,5 +9,7 @@ classlibaltos.stamp libaltos_wrap.c libaltosJNI cjnitest +cjnitest32 +cjnitest64 libaltos.swig swig_bindings/ -- cgit v1.2.3 From cfcb127b248b62231049b6b50cf9b7edc2731f0a Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 15 Jan 2014 13:28:16 -0800 Subject: altos: Add missing ADC divider values for Tmega v1.0 Somehow I left these out of the previous commit Signed-off-by: Keith Packard --- src/telemega-v1.0/ao_pins.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/telemega-v1.0/ao_pins.h b/src/telemega-v1.0/ao_pins.h index 95644dae..fe97c684 100644 --- a/src/telemega-v1.0/ao_pins.h +++ b/src/telemega-v1.0/ao_pins.h @@ -249,6 +249,23 @@ struct ao_adc { #define AO_ADC_SQ8 AO_ADC_V_PBATT #define AO_ADC_SQ9 AO_ADC_TEMP +/* + * Voltage divider on ADC battery sampler + */ +#define AO_BATTERY_DIV_PLUS 56 /* 5.6k */ +#define AO_BATTERY_DIV_MINUS 100 /* 10k */ + +/* + * Voltage divider on ADC igniter samplers + */ +#define AO_IGNITE_DIV_PLUS 100 /* 100k */ +#define AO_IGNITE_DIV_MINUS 27 /* 27k */ + +/* + * ADC reference in decivolts + */ +#define AO_ADC_REFERENCE_DV 33 + /* * Pressure sensor settings */ -- cgit v1.2.3 From c33ec8207c0e5d4c855e87b2746371b19d437f7d Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Fri, 17 Jan 2014 20:47:16 -0700 Subject: use firmware in /usr/share/altos for production flashing --- ao-bringup/turnon_telemega | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ao-bringup/turnon_telemega b/ao-bringup/turnon_telemega index a8bf8697..3880b197 100755 --- a/ao-bringup/turnon_telemega +++ b/ao-bringup/turnon_telemega @@ -38,7 +38,8 @@ $STMLOAD --raw ../src/telemega-v$VERSION/flash-loader/*.elf || exit 1 sleep 2 -$USBLOAD --serial=$SERIAL ../src/telemega-v$VERSION/*.ihx || exit 1 +#$USBLOAD --serial=$SERIAL ../src/telemega-v$VERSION/*.ihx || exit 1 +$USBLOAD --serial=$SERIAL /usr/share/altos/telemega-v$VERSION*.ihx || exit 1 sleep 2 -- cgit v1.2.3 From 2b891115c95453d9002d8ef307a27e14eda145a5 Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Fri, 17 Jan 2014 20:55:45 -0700 Subject: set version to 1.3.0.2 for test flights this weekend --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 20acdf5f..33acc027 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.3.9.1) +AC_INIT([altos], 1.3.0.2) AC_CONFIG_SRCDIR([src/core/ao.h]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE -- cgit v1.2.3 From 7f9cda0e2531a7bba7f1b4e3b7212a62b5bec1ed Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 19 Jan 2014 00:17:06 -0800 Subject: altosui: Make romconfig serial and radio cal fields 8 digits wide This ensure that they are wide enough to show a cc1120 calibration value, which is 7 digits. Signed-off-by: Keith Packard --- altosui/AltosRomconfigUI.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/altosui/AltosRomconfigUI.java b/altosui/AltosRomconfigUI.java index 694a4e0e..89994679 100644 --- a/altosui/AltosRomconfigUI.java +++ b/altosui/AltosRomconfigUI.java @@ -69,7 +69,7 @@ public class AltosRomconfigUI c.weightx = 1; c.anchor = GridBagConstraints.LINE_START; c.insets = ir; - serial_value = new JTextField("0"); + serial_value = new JTextField("00000000"); pane.add(serial_value, c); /* Radio calibration value */ @@ -91,7 +91,7 @@ public class AltosRomconfigUI c.anchor = GridBagConstraints.LINE_START; c.insets = ir; c.ipady = 5; - radio_calibration_value = new JTextField("0"); + radio_calibration_value = new JTextField("00000000"); pane.add(radio_calibration_value, c); /* Buttons */ -- cgit v1.2.3 From aab5873c87d6ecfe0854751746f80d4bc7ebeffa Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Mon, 20 Jan 2014 04:52:43 +1000 Subject: AltosSiteMapPreload: only load 49 maps Google Static Maps API limits queries to 50 maps per IP per minute, so querying a 7x7 array instead of a 9x9 array seems more likely to work well. --- altosui/AltosSiteMapPreload.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/altosui/AltosSiteMapPreload.java b/altosui/AltosSiteMapPreload.java index fd648abc..7112fed6 100644 --- a/altosui/AltosSiteMapPreload.java +++ b/altosui/AltosSiteMapPreload.java @@ -213,7 +213,7 @@ public class AltosSiteMapPreload extends AltosUIDialog implements ActionListener AltosMapPos lat; AltosMapPos lon; - final static int radius = 4; + final static int radius = 3; final static int width = (radius * 2 + 1); final static int height = (radius * 2 + 1); @@ -326,7 +326,7 @@ public class AltosSiteMapPreload extends AltosUIDialog implements ActionListener pane.setLayout(new GridBagLayout()); - map = new AltosSiteMap(4); + map = new AltosSiteMap(radius); c.fill = GridBagConstraints.BOTH; c.anchor = GridBagConstraints.CENTER; @@ -464,4 +464,4 @@ public class AltosSiteMapPreload extends AltosUIDialog implements ActionListener setLocationRelativeTo(owner); setVisible(true); } -} \ No newline at end of file +} -- cgit v1.2.3 From 0faa098f05d43eefc1fa54462401171fca5034cb Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Mon, 20 Jan 2014 05:10:58 +1000 Subject: altosui: --fetchmaps gets same number of maps as GUI --- altosui/AltosSiteMap.java | 4 +++- altosui/AltosUI.java | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/altosui/AltosSiteMap.java b/altosui/AltosSiteMap.java index d714e13c..105afade 100644 --- a/altosui/AltosSiteMap.java +++ b/altosui/AltosSiteMap.java @@ -182,7 +182,9 @@ public class AltosSiteMap extends JScrollPane implements AltosFlightDisplay { } } - public static void prefetchMaps(double lat, double lng, int w, int h) { + public static void prefetchMaps(double lat, double lng) { + int w = AltosSiteMapPreload.width; + int h = AltosSiteMapPreload.height; AltosSiteMap asm = new AltosSiteMap(true); asm.centre = asm.getBaseLocation(lat, lng); diff --git a/altosui/AltosUI.java b/altosui/AltosUI.java index 50c5baab..5d459947 100644 --- a/altosui/AltosUI.java +++ b/altosui/AltosUI.java @@ -574,7 +574,7 @@ public class AltosUI extends AltosUIFrame { } else { double lat = Double.parseDouble(args[i+1]); double lon = Double.parseDouble(args[i+2]); - AltosSiteMap.prefetchMaps(lat, lon, 5, 5); + AltosSiteMap.prefetchMaps(lat, lon); i += 2; } } else if (args[i].equals("--replay")) -- cgit v1.2.3 From 7a8551fe8e5f0a90cbc494842715a96f08c11900 Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Mon, 20 Jan 2014 19:38:21 +1000 Subject: altosui: rate limit map downloads --- altosui/AltosSiteMapCache.java | 15 +++++++++++++++ altosui/AltosSiteMapPreload.java | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/altosui/AltosSiteMapCache.java b/altosui/AltosSiteMapCache.java index 40c8ff6b..03dc3cf5 100644 --- a/altosui/AltosSiteMapCache.java +++ b/altosui/AltosSiteMapCache.java @@ -25,8 +25,13 @@ import java.net.URL; import java.net.URLConnection; public class AltosSiteMapCache extends JLabel { + static final long google_maps_ratelimit_ms = 1200; + // Google limits static map queries to 50 per minute per IP, so + // each query should take at least 1.2 seconds. + public static boolean fetchMap(File file, String url) { URL u; + long startTime = System.nanoTime(); try { u = new URL(url); @@ -70,6 +75,16 @@ public class AltosSiteMapCache extends JLabel { } return false; } + + long duration_ms = (System.nanoTime() - startTime) / 1000000; + if (duration_ms < google_maps_ratelimit_ms) { + try { + Thread.sleep(google_maps_ratelimit_ms - duration_ms); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + } + } + return true; } diff --git a/altosui/AltosSiteMapPreload.java b/altosui/AltosSiteMapPreload.java index 7112fed6..66399557 100644 --- a/altosui/AltosSiteMapPreload.java +++ b/altosui/AltosSiteMapPreload.java @@ -213,7 +213,7 @@ public class AltosSiteMapPreload extends AltosUIDialog implements ActionListener AltosMapPos lat; AltosMapPos lon; - final static int radius = 3; + final static int radius = 5; final static int width = (radius * 2 + 1); final static int height = (radius * 2 + 1); -- cgit v1.2.3 From 99fedbf0ed42a5d4fa80f094576ca0260040ef5e Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Tue, 21 Jan 2014 21:31:25 -0700 Subject: set version to 1.3.1 for release --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 33acc027..93767fe7 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.3.0.2) +AC_INIT([altos], 1.3.1) AC_CONFIG_SRCDIR([src/core/ao.h]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE -- cgit v1.2.3 From 677fcafd3816b6d8d86b2dc41b840d97b5ccbf07 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 21 Jan 2014 21:34:58 -0800 Subject: altoslib: Fetch target device config for Fire Igniter npyro value The code was using the AltosLink config_data, which is always the locally connected device's configuration. When using the packet link, that's not terribly useful when asking how many extra pyro channels are available. Signed-off-by: Keith Packard --- altoslib/AltosIgnite.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/altoslib/AltosIgnite.java b/altoslib/AltosIgnite.java index d3c21796..8ab47d1d 100644 --- a/altoslib/AltosIgnite.java +++ b/altoslib/AltosIgnite.java @@ -27,6 +27,7 @@ public class AltosIgnite { boolean link_started; boolean have_npyro = false; int npyro; + AltosConfigData config_data; public final static String None = null; public final static String Apogee = "drogue"; @@ -97,8 +98,12 @@ public class AltosIgnite { } private void get_npyro() throws InterruptedException, TimeoutException { - AltosConfigData config_data = link.config_data(); - npyro = config_data.npyro; + if (config_data == null) + config_data = new AltosConfigData(link); + if (config_data != null) + npyro = config_data.npyro; + else + npyro = 0; have_npyro = true; } -- cgit v1.2.3 From f118e33416e45ea9a2b5ede4157bd8b58ddb6ebb Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 21 Jan 2014 21:37:18 -0800 Subject: altosuilib: Remove some spurious debug printfs Signed-off-by: Keith Packard --- altosuilib/AltosUILib.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/altosuilib/AltosUILib.java b/altosuilib/AltosUILib.java index 18c4c3d9..76782e2e 100644 --- a/altosuilib/AltosUILib.java +++ b/altosuilib/AltosUILib.java @@ -87,11 +87,9 @@ public class AltosUILib extends AltosLib { if (!initialized) { for (String name : library_names) { try { - System.out.printf ("Trying library %s\n", name); System.loadLibrary(name); libaltos.altos_init(); loaded_library = true; - System.out.printf ("Using library %s\n", name); break; } catch (UnsatisfiedLinkError e) { System.out.printf("Link error %s\n", e.getMessage()); -- cgit v1.2.3 From 42922b40fc695bdaa92e3fb0b41a248f7df918d0 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 21 Jan 2014 22:01:39 -0800 Subject: altosui: Handle already-opened link in IgniteUI Must run the link open from the UI thread so that we can put up the in-use dialog immdiately; otherwise the UI thread is blocked which means the dialog never appears and the app appears to hang. Signed-off-by: Keith Packard --- altosui/AltosIgniteUI.java | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/altosui/AltosIgniteUI.java b/altosui/AltosIgniteUI.java index 9d063702..2e69249f 100644 --- a/altosui/AltosIgniteUI.java +++ b/altosui/AltosIgniteUI.java @@ -39,6 +39,7 @@ public class AltosIgniteUI javax.swing.Timer timer; JButton close; ButtonGroup group; + Boolean opened; int npyro; @@ -110,6 +111,7 @@ public class AltosIgniteUI class IgniteHandler implements Runnable { AltosIgnite ignite; JFrame owner; + AltosLink link; void send_exception(Exception e) { final Exception f_e = e; @@ -123,9 +125,7 @@ public class AltosIgniteUI public void run () { try { - AltosSerial serial = new AltosSerial(device); - serial.set_frame(owner); - ignite = new AltosIgnite(serial, + ignite = new AltosIgnite(link, !device.matchProduct(Altos.product_altimeter)); } catch (Exception e) { @@ -172,8 +172,9 @@ public class AltosIgniteUI } } - public IgniteHandler(JFrame in_owner) { + public IgniteHandler(JFrame in_owner, AltosLink in_link) { owner = in_owner; + link = in_link; } } @@ -307,8 +308,10 @@ public class AltosIgniteUI } void close() { - send_command("quit"); - timer.stop(); + if (opened) { + send_command("quit"); + timer.stop(); + } setVisible(false); dispose(); } @@ -382,12 +385,20 @@ public class AltosIgniteUI command_queue = new LinkedBlockingQueue(); reply_queue = new LinkedBlockingQueue(); + opened = false; device = AltosDeviceUIDialog.show(owner, Altos.product_any); if (device != null) { - IgniteHandler handler = new IgniteHandler(owner); + try { + AltosSerial serial = new AltosSerial(device); + serial.set_frame(owner); + IgniteHandler handler = new IgniteHandler(owner, serial); Thread t = new Thread(handler); t.start(); + opened = true; return true; + } catch (Exception ex) { + ignite_exception(ex); + } } return false; } -- cgit v1.2.3 From e61c02b51e069aa58b36f59b9ca8e7c8284bc93a Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 21 Jan 2014 22:13:01 -0800 Subject: altosui: Handle serial-port startup errors in idle-monitor Trap exceptions during idle monitor startup and report them. Signed-off-by: Keith Packard --- altosui/AltosIdleMonitorUI.java | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/altosui/AltosIdleMonitorUI.java b/altosui/AltosIdleMonitorUI.java index 88779c93..7ca935b6 100644 --- a/altosui/AltosIdleMonitorUI.java +++ b/altosui/AltosIdleMonitorUI.java @@ -132,8 +132,35 @@ public class AltosIdleMonitorUI extends AltosUIFrame implements AltosFlightDispl return constraints(x, width, GridBagConstraints.NONE); } + void idle_exception(JFrame owner, Exception e) { + if (e instanceof FileNotFoundException) { + JOptionPane.showMessageDialog(owner, + ((FileNotFoundException) e).getMessage(), + "Cannot open target device", + JOptionPane.ERROR_MESSAGE); + } else if (e instanceof AltosSerialInUseException) { + JOptionPane.showMessageDialog(owner, + String.format("Device \"%s\" already in use", + device.toShortString()), + "Device in use", + JOptionPane.ERROR_MESSAGE); + } else if (e instanceof IOException) { + IOException ee = (IOException) e; + JOptionPane.showMessageDialog(owner, + device.toShortString(), + ee.getLocalizedMessage(), + JOptionPane.ERROR_MESSAGE); + } else { + JOptionPane.showMessageDialog(owner, + String.format("Connection to \"%s\" failed", + device.toShortString()), + "Connection Failed", + JOptionPane.ERROR_MESSAGE); + } + } + public AltosIdleMonitorUI(JFrame in_owner) - throws FileNotFoundException, AltosSerialInUseException, TimeoutException, InterruptedException { + throws FileNotFoundException, TimeoutException, InterruptedException { device = AltosDeviceUIDialog.show(in_owner, Altos.product_any); remote = false; @@ -141,6 +168,15 @@ public class AltosIdleMonitorUI extends AltosUIFrame implements AltosFlightDispl remote = true; serial = device.getSerial(); + + AltosLink link; + try { + link = new AltosSerial(device); + } catch (Exception ex) { + idle_exception(in_owner, ex); + return; + } + bag = getContentPane(); bag.setLayout(new GridBagLayout()); @@ -209,7 +245,7 @@ public class AltosIdleMonitorUI extends AltosUIFrame implements AltosFlightDispl pack(); setVisible(true); - thread = new AltosIdleMonitor((AltosIdleMonitorListener) this, (AltosLink) new AltosSerial (device), (boolean) remote); + thread = new AltosIdleMonitor((AltosIdleMonitorListener) this, link, (boolean) remote); status_update = new AltosFlightStatusUpdate(flightStatus); -- cgit v1.2.3 From e6a73d6cbe149a930f8c4e2dac655bc3f6270013 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 21 Jan 2014 23:01:28 -0800 Subject: doc: Fix image widths to make them all scale the same amount Hand-compute scale factors so that all images are presented at the same relative size as they would be on the screen. Signed-off-by: Keith Packard --- doc/altusmetrum.xsl | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/altusmetrum.xsl b/doc/altusmetrum.xsl index c71e08a7..431e43e6 100644 --- a/doc/altusmetrum.xsl +++ b/doc/altusmetrum.xsl @@ -1578,7 +1578,7 @@ NAR #88757, TRA #12200 - + @@ -1603,7 +1603,7 @@ NAR #88757, TRA #12200 - + @@ -2015,7 +2015,7 @@ NAR #88757, TRA #12200 - + @@ -2037,7 +2037,7 @@ NAR #88757, TRA #12200 - + @@ -2052,7 +2052,7 @@ NAR #88757, TRA #12200 - + @@ -2065,7 +2065,7 @@ NAR #88757, TRA #12200 - + @@ -2122,7 +2122,7 @@ NAR #88757, TRA #12200 - + @@ -2379,7 +2379,7 @@ NAR #88757, TRA #12200 - + @@ -2489,7 +2489,7 @@ NAR #88757, TRA #12200 - + @@ -2584,7 +2584,7 @@ NAR #88757, TRA #12200 - + @@ -2618,7 +2618,7 @@ NAR #88757, TRA #12200 - + @@ -2636,7 +2636,7 @@ NAR #88757, TRA #12200 - + -- cgit v1.2.3 From 63171339c03cf9bf3d691511889223bf43024124 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 21 Jan 2014 23:02:27 -0800 Subject: doc: Update for 1.3.1 Add 1.3.1 release notes. Update screen shots. Document new functionality Signed-off-by: Keith Packard --- doc/Makefile | 3 +- doc/altusmetrum.xsl | 32 +++++++++++++++----- doc/ascent.png | Bin 63675 -> 56652 bytes doc/descent.png | Bin 63689 -> 58496 bytes doc/fire-igniter.png | Bin 6979 -> 7146 bytes doc/graph-configure.png | Bin 44367 -> 43310 bytes doc/landed.png | Bin 53215 -> 48532 bytes doc/launch-pad.png | Bin 84611 -> 76938 bytes doc/release-notes-1.3.1.xsl | 71 ++++++++++++++++++++++++++++++++++++++++++++ doc/site-map.png | Bin 618430 -> 582089 bytes doc/table.png | Bin 71556 -> 67001 bytes 11 files changed, 97 insertions(+), 9 deletions(-) create mode 100644 doc/release-notes-1.3.1.xsl diff --git a/doc/Makefile b/doc/Makefile index bc8dc2a2..80310869 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -12,7 +12,8 @@ RELNOTES=\ release-notes-1.1.1.html \ release-notes-1.2.html \ release-notes-1.2.1.html \ - release-notes-1.3.html + release-notes-1.3.html \ + release-notes-1.3.1.html PICTURES=\ altosui.png \ diff --git a/doc/altusmetrum.xsl b/doc/altusmetrum.xsl index 431e43e6..a6d2ff12 100644 --- a/doc/altusmetrum.xsl +++ b/doc/altusmetrum.xsl @@ -35,6 +35,14 @@ + + 1.3.1 + 21 January 2014 + + Bug fixes for TeleMega and TeleMetrum v2.0 along with a few + small UI improvements. + + 1.3 12 November 2013 @@ -1787,10 +1795,10 @@ NAR #88757, TRA #12200 rocket as it heads towards apogee. - The height, speed and acceleration are shown along with the - maximum values for each of them. This allows you to quickly - answer the most commonly asked questions you'll hear during - flight. + The height, speed, acceleration and tilt are shown along + with the maximum values for each of them. This allows you to + quickly answer the most commonly asked questions you'll hear + during flight. The current latitude and longitude reported by the GPS are @@ -2598,8 +2606,8 @@ NAR #88757, TRA #12200 Selecting the 'Fire Igniter' button brings up the usual device selection dialog. Pick the desired device. This brings up another - window which shows the current continuity test status for both - apogee and main charges. + window which shows the current continuity test status for all + of the pyro channels. Next, select the desired igniter to fire. This will enable the @@ -4186,11 +4194,12 @@ NAR #88757, TRA #12200 Then, divide 434.550 MHz by the measured frequency and multiply by the current radio cal value show in the 'c s' command. For an unprogrammed board, the default value - is 1186611. Take the resulting integer and program it using the 'c f' + is 1186611 for cc1111 based products and 7119667 for cc1120 + based products. Take the resulting integer and program it using the 'c f' command. Testing with the 'C' command again should show a carrier within a few tens of Hertz of the intended frequency. As with all 'c' sub-commands, follow this with a 'c w' to write the - change to the parameter block in the on-board DataFlash chip. + change to the configuration memory. Note that the 'reboot' command, which is very useful on the altimeters, @@ -4447,6 +4456,13 @@ NAR #88757, TRA #12200 Release Notes + + Version 1.3.1 + + Version 1.3 + + +
+ + Version 1.3.1 is a minor release. It improves support for TeleMega, + TeleMetrum v2.0, TeleMini v2.0 and EasyMini. + + + AltOS Firmware Changes + + + + Improve sensor boot code. If sensors fail to self-test, the + device will still boot up and check for pad/idle modes. If + in idle mode, the device will warn the user with a distinct + beep, if in Pad mode, the unit will operate as best it + can. Also, the Z-axis accelerometer now uses the factory + calibration values instead of re-calibrating on the pad each + time. This avoids accidental boost detect when moving the + device around while in Pad mode. + + + + + Fix antenna-down mode accelerometer configuration. Antenna + down mode wasn't working because the accelerometer + calibration values were getting re-computed incorrectly in + inverted mode. + + + + + Improved APRS mode. Now uses compressed position format for + smaller data size, improved precision and to include + altitude data as well as latitude and longitude. Also added + battery and pyro voltage reports in the APRS comment field + so you can confirm that the unit is ready for launch. + + + + + + AltosUI changes + + + + Display additional TeleMega sensor values in real + units. Make all of these values available for + plotting. Display TeleMega orientation value in the Ascent + and Table tabs. + + + + + Support additional TeleMega pyro channels in the Fire + Igniter dialog. This lets you do remote testing of all of + the channels, rather than just Apogee and Main. + + + + + Limit data rate when downloading satellite images from + Google to make sure we stay within their limits so that all + of the map tiles download successfully. + + + + +
diff --git a/doc/site-map.png b/doc/site-map.png index a6d3f78b..e0a99ecc 100644 Binary files a/doc/site-map.png and b/doc/site-map.png differ diff --git a/doc/table.png b/doc/table.png index 86cb9881..ee612197 100644 Binary files a/doc/table.png and b/doc/table.png differ -- cgit v1.2.3 From 200137060651f48c99276c8feb0e15980a9b46be Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Wed, 22 Jan 2014 20:52:09 -0700 Subject: update copyright date on main documentation file --- doc/altusmetrum.xsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/altusmetrum.xsl b/doc/altusmetrum.xsl index a6d2ff12..036b0b61 100644 --- a/doc/altusmetrum.xsl +++ b/doc/altusmetrum.xsl @@ -22,7 +22,7 @@ Towns - 2013 + 2014 Bdale Garbee and Keith Packard -- cgit v1.2.3 From 0ef0c50536e5eb6ad3455b5828983307edbab828 Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Wed, 22 Jan 2014 20:53:03 -0700 Subject: freshen ChangeLog for release --- ChangeLog | 602 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 602 insertions(+) diff --git a/ChangeLog b/ChangeLog index 1a16bd7f..083233ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,605 @@ +commit 200137060651f48c99276c8feb0e15980a9b46be +Author: Bdale Garbee +Date: Wed Jan 22 20:52:09 2014 -0700 + + update copyright date on main documentation file + +commit 63171339c03cf9bf3d691511889223bf43024124 +Author: Keith Packard +Date: Tue Jan 21 23:02:27 2014 -0800 + + doc: Update for 1.3.1 + + Add 1.3.1 release notes. Update screen shots. Document new functionality + + Signed-off-by: Keith Packard + +commit e6a73d6cbe149a930f8c4e2dac655bc3f6270013 +Author: Keith Packard +Date: Tue Jan 21 23:01:28 2014 -0800 + + doc: Fix image widths to make them all scale the same amount + + Hand-compute scale factors so that all images are presented at the + same relative size as they would be on the screen. + + Signed-off-by: Keith Packard + +commit e61c02b51e069aa58b36f59b9ca8e7c8284bc93a +Author: Keith Packard +Date: Tue Jan 21 22:13:01 2014 -0800 + + altosui: Handle serial-port startup errors in idle-monitor + + Trap exceptions during idle monitor startup and report them. + + Signed-off-by: Keith Packard + +commit 42922b40fc695bdaa92e3fb0b41a248f7df918d0 +Author: Keith Packard +Date: Tue Jan 21 22:01:39 2014 -0800 + + altosui: Handle already-opened link in IgniteUI + + Must run the link open from the UI thread so that we can put up the + in-use dialog immdiately; otherwise the UI thread is blocked which + means the dialog never appears and the app appears to hang. + + Signed-off-by: Keith Packard + +commit f118e33416e45ea9a2b5ede4157bd8b58ddb6ebb +Author: Keith Packard +Date: Tue Jan 21 21:37:18 2014 -0800 + + altosuilib: Remove some spurious debug printfs + + Signed-off-by: Keith Packard + +commit 677fcafd3816b6d8d86b2dc41b840d97b5ccbf07 +Author: Keith Packard +Date: Tue Jan 21 21:34:58 2014 -0800 + + altoslib: Fetch target device config for Fire Igniter npyro value + + The code was using the AltosLink config_data, which is always the + locally connected device's configuration. When using the packet link, + that's not terribly useful when asking how many extra pyro channels + are available. + + Signed-off-by: Keith Packard + +commit 13cf4000bd53ac4af66231d56e24c9eb11178a5f +Merge: 7a8551f 99fedbf +Author: Keith Packard +Date: Tue Jan 21 20:59:06 2014 -0800 + + Merge remote-tracking branch 'origin/master' + +commit 99fedbf0ed42a5d4fa80f094576ca0260040ef5e +Author: Bdale Garbee +Date: Tue Jan 21 21:31:25 2014 -0700 + + set version to 1.3.1 for release + +commit 7a8551fe8e5f0a90cbc494842715a96f08c11900 +Author: Anthony Towns +Date: Mon Jan 20 19:38:21 2014 +1000 + + altosui: rate limit map downloads + +commit 0faa098f05d43eefc1fa54462401171fca5034cb +Author: Anthony Towns +Date: Mon Jan 20 05:10:58 2014 +1000 + + altosui: --fetchmaps gets same number of maps as GUI + +commit aab5873c87d6ecfe0854751746f80d4bc7ebeffa +Author: Anthony Towns +Date: Mon Jan 20 04:52:43 2014 +1000 + + AltosSiteMapPreload: only load 49 maps + + Google Static Maps API limits queries to 50 maps per IP per minute, + so querying a 7x7 array instead of a 9x9 array seems more likely to + work well. + +commit 7f9cda0e2531a7bba7f1b4e3b7212a62b5bec1ed +Author: Keith Packard +Date: Sun Jan 19 00:17:06 2014 -0800 + + altosui: Make romconfig serial and radio cal fields 8 digits wide + + This ensure that they are wide enough to show a cc1120 calibration + value, which is 7 digits. + + Signed-off-by: Keith Packard + +commit 2b891115c95453d9002d8ef307a27e14eda145a5 +Author: Bdale Garbee +Date: Fri Jan 17 20:55:45 2014 -0700 + + set version to 1.3.0.2 for test flights this weekend + +commit c33ec8207c0e5d4c855e87b2746371b19d437f7d +Author: Bdale Garbee +Date: Fri Jan 17 20:47:16 2014 -0700 + + use firmware in /usr/share/altos for production flashing + +commit cfcb127b248b62231049b6b50cf9b7edc2731f0a +Author: Keith Packard +Date: Wed Jan 15 13:28:16 2014 -0800 + + altos: Add missing ADC divider values for Tmega v1.0 + + Somehow I left these out of the previous commit + + Signed-off-by: Keith Packard + +commit 9001d5780a41986017bd3bbc7f8c5556b116c351 +Author: Keith Packard +Date: Wed Jan 15 12:42:59 2014 -0800 + + Ignore 32 and 64 bit cjnitest apps + +commit c743eaa060080a7bd236466b93cff3abc96f405b +Author: Keith Packard +Date: Wed Jan 15 12:40:26 2014 -0800 + + altos: Report battery, apogee and main voltages over APRS + + This makes APRS more usable when you mute the RF audio on the HT. + + Signed-off-by: Keith Packard + +commit cc06242e882cba462791962c199b7c89e79adc65 +Author: Keith Packard +Date: Tue Jan 14 23:29:59 2014 -0800 + + altos: Use factory calibration for all acceleration computations + + The ground acceleration value will vary depending on the tilt angle of + the airframe, which will result in incorrect acceleration computations + during flight. This also avoids accidental boost detect when moving + the airframe around in pad mode. + + Signed-off-by: Keith Packard + +commit 9d812b3db418fd9816731b761a0853eb38f5a265 +Author: Keith Packard +Date: Tue Jan 14 23:21:40 2014 -0800 + + altos: Switch APRS to compressed position format + + This provides lat/lon/alt in fewer bytes while improving precision. + + Signed-off-by: Keith Packard + +commit f560d5063b1339dbfb3e6723cfadb7b4c5eace25 +Author: Keith Packard +Date: Tue Jan 14 23:18:40 2014 -0800 + + doc: Ship telemini outline as pdf file too + + Build telemini.pdf from telemini.svg and include it in all of the + released packages. + + Signed-off-by: Keith Packard + +commit 06ffd8022ff5ac74274c9839d42c0c47274cb8b9 +Author: Keith Packard +Date: Wed Jan 1 22:08:13 2014 -0800 + + altosui: Require both libaltos32 and libaltos64 for fat Linux tarball + + No sense shipping a broken tarball ever + + Signed-off-by: Keith Packard + +commit 8bff2822c242d2878b408b9c0d8a7647108ea4b1 +Author: Keith Packard +Date: Wed Jan 1 22:02:56 2014 -0800 + + libaltos: Build -m64 and -m32 for fat tarball when possible + + Check to see if we can compile libaltos for both 32 bit and 64 bit + systems, and then use those when generating the linux tarball. + + Signed-off-by: Keith Packard + +commit 95d77eaff708397d8b1e29904dc47d8ea09e8754 +Author: Keith Packard +Date: Wed Jan 1 22:02:04 2014 -0800 + + Bump version to 1.3.9.1 + + Lots of new features; let's not release with 1.3 set + + Signed-off-by: Keith Packard + +commit b15bd24bbe48e338497c6257f5fe2c7fd1cbffbb +Author: Keith Packard +Date: Wed Jan 1 22:00:24 2014 -0800 + + altosui: Handle a missing libaltos when starting up + + Skip a null list of devices when figuring out what to open monitor + windows for during startup. + + Signed-off-by: Keith Packard + +commit c35ea586b9e792c45b287924fd256928308d9a36 +Author: Keith Packard +Date: Wed Jan 1 21:12:20 2014 -0800 + + altos: Flip acceleration data consistently for orientation changes + + Must flip the acceleration calibration data using the same function as + flipping the actual acceleration data or the calibration will no + longer be valid after changing orientation. For the MMA655x, this + means using 4095 in both places, rather than using 0x7fff for the + calibration data changes and 4095 for the data value changes. For the + MPU6000, this means using 0 in both places. + + Signed-off-by: Keith Packard + +commit afc16e805145c3e9ab4ba948f9ab1d9aa2b27afb +Author: Keith Packard +Date: Sat Dec 28 10:18:53 2013 -0800 + + altos: Add 'O' command for TeleMega orient testing + + Only present when HAS_FLIGHT_DEBUG is enabled, this command lets the + user check the orientation tracking code by showing the current + orientation and when the calibration values are reset. + + Signed-off-by: Keith Packard + +commit 9877f6b880a0e89fbfbf1a39ded94bdc1891f3d9 +Author: Keith Packard +Date: Sat Dec 28 10:17:37 2013 -0800 + + altosui: Switch Graph to AltosOrient type + + The graph was using a private class for orient type, use the altoslib one + + Signed-off-by: Keith Packard + +commit aa01f06acfbf029958a55f68175b6868817b333f +Author: Keith Packard +Date: Sat Dec 28 10:16:24 2013 -0800 + + altosui: Adjust info table column width + + Make sure the info table can show a full longitude value + + Signed-off-by: Keith Packard + +commit bbc4940730e6b431f1b9ccd9bbaf9faa0ffb2b1f +Author: Keith Packard +Date: Sat Dec 28 10:15:26 2013 -0800 + + altosui: Add orient to ascent and info table views + + This adds 'tilt angle' to both ascent and info table views + + Signed-off-by: Keith Packard + +commit 053d092b3dca4ebb98e97ec0fe24f5f5e1c31f88 +Author: Keith Packard +Date: Sat Dec 28 10:13:05 2013 -0800 + + altoslib: Add AltosOrient class and max_orient() + + This adds the class necessary to put orient into a UI. + + Signed-off-by: Keith Packard + +commit 081455dcba860f3e4df8cd66f3fe686b204034ad +Author: Keith Packard +Date: Sat Dec 21 08:56:00 2013 -0800 + + altosui: Extend Fire Igniter to additional channels + + This lets the UI test fire other pyro channels on TeleMega + + Signed-off-by: Keith Packard + +commit 9cf9a67f937185c0c0bb5b2bae4f420755965799 +Author: Keith Packard +Date: Sat Dec 21 06:46:46 2013 -0800 + + altosui: Switch from radio buttons to check boxes in pyro config. Add close + + First of (we hope) many review comments from Troj. + + Signed-off-by: Keith Packard + +commit 9289200ccb661b10ff892760ecbc752c7745de6b +Author: Keith Packard +Date: Fri Dec 20 23:04:43 2013 -0800 + + altos: Turn on -Werror for STM and LPC builds + + Now that the build completes with no warnings, make future warnings + into errors. + + Signed-off-by: Keith Packard + +commit 16b37b49985daf21ebb93b3d6ae64af67533be22 +Author: Keith Packard +Date: Fri Dec 20 23:02:51 2013 -0800 + + altos: Turn on warnings for LPC products too + + Signed-off-by: Keith Packard + +commit f578d9455eec9ea0eccd2d5e21349e274ea4281a +Author: Keith Packard +Date: Fri Dec 20 23:02:21 2013 -0800 + + altos/lpc: Missing */ in definition of PIO0_4 + + Would maek using these values pretty hard. + + Signed-off-by: Keith Packard + +commit 14790172e02d4e1624c35797f87ffd94345d54ff +Author: Keith Packard +Date: Fri Dec 20 23:00:43 2013 -0800 + + altos: lpc exti setup was incorrectly testing mode + + Check for NOCONFIGURE bit was missing parens + + Signed-off-by: Keith Packard + +commit 48f996a9d65631238b4de446530f31f83acb99f5 +Author: Keith Packard +Date: Fri Dec 20 22:59:42 2013 -0800 + + altos: cc115l driver tone_run wasn't recording number of tones + + This would prevent the cc115l driver from ever sending tones. + + Signed-off-by: Keith Packard + +commit e11fcc299f4a1a0461a3442ca13f8984d76c30ff +Author: Keith Packard +Date: Fri Dec 20 22:58:10 2013 -0800 + + altos: Clean up warnings for LPC products + + Unused varibles, functions and parameters. + + Signed-off-by: Keith Packard + +commit 4ed108fb86676daea17264d7159c2cff9ea7a6e4 +Author: Keith Packard +Date: Fri Dec 20 22:45:56 2013 -0800 + + altos/stm: Turn on -Wextra + + All of the warnings for STM projects are cleaned up now + + Signed-off-by: Keith Packard + +commit 1406a5b0721a135913a9801e9eea9e91f0a536b4 +Author: Keith Packard +Date: Fri Dec 20 22:45:01 2013 -0800 + + altos: Add default button return value from ao_button_get + + This "can't" happen, but it's not unreasonable to have a default + return value. + + Signed-off-by: Keith Packard + +commit 316d898715746a379068ac8511692bdb9da14b39 +Author: Keith Packard +Date: Fri Dec 20 22:44:20 2013 -0800 + + altos: unsigned value in ao_pyro_set checked for negative value + + No sense checking unsigned values for less than zero. + + Signed-off-by: Keith Packard + +commit 5c9172ba5681ff93d63c9c263a453d0025170045 +Author: Keith Packard +Date: Fri Dec 20 22:43:18 2013 -0800 + + altos: Clean up -Wextra warnings + + Unused variables, mismatching signed/unsigned and a few other misc + warnings. + + Signed-off-by: Keith Packard + +commit db8f3426ac1cf756a2e4974ca61a5ae9048c80ce +Author: Keith Packard +Date: Fri Dec 20 22:21:23 2013 -0800 + + altos: Turn on -Wall for stm compiles + + The warnings are all cleaned up now, leave this on by default + + Signed-off-by: Keith Packard + +commit b31b4622d5bd92c0cc0851818f5b595dbdb60ead +Author: Keith Packard +Date: Fri Dec 20 22:15:25 2013 -0800 + + altos: Clean up some minor warnings from -Wall + + Unused variables, functions and labels, missing enums in switch. + + Signed-off-by: Keith Packard + +commit 755082d36231c1b247bc0e1f13919dd9b5c362a8 +Author: Keith Packard +Date: Fri Dec 20 22:13:32 2013 -0800 + + altos: mma655x also needs ao_sensor_errors + + TeleMetrum has an MMA655X but no IMU, so it needs an explicit addition + for sensor errors. + + Signed-off-by: Keith Packard + +commit 758acb92cccbe4b64a35a1883b42713738c90630 +Author: Keith Packard +Date: Fri Dec 20 22:08:11 2013 -0800 + + altos: Complain about sensor self-test errors only in idle mode + + When the accelerometer says to go into pad mode, don't look for other + sensor self test errors. Only look for sensor self test errors to + choose between idle and invalid mode. This will prevent minor sensor + self test errors from letting the rocket fly safely. + + Signed-off-by: Keith Packard + +commit c8b27410e45cc3d80ad4b896bffe70e9aec5e3aa +Author: Keith Packard +Date: Fri Dec 20 22:06:52 2013 -0800 + + altos: 3-axis accel calibration was invalid in explicit accel cal mode + + When explicit Z-axis accel calibration values were provided to the 'c + a' command, the 3-axis accelerometer calibration values would get set + to uninitialized values. Not so helpful. + + Signed-off-by: Keith Packard + +commit 2a912dcde191e2f750845c464611641a5abdc28a +Author: Keith Packard +Date: Fri Dec 20 22:04:53 2013 -0800 + + altos: Execute self-test on MMA655X part + + This doesn't check for fine calibration, just makes sure the part is + within the broad tolerances specified by the manufacturer. The subtle fix + here was actually getting reset working -- there was a typo in the + bitpattern definition which caused the reset to fail, making it hard + to self-test the part, as self-test is only valid before the part is running. + + Signed-off-by: Keith Packard + +commit b89fb51a963635e2effe3a31f803bfc29c2c46b7 +Author: Keith Packard +Date: Fri Dec 20 19:44:38 2013 -0800 + + altoslib: Bump library version + + Prepare for next release by making sure we notice that the API/ABI for + this library has changed. + + Signed-off-by: Keith Packard + +commit 8e5f3b922100f9de54b9650df14749e81b1a6562 +Author: Keith Packard +Date: Fri Dec 20 19:40:31 2013 -0800 + + altosui: Add imu and mag sensor values to plots + + Makes for a lot of potential graph elements. + + Signed-off-by: Keith Packard + +commit f65880cf5bfcba5005c32db2b300448e585f3e45 +Author: Keith Packard +Date: Fri Dec 20 19:39:40 2013 -0800 + + altosuilib: Rearrange graph enable buttons + + Eliminate separate 'enable' radio button, provide for multiple columns + + Signed-off-by: Keith Packard + +commit 796cb90e3241103f79ae12565cf6f0dad21cb57c +Author: Keith Packard +Date: Fri Dec 20 19:38:29 2013 -0800 + + altoslib: Fetch 'orient' value from Mega Sensor packet + + The mega sensor packet had a spare byte to hold the current + orientation value. + + Signed-off-by: Keith Packard + +commit 91bcfae2e64ecb2e7de1292b264910382b635aea +Author: Keith Packard +Date: Fri Dec 20 19:37:08 2013 -0800 + + altoslib: Convert IMU and Mag sensor values to useful units + + Convert from raw sensor values to metric units + + Signed-off-by: Keith Packard + +commit 2ad31bad20b20615e9d8b29088e2488fddc81ac9 +Author: Mike Beattie +Date: Fri Dec 20 15:06:37 2013 +1300 + + altosdroid: improve build system dependencies + + Signed-off-by: Mike Beattie + +commit 0e3b3ce66035e8a90fd708d9a4bc01370174c9eb +Author: Mike Beattie +Date: Fri Dec 20 15:06:07 2013 +1300 + + altosdroid: update to latest google play services + + Signed-off-by: Mike Beattie + +commit 96f2ae5fc0d3bf88704d2ae1b4df5dc6aefc523b +Author: Mike Beattie +Date: Fri Dec 20 15:05:42 2013 +1300 + + altosdroid: force older jarsigner signing algorithm for java 1.7 + + (increment versionCode, re-upload to Play Store) + + Signed-off-by: Mike Beattie + +commit ac12e77e3dffc9e9ddb1578a38b32783ad64e940 +Author: Bdale Garbee +Date: Thu Dec 19 03:22:21 2013 -0700 + + updated notes from 1.3 release + +commit 27528961457865acc3a38b822268df6d7cb86cfd +Merge: 4006eff a31629d +Author: Bdale Garbee +Date: Thu Dec 19 02:00:10 2013 -0700 + + Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos + +commit 4006effc538289c36a1563c1b717231991292c0c +Author: Bdale Garbee +Date: Thu Dec 19 01:58:24 2013 -0700 + + fix missing newline at end of src/test/Makefile + +commit a31629dfceb5e9cf1d5c654b8bd87d575f73c34b +Author: Keith Packard +Date: Thu Dec 19 00:58:50 2013 -0800 + + altosui: Ship EasyMini firmware too + + Missing the FIRMWARE_EMINI define left all easy mini firmware out of + the distribution + + Signed-off-by: Keith Packard + +commit bc3610d8cecbfed40c62d4dcb93fc9a4d2a7c9e3 +Author: Bdale Garbee +Date: Thu Dec 19 01:29:55 2013 -0700 + + update ChangeLog from git + commit 701c26ed85c28ac59e338975f2a6ba6bd25f6493 Author: Keith Packard Date: Thu Dec 19 00:16:16 2013 -0800 -- cgit v1.2.3