mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-02-05 13:22:59 -05:00
add logging in support of https://github.com/meshtastic/Meshtastic-device/issues/681
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user