X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosui%2FAltosGraphUI.java;h=e98c302bf9af1c4863dd50cbf52390fd359d0a28;hb=4f243a282f9aeb7433ccb2942850d380a091e603;hp=cd158651402d2634e4763015c1d36214b7899fb4;hpb=f01096c4b42f9a4720ed0414826c2a283a992545;p=fw%2Faltos diff --git a/altosui/AltosGraphUI.java b/altosui/AltosGraphUI.java index cd158651..e98c302b 100644 --- a/altosui/AltosGraphUI.java +++ b/altosui/AltosGraphUI.java @@ -96,10 +96,14 @@ public class AltosGraphUI extends JFrame public ArrayList graphs() { ArrayList graphs = new ArrayList(); - graphs.add( myAltosGraphTime("Summary") - .addElement(height) - .addElement(speed) - .addElement(acceleration) ); + graphs.add( myAltosGraphTime("Summary") + .addElement(height) + .addElement(speed) + .addElement(acceleration) ); + + graphs.add( myAltosGraphTime("Summary") + .addElement(height) + .addElement(speed)); graphs.add( myAltosGraphTime("Altitude") .addElement(height) ); @@ -107,15 +111,15 @@ public class AltosGraphUI extends JFrame graphs.add( myAltosGraphTime("Speed") .addElement(speed) ); - graphs.add( myAltosGraphTime("Acceleration") - .addElement(acceleration) ); + graphs.add( myAltosGraphTime("Acceleration") + .addElement(acceleration) ); graphs.add( myAltosGraphTime("Temperature") .addElement(temperature) ); - graphs.add( myAltosGraphTime("Continuity") - .addElement(drogue_voltage) - .addElement(main_voltage) ); + graphs.add( myAltosGraphTime("Continuity") + .addElement(drogue_voltage) + .addElement(main_voltage) ); return graphs; } @@ -154,20 +158,23 @@ public class AltosGraphUI extends JFrame public AltosGraphUI(AltosRecordIterable records) { super("Altos Graph"); - Iterable reader = new AltosDataPointReader (records); + AltosDataPointReader reader = new AltosDataPointReader (records); if (reader == null) return; - init(reader, 0); + if (reader.has_accel) + init(reader, 0); + else + init(reader, 1); } - public AltosGraphUI(Iterable data, int which) + public AltosGraphUI(AltosDataPointReader data, int which) { super("Altos Graph"); init(data, which); } - private void init(Iterable data, int which) { + private void init(AltosDataPointReader data, int which) { AltosGraph graph = createGraph(data, which); JFreeChart chart = graph.createChart();