X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosdroid%2Fsrc%2Forg%2Faltusmetrum%2FAltosDroid%2FTelemetryReader.java;h=716ec5894c9df42c5e0a975591ba8464c42e91bd;hp=bfa5db5c01815a039357b1f4f007b84f9262cff3;hb=c6f85cb149dff8732104521cb62b355e8a0d7148;hpb=03563c765d8b0ab3689c91b2b533c68e11650577 diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryReader.java b/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryReader.java index bfa5db5c..716ec589 100644 --- a/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryReader.java +++ b/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryReader.java @@ -1,3 +1,22 @@ +/* + * Copyright © 2011 Keith Packard + * Copyright © 2012 Mike Beattie + * + * 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. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ + + package org.altusmetrum.AltosDroid; import java.text.*; @@ -6,7 +25,7 @@ import java.util.concurrent.*; import android.util.Log; import android.os.Handler; -import org.altusmetrum.AltosLib.*; +import org.altusmetrum.altoslib_1.*; public class TelemetryReader extends Thread { @@ -49,12 +68,12 @@ public class TelemetryReader extends Thread { if (record == null) break; state = new AltosState(record, state); - handler.obtainMessage(TelemetryService.MSG_TELEMETRY, state).sendToTarget(); } catch (ParseException pp) { Log.e(TAG, String.format("Parse error: %d \"%s\"", pp.getErrorOffset(), pp.getMessage())); } catch (AltosCRCException ce) { ++crc_errors; + handler.obtainMessage(TelemetryService.MSG_CRC_ERROR, new Integer(crc_errors)).sendToTarget(); } } } catch (InterruptedException ee) {