From 33d01cda7bb678bb604404f18c8f4e66a40eaa55 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 16 Oct 2023 07:28:26 -0700 Subject: Negative signal strength value --- src/main/java/org/traccar/model/CellTower.java | 2 +- src/main/java/org/traccar/model/WifiAccessPoint.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/org') diff --git a/src/main/java/org/traccar/model/CellTower.java b/src/main/java/org/traccar/model/CellTower.java index 355594c64..4277cc4c4 100644 --- a/src/main/java/org/traccar/model/CellTower.java +++ b/src/main/java/org/traccar/model/CellTower.java @@ -104,7 +104,7 @@ public class CellTower { } public void setSignalStrength(Integer signalStrength) { - this.signalStrength = signalStrength; + this.signalStrength = signalStrength > 0 ? -signalStrength : signalStrength; } public void setOperator(long operator) { diff --git a/src/main/java/org/traccar/model/WifiAccessPoint.java b/src/main/java/org/traccar/model/WifiAccessPoint.java index e28c1b935..64858f4c7 100644 --- a/src/main/java/org/traccar/model/WifiAccessPoint.java +++ b/src/main/java/org/traccar/model/WifiAccessPoint.java @@ -52,7 +52,7 @@ public class WifiAccessPoint { } public void setSignalStrength(Integer signalStrength) { - this.signalStrength = signalStrength; + this.signalStrength = signalStrength > 0 ? -signalStrength : signalStrength; } private Integer channel; -- cgit v1.2.3