kenwood: only send relevant NMEA

pull/57/head
Georg Lukas 2013-04-04 21:24:26 +02:00
rodzic 144bc7000e
commit c88ae0f44e
1 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -21,9 +21,11 @@ class KenwoodTnc(service : AprsService, prefs : PrefsWrapper) extends BluetoothT
}
def onNmeaReceived(timestamp : Long, nmea : String) {
Log.d(TAG, "NMEA <<< " + nmea)
if (output != null)
if (output != null && (nmea.startsWith("$GPGGA") || nmea.startsWith("$GPRMC"))) {
Log.d(TAG, "NMEA >>> " + nmea)
output.write(nmea)
} else
Log.d(TAG, "NMEA --- " + nmea)
}
override def stop() {