kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
add logging in support of https://github.com/meshtastic/Meshtastic-device/issues/681
rodzic
23ab6c7048
commit
11bc8ef5f0
|
@ -961,7 +961,7 @@ class MainActivity : AppCompatActivity(), Logging,
|
|||
fun postPing() {
|
||||
// Send ping message and arrange delayed recursion.
|
||||
debug("Sending ping")
|
||||
val str = "Ping " + DateFormat.getTimeInstance(DateFormat.SHORT)
|
||||
val str = "Ping " + DateFormat.getTimeInstance(DateFormat.MEDIUM)
|
||||
.format(Date(System.currentTimeMillis()))
|
||||
model.messagesState.sendMessage(str)
|
||||
handler.postDelayed(
|
||||
|
|
|
@ -6,6 +6,7 @@ import android.content.BroadcastReceiver
|
|||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.IntentFilter
|
||||
import android.os.Build
|
||||
import android.os.IBinder
|
||||
import android.os.RemoteException
|
||||
import android.widget.Toast
|
||||
|
@ -734,7 +735,8 @@ class MeshService : Service(), Logging {
|
|||
val packet = toMeshPacket(p)
|
||||
p.status = MessageStatus.ENROUTE
|
||||
p.time = System.currentTimeMillis() // update time to the actual time we started sending
|
||||
// debug("SENDING TO RADIO: $packet")
|
||||
if(BuildConfig.DEBUG)
|
||||
debug("Sending to radio: $packet") // IMPORTANT: we only log this info for debug builds, because it might leak PII
|
||||
sendToRadio(packet)
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue