diff options
author | Keith Packard <keithp@keithp.com> | 2017-06-11 22:49:46 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2017-06-11 22:54:22 -0700 |
commit | 5c4e473ef5d13da9c2f356702cb8767b55aa2137 (patch) | |
tree | f16c240a3ba02d150221b9e956e17ba391d477cc /altoslib/AltosMs5607.java | |
parent | 27131ec7abda875595c61be0b151b73eb28afab9 (diff) |
altoslib: Hook up idle monitoring data again
The API for idle monitoring changed, but these modules hadn't been
fixed.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altoslib/AltosMs5607.java')
-rw-r--r-- | altoslib/AltosMs5607.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/altoslib/AltosMs5607.java b/altoslib/AltosMs5607.java index bb6ce4c2..399de834 100644 --- a/altoslib/AltosMs5607.java +++ b/altoslib/AltosMs5607.java @@ -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()); } |