Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
[fw/altos] / altoslib / AltosGPS.java
index 0b30ed456593f75587ca57b2ff6a7954810f82db..b6ca3576b4096e061d2d59090c0ae9a93e544db2 100644 (file)
@@ -16,7 +16,7 @@
  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
  */
 
-package org.altusmetrum.altoslib_11;
+package org.altusmetrum.altoslib_12;
 
 import java.text.*;
 import java.util.concurrent.*;
@@ -383,17 +383,13 @@ public class AltosGPS implements Cloneable {
                }
        }
 
-       static public void update_state(AltosState state, AltosLink link, AltosConfigData config_data) throws InterruptedException {
+       static public void provide_data(AltosDataListener listener, AltosLink link) throws InterruptedException {
                try {
-                       AltosGPS        gps = new AltosGPS(link, config_data);
-
-                       if (gps != null) {
-                               state.set_gps(gps, state.gps_sequence++);
-                               return;
-                       }
+                       AltosGPS gps = new AltosGPS(link, link.config_data());
+                       if (gps != null)
+                               listener.set_gps(gps);
                } catch (TimeoutException te) {
                }
-               state.set_gps(null, 0);
        }
 
        public AltosGPS (AltosLink link, AltosConfigData config_data) throws TimeoutException, InterruptedException {