mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-03-31 04:04:46 -04:00
Merge pull request #517 from meshtastic/tele
fix #516: check Telemetry oneOf to update Nodeinfo
This commit is contained in:
@@ -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()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user