X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosuilib%2FAltosGraph.java;h=73c53a2284c4a3155db56a29df5e391f8a0291e4;hp=5e5a35cf3a7a8c0e9973208694fb5dc1eacc8291;hb=5617919091d4c4a1e627470ddab0b45cf649f7a1;hpb=bf684a4c290573a3aa627fd8ddf6f6ebbe5fa057 diff --git a/altosuilib/AltosGraph.java b/altosuilib/AltosGraph.java index 5e5a35cf..73c53a22 100644 --- a/altosuilib/AltosGraph.java +++ b/altosuilib/AltosGraph.java @@ -238,31 +238,39 @@ public class AltosGraph extends AltosUIGraph { course_axis = newAxis("Course", orient_units, gps_course_color, 0); addMarker("State", AltosGraphDataPoint.data_state, state_color); - addSeries("Height", - AltosGraphDataPoint.data_height, - AltosConvert.height, - height_color, - true, - height_axis); - addSeries("Pressure", - AltosGraphDataPoint.data_pressure, - pressure_units, - pressure_color, - false, - pressure_axis); - addSeries("Speed", - AltosGraphDataPoint.data_speed, - AltosConvert.speed, - speed_color, - true, - speed_axis); - addSeries("Acceleration", - AltosGraphDataPoint.data_accel, - AltosConvert.accel, - accel_color, - true, - accel_axis); + + if (stats.has_flight_data) { + addSeries("Height", + AltosGraphDataPoint.data_height, + AltosConvert.height, + height_color, + true, + height_axis); + addSeries("Pressure", + AltosGraphDataPoint.data_pressure, + pressure_units, + pressure_color, + false, + pressure_axis); + addSeries("Speed", + AltosGraphDataPoint.data_speed, + AltosConvert.speed, + speed_color, + true, + speed_axis); + addSeries("Acceleration", + AltosGraphDataPoint.data_accel, + AltosConvert.accel, + accel_color, + true, + accel_axis); + } if (stats.has_gps) { + boolean enable_gps = false; + + if (!stats.has_flight_data) + enable_gps = true; + addSeries("Range", AltosGraphDataPoint.data_range, AltosConvert.distance, @@ -273,12 +281,18 @@ public class AltosGraph extends AltosUIGraph { AltosGraphDataPoint.data_distance, AltosConvert.distance, distance_color, - false, + enable_gps, distance_axis); addSeries("GPS Height", AltosGraphDataPoint.data_gps_height, AltosConvert.height, gps_height_color, + enable_gps, + height_axis); + addSeries("GPS Altitude", + AltosGraphDataPoint.data_gps_altitude, + AltosConvert.height, + gps_height_color, false, height_axis); addSeries("GPS Satellites in Solution", @@ -303,13 +317,13 @@ public class AltosGraph extends AltosUIGraph { AltosGraphDataPoint.data_gps_ground_speed, AltosConvert.speed, gps_ground_speed_color, - false, + enable_gps, speed_axis); addSeries("GPS Climb Rate", AltosGraphDataPoint.data_gps_climb_rate, AltosConvert.speed, gps_climb_rate_color, - false, + enable_gps, speed_axis); } if (stats.has_rssi)