From 35c2316a12113b29f00fa5ad735e59a88494c8bb Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 9 Mar 2022 18:39:54 -0800 Subject: Decode additional TeraTrack info --- src/main/java/org/traccar/protocol/TeraTrackProtocolDecoder.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main/java/org/traccar/protocol') 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; } -- cgit v1.2.3