altos/easymega-v2.0: Add adxl375, replace mpu6000 with 9250 [v2]
[fw/altos] / telegps / TeleGPSState.java
index e01ef47e46e64d12bb32e14051adba8b91908d6e..0c15cbb1d3724ae3c3d6ab87ebf257f21672acc7 100644 (file)
@@ -3,7 +3,8 @@
  *
  * 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.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -21,8 +22,8 @@ import java.util.*;
 import java.awt.*;
 import java.awt.event.*;
 import javax.swing.*;
-import org.altusmetrum.altoslib_11.*;
-import org.altusmetrum.altosuilib_11.*;
+import org.altusmetrum.altoslib_13.*;
+import org.altusmetrum.altosuilib_13.*;
 
 public class TeleGPSState extends AltosUIFlightTab {
 
@@ -123,10 +124,11 @@ public class TeleGPSState extends AltosUIFlightTab {
 
        class FirmwareVersion extends AltosUIIndicator {
                public void show(AltosState state, AltosListenerState listener_state) {
-                       if (state.firmware_version == null)
+                       AltosCalData cal_data = state.cal_data();
+                       if (cal_data.firmware_version == null)
                                show("Missing");
                        else
-                               show(state.firmware_version);
+                               show(cal_data.firmware_version);
                }
 
                public FirmwareVersion(Container container, int y) {
@@ -136,9 +138,8 @@ public class TeleGPSState extends AltosUIFlightTab {
 
        class FlightLogMax extends AltosUIIndicator {
                public void show(AltosState state, AltosListenerState listener_state) {
-                       int storage = state.flight_log_max;
-                       if (storage == AltosLib.MISSING)
-                               storage = state.log_space >> 10;
+                       AltosCalData cal_data = state.cal_data();
+                       int storage = cal_data.flight_log_max;
                        if (storage == AltosLib.MISSING)
                                show("Missing");
                        else