* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-package org.altusmetrum.AltosLib;
+package org.altusmetrum.altoslib_1;
-import java.lang.*;
import java.text.*;
import java.io.*;
import java.util.concurrent.*;
AltosRecord previous;
double frequency;
int telemetry;
+ AltosState state = null;
LinkedBlockingQueue<AltosLine> telem;
- public AltosRecord read() throws InterruptedException, ParseException, AltosCRCException, IOException {
+ public AltosState read() throws InterruptedException, ParseException, AltosCRCException, IOException {
AltosLine l = telem.take();
if (l.line == null)
throw new IOException("IO error");
AltosRecord next = AltosTelemetry.parse(l.line, previous);
previous = next;
- return next;
+ state = new AltosState (next, state);
+ return state;
}
public void flush() {
return log.file();
}
+ public boolean has_monitor_battery() {
+ return link.has_monitor_battery();
+ }
+
+ public double monitor_battery() {
+ return link.monitor_battery();
+ }
+
public AltosTelemetryReader (AltosLink in_link)
throws IOException, InterruptedException, TimeoutException {
link = in_link;