summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2017-05-28 15:28:29 -0700
committerKeith Packard <keithp@keithp.com>2017-05-28 15:28:29 -0700
commit9748d267b80e42ca52f9221900bb58602759a8d2 (patch)
treed8d50e8bf2b1d74f5313e5b413045beaccc6884a
parent9a92ccbd3e5ce640875b614ff14d549cccc2036c (diff)
altosuilib: Set graph title to include product/serial/flight info
Better than "Flight" Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--altosuilib/AltosGraphNew.java3
-rw-r--r--altosuilib/AltosUIAxis.java1
-rw-r--r--altosuilib/AltosUIGraphNew.java2
3 files changed, 4 insertions, 2 deletions
diff --git a/altosuilib/AltosGraphNew.java b/altosuilib/AltosGraphNew.java
index c0afd652..08a33730 100644
--- a/altosuilib/AltosGraphNew.java
+++ b/altosuilib/AltosGraphNew.java
@@ -90,6 +90,9 @@ public class AltosGraphNew extends AltosUIGraphNew {
AltosUIAxis gyro_axis, orient_axis, mag_axis;
AltosUIAxis course_axis, dop_axis;
+ if (stats.serial != AltosLib.MISSING && stats.product != null && stats.flight != AltosLib.MISSING)
+ setName(String.format("%s %d flight %d\n", stats.product, stats.serial, stats.flight));
+
height_axis = newAxis("Height", AltosConvert.height, height_color);
pressure_axis = newAxis("Pressure", AltosConvert.pressure, pressure_color, 0);
speed_axis = newAxis("Speed", AltosConvert.speed, speed_color);
diff --git a/altosuilib/AltosUIAxis.java b/altosuilib/AltosUIAxis.java
index 40ee5161..e8c31518 100644
--- a/altosuilib/AltosUIAxis.java
+++ b/altosuilib/AltosUIAxis.java
@@ -60,7 +60,6 @@ public class AltosUIAxis extends NumberAxis {
}
public void set_enable(boolean enable) {
- System.out.printf("axis %s set enable visible %d ref %d\n", label, visible, ref);
if (enable) {
visible++;
if (visible > ref)
diff --git a/altosuilib/AltosUIGraphNew.java b/altosuilib/AltosUIGraphNew.java
index 709541ff..b96399ab 100644
--- a/altosuilib/AltosUIGraphNew.java
+++ b/altosuilib/AltosUIGraphNew.java
@@ -126,7 +126,7 @@ public class AltosUIGraphNew implements AltosUnitsListener {
plot.setDomainPannable(true);
plot.setRangePannable(true);
- chart = new JFreeChart("Flight", JFreeChart.DEFAULT_TITLE_FONT,
+ chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
plot, true);
ChartUtilities.applyCurrentTheme(chart);