altos: Add needed math sources to TeleGPS v0.1 build
[fw/altos] / altoslib / AltosEepromMega.java
index 1ac72b1c4f5d65e491de6fc548d2d8238ff330ae..b8a1b9e86dc61ad09403b33c9de4ec54274a3150 100644 (file)
@@ -24,6 +24,8 @@ import java.text.*;
 public class AltosEepromMega extends AltosEeprom {
        public static final int record_length = 32;
 
+       public static final int max_sat = 12;
+
        public int record_length() { return record_length; }
 
        /* AO_LOG_FLIGHT elements */
@@ -176,6 +178,8 @@ public class AltosEepromMega extends AltosEeprom {
                        gps = state.make_temp_gps(true);
 
                        int n = nsat();
+                       if (n > max_sat)
+                               n = max_sat;
                        for (int i = 0; i < n; i++)
                                gps.add_sat(svid(i), c_n(i));
                        break;