mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
check Telemetry oneOf to update Nodeinfo
This commit is contained in:
parent
f56f5a1a5f
commit
e18b1a9a4a
1 changed files with 4 additions and 6 deletions
|
|
@ -764,13 +764,11 @@ class MeshService : Service(), Logging {
|
|||
defaultTime: Long = System.currentTimeMillis()
|
||||
) {
|
||||
updateNodeInfo(fromNum) {
|
||||
it.deviceMetrics = DeviceMetrics(
|
||||
t.deviceMetrics,
|
||||
if (t.time != 0) t.time else (defaultTime / 1000L).toInt()
|
||||
if (t.hasDeviceMetrics()) it.deviceMetrics = DeviceMetrics(
|
||||
t.deviceMetrics, if (t.time != 0) t.time else (defaultTime / 1000L).toInt()
|
||||
)
|
||||
it.environmentMetrics = EnvironmentMetrics(
|
||||
t.environmentMetrics,
|
||||
if (t.time != 0) t.time else (defaultTime / 1000L).toInt()
|
||||
if (t.hasEnvironmentMetrics()) it.environmentMetrics = EnvironmentMetrics(
|
||||
t.environmentMetrics, if (t.time != 0) t.time else (defaultTime / 1000L).toInt()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue