diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-04-11 00:39:17 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-04-11 09:40:01 +1200 |
commit | aba44d6cb91ac0b54de743dbd469ee8ca118796f (patch) | |
tree | ab45d52235d717b37c2ed9dbfa0314583c070e39 /src | |
parent | 2f46d48846633fbf56289f478a9acbe544a17c9c (diff) | |
download | trackermap-server-aba44d6cb91ac0b54de743dbd469ee8ca118796f.tar.gz trackermap-server-aba44d6cb91ac0b54de743dbd469ee8ca118796f.tar.bz2 trackermap-server-aba44d6cb91ac0b54de743dbd469ee8ca118796f.zip |
Fix ST940 Alert decoding
Diffstat (limited to 'src')
-rw-r--r-- | src/org/traccar/protocol/SuntechProtocolDecoder.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/SuntechProtocolDecoder.java b/src/org/traccar/protocol/SuntechProtocolDecoder.java index e19335cb0..42e81f60c 100644 --- a/src/org/traccar/protocol/SuntechProtocolDecoder.java +++ b/src/org/traccar/protocol/SuntechProtocolDecoder.java @@ -67,7 +67,9 @@ public class SuntechProtocolDecoder extends BaseProtocolDecoder { } position.setDeviceId(deviceSession.getDeviceId()); - position.set(Position.KEY_VERSION_FW, values[index++]); + if (!type.equals("Alert") || protocolType == 0) { + position.set(Position.KEY_VERSION_FW, values[index++]); + } DateFormat dateFormat = new SimpleDateFormat("yyyyMMddHH:mm:ss"); dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); |