X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altoslib%2FAltosSensorMetrum.java;h=cb1639113b3879baa85cfdc28fd1a26ec97450a2;hb=44c0cecabb3a815dbf7f52e6b2dad364cc72b60c;hp=4a51d492db4188f9d69861f600a34de49c1abb15;hpb=488a527267decece48e6682e0e0c7fc29cbed329;p=fw%2Faltos diff --git a/altoslib/AltosSensorMetrum.java b/altoslib/AltosSensorMetrum.java index 4a51d492..cb163911 100644 --- a/altoslib/AltosSensorMetrum.java +++ b/altoslib/AltosSensorMetrum.java @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of @@ -15,7 +16,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_2; +package org.altusmetrum.altoslib_11; import java.util.concurrent.TimeoutException; @@ -52,14 +53,13 @@ class AltosSensorMetrum { } } - static public void update_state(AltosState state, AltosLink link, AltosConfigData config_data) { + static public void update_state(AltosState state, AltosLink link, AltosConfigData config_data) throws InterruptedException { try { AltosSensorMetrum sensor_metrum = new AltosSensorMetrum(link); state.set_battery_voltage(AltosConvert.mega_battery_voltage(sensor_metrum.v_batt)); state.set_apogee_voltage(AltosConvert.mega_pyro_voltage(sensor_metrum.sense_a)); state.set_main_voltage(AltosConvert.mega_pyro_voltage(sensor_metrum.sense_m)); } catch (TimeoutException te) { - } catch (InterruptedException ie) { } } }