kopia lustrzana https://github.com/ge0rg/aprsdroid
support digi path for BT-TNC
rodzic
0f42166d94
commit
e2b417a9f6
Plik binarny nie jest wyświetlany.
|
@ -24,7 +24,15 @@
|
|||
android:title="Channel"
|
||||
android:summary="Usually this is '1'"
|
||||
android:dialogTitle="enter your channel" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<EditTextPreference
|
||||
android:key="digi_path"
|
||||
android:hint="hop1,hop2,.."
|
||||
android:defaultValue="WIDE1-1"
|
||||
android:title="@string/p_aprs_path"
|
||||
android:summary="@string/p_aprs_path_summary"
|
||||
android:dialogTitle="@string/p_aprs_path_entry" />
|
||||
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
|
||||
|
|
|
@ -12,12 +12,13 @@ import _root_.java.util.UUID
|
|||
import _root_.net.ab0oo.aprs.parser._
|
||||
|
||||
class BluetoothTnc(service : AprsService, prefs : PrefsWrapper) extends AprsIsUploader(prefs) {
|
||||
val TAG = "BluetoothTnc"
|
||||
val TAG = "APRSdroid.Bluetooth"
|
||||
val SPP = UUID.fromString("00001101-0000-1000-8000-00805F9B34FB")
|
||||
|
||||
val bt_client = prefs.getBoolean("bt.client", true)
|
||||
val tncmac = prefs.getString("bt.mac", null)
|
||||
val tncchannel = prefs.getStringInt("bt.channel", -1)
|
||||
var digipath = prefs.getString("digi_path", "WIDE1-1")
|
||||
var conn : BtSocketThread = null
|
||||
|
||||
createConnection()
|
||||
|
@ -43,6 +44,7 @@ class BluetoothTnc(service : AprsService, prefs : PrefsWrapper) extends AprsIsUp
|
|||
}
|
||||
|
||||
def update(packet : APRSPacket) : String = {
|
||||
packet.setDigipeaters(Digipeater.parseList(digipath, true))
|
||||
Log.d(TAG, "BluetoothTnc.update: " + packet)
|
||||
conn.update(packet)
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue