altoslib: Hook up idle monitoring data again
[fw/altos] / altoslib / AltosMs5607.java
index bb6ce4c2d2b71b01da3bcbd2a8689a824cb0a178..399de83417b91b9aad5ae0db201a036cffeb28a8 100644 (file)
@@ -133,6 +133,19 @@ public class AltosMs5607 {
                crc = old.crc;
        }
 
+       static public void provide_data(AltosDataListener listener, AltosLink link, AltosCalData cal_data) throws InterruptedException {
+               try {
+                       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());
        }