mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
update protos
This commit is contained in:
parent
5036cb906b
commit
f13c05862d
2 changed files with 7 additions and 10 deletions
|
|
@ -647,17 +647,14 @@ class MeshService : Service(), Logging {
|
|||
it.position = it.position?.copy(time = currentSecond())
|
||||
}
|
||||
|
||||
when (p.variantCase.number) {
|
||||
MeshProtos.SubPacket.POSITION_FIELD_NUMBER ->
|
||||
handleReceivedPosition(fromNum, p.position)
|
||||
if (p.hasPosition())
|
||||
handleReceivedPosition(fromNum, p.position)
|
||||
|
||||
MeshProtos.SubPacket.DATA_FIELD_NUMBER ->
|
||||
handleReceivedData(fromNum, p.data)
|
||||
if (p.hasData())
|
||||
handleReceivedData(fromNum, p.data)
|
||||
|
||||
MeshProtos.SubPacket.USER_FIELD_NUMBER ->
|
||||
handleReceivedUser(fromNum, p.user)
|
||||
else -> TODO("Unexpected SubPacket variant")
|
||||
}
|
||||
if (p.hasUser())
|
||||
handleReceivedUser(fromNum, p.user)
|
||||
}
|
||||
|
||||
private fun currentSecond() = (System.currentTimeMillis() / 1000).toInt()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue