altos: remove usbtrng support (chaoskey prototypes)
[fw/altos] / altoslib / AltosMs5607.java
index bb6ce4c2d2b71b01da3bcbd2a8689a824cb0a178..c4ddaea9528ce14caae4b06d2eb388b69afe3e6a 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_13;
 
 import java.util.concurrent.*;
 import java.io.*;
@@ -133,6 +133,20 @@ public class AltosMs5607 {
                crc = old.crc;
        }
 
+       static public void provide_data(AltosDataListener listener, AltosLink link) throws InterruptedException {
+               try {
+                       AltosCalData    cal_data = listener.cal_data();
+                       AltosMs5607     ms5607 = cal_data.ms5607;
+
+                       if (ms5607 != null) {
+                               AltosPresTemp   pt = ms5607.pres_temp(link);
+                               listener.set_temperature(pt.temp);
+                               listener.set_pressure(pt.pres);
+                       }
+               } catch (TimeoutException te) {
+               }
+       }
+
        public AltosMs5607(AltosConfigData config_data) {
                this(config_data.ms5607());
        }