kopia lustrzana https://github.com/ge0rg/aprsdroid
DB: new log type 'TX' for outgoing non-APRS data like TNC init
rodzic
46c5c4f37d
commit
549fb91d5d
|
@ -24,8 +24,8 @@ class PostListAdapter(context : Context)
|
|||
|
||||
class PostViewBinder extends ViewBinder {
|
||||
|
||||
// post, info, error, incoming
|
||||
val COLORS = Array(0xff30b030, 0xffc0c080, 0xffffb0b0, 0xff8080b0)
|
||||
// post, info, error, incoming, tx
|
||||
val COLORS = Array(0xff30b030, 0xffc0c080, 0xffffb0b0, 0xff8080b0, 0xff30b030)
|
||||
|
||||
override def setViewValue (view : View, cursor : Cursor, columnIndex : Int) : Boolean = {
|
||||
import StorageDatabase.Post._
|
||||
|
@ -36,7 +36,7 @@ class PostViewBinder extends ViewBinder {
|
|||
val v = view.asInstanceOf[TextView]
|
||||
v.setText(m)
|
||||
v.setTextColor(COLORS(t))
|
||||
if (t == TYPE_POST || t == TYPE_INCMG)
|
||||
if (t == TYPE_POST || t == TYPE_INCMG || t == TYPE_TX)
|
||||
v.setTypeface(Typeface.MONOSPACE)
|
||||
else
|
||||
v.setTypeface(Typeface.DEFAULT)
|
||||
|
|
|
@ -34,6 +34,8 @@ object StorageDatabase {
|
|||
val TYPE_INFO = 1
|
||||
val TYPE_ERROR = 2
|
||||
val TYPE_INCMG = 3
|
||||
val TYPE_TX = 4
|
||||
|
||||
val COLUMN_TYPE = 3
|
||||
val COLUMN_MESSAGE = 5
|
||||
|
||||
|
|
|
@ -163,8 +163,8 @@ class UsbTnc(service : AprsService, prefs : PrefsWrapper) extends AprsBackend(pr
|
|||
val initstring = java.net.URLDecoder.decode(prefs.getString("usb.init", ""), "UTF-8")
|
||||
val initdelay = prefs.getStringInt("usb.delay", 300)
|
||||
if (initstring != null && initstring != "") {
|
||||
log("Sending init: " + initstring)
|
||||
for (line <- initstring.split("\n")) {
|
||||
log(initstring)
|
||||
os.write(line.getBytes())
|
||||
os.write('\r')
|
||||
os.write('\n')
|
||||
|
|
Ładowanie…
Reference in New Issue