diff options
author | Anton Tananaev <anton@traccar.org> | 2022-03-09 18:39:54 -0800 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-03-09 18:39:54 -0800 |
commit | 35c2316a12113b29f00fa5ad735e59a88494c8bb (patch) | |
tree | 1c5d1b9aaab9617d26c0393c4017d058c5c73572 /src/main | |
parent | 0e85fafea121b912e20e022e423b6b472a2e93be (diff) | |
download | trackermap-server-35c2316a12113b29f00fa5ad735e59a88494c8bb.tar.gz trackermap-server-35c2316a12113b29f00fa5ad735e59a88494c8bb.tar.bz2 trackermap-server-35c2316a12113b29f00fa5ad735e59a88494c8bb.zip |
Decode additional TeraTrack info
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/traccar/protocol/TeraTrackProtocolDecoder.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/TeraTrackProtocolDecoder.java b/src/main/java/org/traccar/protocol/TeraTrackProtocolDecoder.java index 8f4438fbb..634c18bcb 100644 --- a/src/main/java/org/traccar/protocol/TeraTrackProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/TeraTrackProtocolDecoder.java @@ -62,6 +62,11 @@ 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_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"))); + position.set(Position.KEY_RSSI, Integer.parseInt(json.getString("GSM"))); return position; } |