kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
track region/model/firmware version of running devices
rodzic
a3764bbd93
commit
64e4e05a0b
|
@ -3,5 +3,6 @@
|
|||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/app/src/main/proto" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/geeksville-androidlib" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
50
TODO.md
50
TODO.md
|
@ -2,6 +2,7 @@
|
|||
Work items for soon alpha builds
|
||||
|
||||
* run services in sim mode on emulator
|
||||
* track radio brands/regions as a user property (include no-radio as an option)
|
||||
* show offline nodes as greyed out
|
||||
* show time since last contact on the node info card
|
||||
* show pointer arrow on the outside of the user icons, always pointing towoards them
|
||||
|
@ -160,3 +161,52 @@ Don't leave device discoverable. Don't let unpaired users do things with device
|
|||
* generate real channel QR codes
|
||||
* Have play store entry ask users to report if their android version is too old to allow install
|
||||
* use git submodule for androidlib
|
||||
|
||||
|
||||
Rare bug reproduced:
|
||||
|
||||
D/com.geeksville.mesh.service.SafeBluetooth: work readC 8ba2bcc2-ee02-4a55-a531-c525c5e454d5 is completed, resuming status=0, res=android.bluetooth.BluetoothGattCharacteristic@f6eb84e
|
||||
D/com.geeksville.mesh.service.RadioInterfaceService: Received 9 bytes from radio
|
||||
D/com.geeksville.mesh.service.SafeBluetooth: Enqueuing work: readC 8ba2bcc2-ee02-4a55-a531-c525c5e454d5
|
||||
D/com.geeksville.mesh.service.SafeBluetooth$BluetoothContinuation: Starting work: readC 8ba2bcc2-ee02-4a55-a531-c525c5e454d5
|
||||
D/com.geeksville.mesh.service.MeshService: Received broadcast com.geeksville.mesh.RECEIVE_FROMRADIO
|
||||
E/com.geeksville.util.Exceptions: exceptionReporter Uncaught Exception
|
||||
com.google.protobuf.InvalidProtocolBufferException: Protocol message contained an invalid tag (zero).
|
||||
at com.google.protobuf.GeneratedMessageLite.parsePartialFrom(GeneratedMessageLite.java:1566)
|
||||
at com.google.protobuf.GeneratedMessageLite.parseFrom(GeneratedMessageLite.java:1655)
|
||||
at com.geeksville.mesh.MeshProtos$FromRadio.parseFrom(MeshProtos.java:9097)
|
||||
at com.geeksville.mesh.service.MeshService$radioInterfaceReceiver$1$onReceive$1.invoke(MeshService.kt:742)
|
||||
at com.geeksville.mesh.service.MeshService$radioInterfaceReceiver$1$onReceive$1.invoke(Unknown Source:0)
|
||||
at com.geeksville.util.ExceptionsKt.exceptionReporter(Exceptions.kt:31)
|
||||
at com.geeksville.mesh.service.MeshService$radioInterfaceReceiver$1.onReceive(MeshService.kt:722)
|
||||
at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0$LoadedApk$ReceiverDispatcher$Args(LoadedApk.java:1550)
|
||||
at android.app.-$$Lambda$LoadedApk$ReceiverDispatcher$Args$_BumDX2UKsnxLVrE6UJsJZkotuA.run(Unknown Source:2)
|
||||
at android.os.Handler.handleCallback(Handler.java:883)
|
||||
at android.os.Handler.dispatchMessage(Handler.java:100)
|
||||
at android.os.Looper.loop(Looper.java:214)
|
||||
at android.app.ActivityThread.main(ActivityThread.java:7356)
|
||||
at java.lang.reflect.Method.invoke(Native Method)
|
||||
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
|
||||
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
|
||||
D/com.geeksville.mesh.service.SafeBluetooth: work readC 8ba2bcc2-ee02-4a55-a531-c525c5e454d5 is completed, resuming status=0, res=android.bluetooth.BluetoothGattCharacteristic@f6eb84e
|
||||
D/com.geeksville.mesh.service.RadioInterfaceService: Received 9 bytes from radio
|
||||
D/com.geeksville.mesh.service.SafeBluetooth: Enqueuing work: readC 8ba2bcc2-ee02-4a55-a531-c525c5e454d5
|
||||
D/com.geeksville.mesh.service.SafeBluetooth$BluetoothContinuation: Starting work: readC 8ba2bcc2-ee02-4a55-a531-c525c5e454d5
|
||||
D/com.geeksville.mesh.service.MeshService: Received broadcast com.geeksville.mesh.RECEIVE_FROMRADIO
|
||||
|
||||
|
||||
Transition powerFSM transition=Press, from=DARK to=ON
|
||||
pressing
|
||||
sending owner !246f28b5367c/Bob use/Bu
|
||||
Update DB node 0x7c for variant 4, rx_time=0
|
||||
old user !246f28b5367c/Bob use/Bu
|
||||
updating changed=0 user !246f28b5367c/Bob use/Bu
|
||||
immedate send on mesh (txGood=32,rxGood=0,rxBad=0)
|
||||
Trigger powerFSM 1
|
||||
Transition powerFSM transition=Press, from=ON to=ON
|
||||
Setting fast framerate
|
||||
Setting idle framerate
|
||||
Transition powerFSM transition=Screen-on timeout, from=ON to=DARK
|
||||
|
||||
NOTE: no debug messages on device, though we see in radio interface service we are repeatedly reading FromRadio and getting
|
||||
the same seven bytes. It sure seems like the old service is still sort of alive...
|
|
@ -386,7 +386,13 @@ class MeshService : Service(), Logging {
|
|||
val NODENUM_BROADCAST = 255
|
||||
|
||||
// MyNodeInfo sent via special protobuf from radio
|
||||
data class MyNodeInfo(val myNodeNum: Int, val hasGPS: Boolean)
|
||||
data class MyNodeInfo(
|
||||
val myNodeNum: Int,
|
||||
val hasGPS: Boolean,
|
||||
val region: String,
|
||||
val model: String,
|
||||
val firmwareVersion: String
|
||||
)
|
||||
|
||||
var myNodeInfo: MyNodeInfo? = null
|
||||
|
||||
|
@ -598,8 +604,19 @@ class MeshService : Service(), Logging {
|
|||
connectedRadio.readMyNode()
|
||||
)
|
||||
|
||||
val mynodeinfo = MyNodeInfo(myInfo.myNodeNum, myInfo.hasGps)
|
||||
myNodeInfo = mynodeinfo
|
||||
val mi = with(myInfo) {
|
||||
MyNodeInfo(myNodeNum, hasGps, region, hwModel, firmwareVersion)
|
||||
}
|
||||
|
||||
myNodeInfo = mi
|
||||
|
||||
/// Track types of devices and firmware versions in use
|
||||
GeeksvilleApplication.analytics.setUserInfo(
|
||||
DataPair("region", mi.region),
|
||||
DataPair("firmware", mi.firmwareVersion),
|
||||
DataPair("has_gps", mi.hasGPS),
|
||||
DataPair("hw_model", mi.model)
|
||||
)
|
||||
|
||||
// Ask for the current node DB
|
||||
connectedRadio.restartNodeInfo()
|
||||
|
@ -625,7 +642,7 @@ class MeshService : Service(), Logging {
|
|||
// For the local node, it might not be able to update its times because it doesn't have a valid GPS reading yet
|
||||
// so if the info is for _our_ node we always assume time is current
|
||||
val time =
|
||||
if (it.num == mynodeinfo.myNodeNum) currentSecond() else info.position.time
|
||||
if (it.num == mi.myNodeNum) currentSecond() else info.position.time
|
||||
|
||||
it.position = Position(
|
||||
info.position.latitude,
|
||||
|
@ -643,6 +660,7 @@ class MeshService : Service(), Logging {
|
|||
onNodeDBChanged()
|
||||
}
|
||||
|
||||
|
||||
/// If we just changed our nodedb, we might want to do somethings
|
||||
private fun onNodeDBChanged() {
|
||||
updateNotification()
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit c4ee1448ea99058fe45c6738e547197e4a4c1887
|
||||
Subproject commit 3eb7dab3328d10b41a19ba59a2734c0f6293f477
|
Ładowanie…
Reference in New Issue