fix: ignore non-local localStats telemetry (#2206)

This commit is contained in:
Łukasz Kosson 2025-06-22 03:21:14 +02:00 committed by GitHub
parent 3e3e4919bd
commit 9b0dcfdeab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -983,7 +983,8 @@ class MeshService : Service(), Logging {
fromNum: Int,
t: TelemetryProtos.Telemetry,
) {
if (t.hasLocalStats()) {
val isRemote = (fromNum != myNodeNum)
if (!isRemote && t.hasLocalStats()) {
localStatsTelemetry = t
maybeUpdateServiceStatusNotification()
}
@ -991,7 +992,6 @@ class MeshService : Service(), Logging {
when {
t.hasDeviceMetrics() -> {
it.deviceTelemetry = t
val isRemote = (fromNum != myNodeNum)
if (fromNum == myNodeNum || (isRemote && it.isFavorite)) {
if (t.deviceMetrics.voltage > batteryPercentUnsupported &&
t.deviceMetrics.batteryLevel <= batteryPercentLowThreshold