aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-02-21 09:52:22 -0800
committerAnton Tananaev <anton@traccar.org>2023-02-21 09:52:22 -0800
commit754ff3a85baf2faaa1b962f16f52ebd0e12e6436 (patch)
tree204812625a3bb2c3a1c1af0ceb73176d55a23662 /src
parentcd1d80896b16c84ae0a8a4631a9dba6955e9e344 (diff)
downloadtrackermap-server-754ff3a85baf2faaa1b962f16f52ebd0e12e6436.tar.gz
trackermap-server-754ff3a85baf2faaa1b962f16f52ebd0e12e6436.tar.bz2
trackermap-server-754ff3a85baf2faaa1b962f16f52ebd0e12e6436.zip
Add lock attribute
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/traccar/model/Position.java1
-rw-r--r--src/main/java/org/traccar/protocol/TeraTrackProtocolDecoder.java2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/model/Position.java b/src/main/java/org/traccar/model/Position.java
index 1286db5f2..41cfeaf2e 100644
--- a/src/main/java/org/traccar/model/Position.java
+++ b/src/main/java/org/traccar/model/Position.java
@@ -83,6 +83,7 @@ public class Position extends Message {
public static final String KEY_OPERATOR = "operator";
public static final String KEY_COMMAND = "command";
public static final String KEY_BLOCKED = "blocked";
+ public static final String KEY_LOCK = "lock";
public static final String KEY_DOOR = "door";
public static final String KEY_AXLE_WEIGHT = "axleWeight";
public static final String KEY_G_SENSOR = "gSensor";
diff --git a/src/main/java/org/traccar/protocol/TeraTrackProtocolDecoder.java b/src/main/java/org/traccar/protocol/TeraTrackProtocolDecoder.java
index 313210f63..423ae3ffe 100644
--- a/src/main/java/org/traccar/protocol/TeraTrackProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/TeraTrackProtocolDecoder.java
@@ -63,7 +63,7 @@ public class TeraTrackProtocolDecoder extends BaseProtocolDecoder {
position.setSpeed(UnitsConverter.knotsFromKph(Integer.parseInt(json.getString("Speed"))));
position.set(Position.KEY_ODOMETER, Integer.parseInt(json.getString("Mileage")));
- position.set(Position.KEY_BLOCKED, json.getString("LockOpen").equals("0"));
+ position.set(Position.KEY_LOCK, json.getString("LockOpen").equals("0"));
position.set(Position.KEY_DRIVER_UNIQUE_ID, json.getString("CardNo"));
position.set(Position.KEY_ALARM, json.getString("LowPower").equals("1") ? Position.ALARM_LOW_POWER : null);
position.set(Position.KEY_BATTERY_LEVEL, Integer.parseInt(json.getString("Power")));