Fix FC on empty symbol and when moving

remotes/nogy/update_90
Georg Lukas 2010-01-31 22:10:36 +01:00
rodzic 9a27715624
commit 7b52bddafc
2 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -59,7 +59,7 @@ object AprsPacket {
// only report speeds above 2m/s (7.2km/h)
if (location.hasSpeed && location.hasBearing)
// && location.getSpeed > 2)
"%03d/%03d".format(location.getBearing,
"%03d/%03d".format(location.getBearing.asInstanceOf[Int],
mps2kt(location.getSpeed))
else
""

Wyświetl plik

@ -84,7 +84,9 @@ class AprsService extends Service with LocationListener {
val callsign = prefs.getString("callsign", null)
val callssid = AprsPacket.formatCallSsid(callsign, prefs.getString("ssid", ""))
val symbol = prefs.getString("symbol", getString(R.string.default_symbol))
var symbol = prefs.getString("symbol", "")
if (symbol.length != 2)
symbol = getString(R.string.default_symbol)
val status = prefs.getString("status", getString(R.string.default_status))
val login = AprsPacket.formatLogin(prefs.getString("callsign", null),