From a642b73c6cc727f4baa3c5ca7a5cc9b0679fead2 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 6 Dec 2018 11:27:20 +1300 Subject: Decode Suntech mode as status --- src/org/traccar/protocol/SuntechProtocolDecoder.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/org/traccar/protocol/SuntechProtocolDecoder.java b/src/org/traccar/protocol/SuntechProtocolDecoder.java index 9ef0474b2..d94bdb5c2 100644 --- a/src/org/traccar/protocol/SuntechProtocolDecoder.java +++ b/src/org/traccar/protocol/SuntechProtocolDecoder.java @@ -220,8 +220,7 @@ public class SuntechProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_BATTERY, Double.parseDouble(values[index++])); position.set(Position.KEY_ARCHIVE, values[index++].equals("0") ? true : null); position.set(Position.KEY_INDEX, Integer.parseInt(values[index++])); - - index += 1; // mode + position.set(Position.KEY_STATUS, Integer.parseInt(values[index++])); DateFormat dateFormat = new SimpleDateFormat("yyyyMMddHH:mm:ss"); dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); @@ -301,7 +300,7 @@ public class SuntechProtocolDecoder extends BaseProtocolDecoder { switch (type) { case "STT": - index += 1; // mode + position.set(Position.KEY_STATUS, Integer.parseInt(values[index++])); position.set(Position.KEY_INDEX, Integer.parseInt(values[index++])); break; case "EMG": -- cgit v1.2.3