fix default ssid mismatch

precision_debug
Georg Lukas 2011-04-14 15:07:08 +02:00
rodzic 68cbe0d396
commit 2f9f8f74b2
2 zmienionych plików z 4 dodań i 3 usunięć

Wyświetl plik

@ -109,7 +109,7 @@ class AprsService extends Service with LocationListener {
// continuous GPS tracking for single shot mode
requestLocations(singleShot)
val callssid = AprsPacket.formatCallSsid(prefs.getCallsign(), prefs.getString("ssid", ""))
val callssid = prefs.getCallSsid()
val message = "%s: %d min, %d km".format(callssid, upd_int, upd_dist)
ServiceNotifier.instance.start(this, message)
}

Wyświetl plik

@ -22,7 +22,8 @@ class PrefsWrapper(val context : Context) {
case "" => "-1"
case s => s
}
def getCallSsid() = AprsPacket.formatCallSsid(getCallsign(), getString("ssid", ""))
def getSsid() = getString("ssid", "10")
def getCallSsid() = AprsPacket.formatCallSsid(getCallsign(), getSsid())
def toggleBoolean(name : String, default : Boolean) = {
val new_val = !prefs.getBoolean(name, default)
@ -38,6 +39,6 @@ class PrefsWrapper(val context : Context) {
// this is actually a hack!
def getVersion() = context.getString(R.string.build_version).split(" ").take(2).mkString(" ")
def getLoginString() = AprsPacket.formatLogin(getCallsign(), getString("ssid", null),
def getLoginString() = AprsPacket.formatLogin(getCallsign(), getSsid(),
getPasscode(), getVersion())
}