This commit is contained in:
Kevin Hester
2021-02-11 16:54:17 +08:00
parent 23ab6c7048
commit 11bc8ef5f0
2 changed files with 4 additions and 2 deletions

View File

@@ -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(

View File

@@ -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)
}