diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-12-06 11:27:20 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-12-06 11:27:20 +1300 |
commit | a642b73c6cc727f4baa3c5ca7a5cc9b0679fead2 (patch) | |
tree | 8da228874f65c14227dfb66438826aa0b15584ef /src/org/traccar | |
parent | f06ef203a480f0184e97daa64432e4e777e1b95f (diff) | |
download | traccar-server-a642b73c6cc727f4baa3c5ca7a5cc9b0679fead2.tar.gz traccar-server-a642b73c6cc727f4baa3c5ca7a5cc9b0679fead2.tar.bz2 traccar-server-a642b73c6cc727f4baa3c5ca7a5cc9b0679fead2.zip |
Decode Suntech mode as status
Diffstat (limited to 'src/org/traccar')
-rw-r--r-- | src/org/traccar/protocol/SuntechProtocolDecoder.java | 5 |
1 files changed, 2 insertions, 3 deletions
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": |