From b9848c458c857e61c6ed6ad97866052ee0c72a9d Mon Sep 17 00:00:00 2001 From: geeksville Date: Wed, 19 Feb 2020 15:28:15 -0800 Subject: [PATCH] send gps info more often while testing --- TODO.md | 1 + app/src/main/java/com/geeksville/mesh/NodeInfo.kt | 3 ++- app/src/main/java/com/geeksville/mesh/service/MeshService.kt | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/TODO.md b/TODO.md index 13d599b1f..330f46763 100644 --- a/TODO.md +++ b/TODO.md @@ -46,6 +46,7 @@ the channel is encrypted, you can share the the channel key with others by qr co # Signal alpha release Do this "Signal app compatible" release relatively soon after the alpha release of the android app. +* call onNodeDBChanged after we haven't heard a packet from the mesh in a while - because that's how we decide we have less than 2 nodes in the mesh and should stop listening to the local GPS * add large packet reassembly? * optionally turn off crypto in signal - preferably though see if there is a nice way to be a peer of signal/sms and now mesh. * change signal package ID - if distributing modified binary diff --git a/app/src/main/java/com/geeksville/mesh/NodeInfo.kt b/app/src/main/java/com/geeksville/mesh/NodeInfo.kt index f6705d83d..9b8cb7e7f 100644 --- a/app/src/main/java/com/geeksville/mesh/NodeInfo.kt +++ b/app/src/main/java/com/geeksville/mesh/NodeInfo.kt @@ -106,7 +106,8 @@ data class NodeInfo( get() { val now = System.currentTimeMillis() / 1000 // FIXME - use correct timeout from the device settings - val timeout = 5 * 60 + val timeout = + 15 * 60 // Don't set this timeout too tight, or otherwise we will stop sending GPS helper positions to our device return (now - lastSeen <= timeout) || lastSeen == 0 } diff --git a/app/src/main/java/com/geeksville/mesh/service/MeshService.kt b/app/src/main/java/com/geeksville/mesh/service/MeshService.kt index a7bf4658c..9f41104bd 100644 --- a/app/src/main/java/com/geeksville/mesh/service/MeshService.kt +++ b/app/src/main/java/com/geeksville/mesh/service/MeshService.kt @@ -141,7 +141,7 @@ class MeshService : Service(), Logging { if (fusedLocationClient == null) { val request = LocationRequest.create().apply { interval = - 20 * 1000 // FIXME, do more like once every 5 mins while we are connected to our radio _and_ someone else is in the mesh + 10 * 1000 // FIXME, do more like once every 5 mins while we are connected to our radio _and_ someone else is in the mesh priority = LocationRequest.PRIORITY_HIGH_ACCURACY }