aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-01-09 17:22:52 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2020-01-09 17:22:52 -0800
commit92f02e0accbffad409761bfe962c94cf4fca2288 (patch)
treec79fde85947d513f087c7e857e2545660d927be1 /src/main/java/org/traccar
parent42a0fef17757082442e3dea4d1fc0f57750c0f90 (diff)
downloadtrackermap-server-92f02e0accbffad409761bfe962c94cf4fca2288.tar.gz
trackermap-server-92f02e0accbffad409761bfe962c94cf4fca2288.tar.bz2
trackermap-server-92f02e0accbffad409761bfe962c94cf4fca2288.zip
Support Suntech 410 devices
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r--src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java b/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java
index f9fcfe79d..8d58803c9 100644
--- a/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013 - 2019 Anton Tananaev (anton@traccar.org)
+ * Copyright 2013 - 2020 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -242,6 +242,10 @@ public class SuntechProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.KEY_INDEX, Integer.parseInt(values[index++]));
position.set(Position.KEY_STATUS, Integer.parseInt(values[index++]));
+ if (values[index].length() == 3) {
+ index += 1; // collaborative network
+ }
+
DateFormat dateFormat = new SimpleDateFormat("yyyyMMddHH:mm:ss");
dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
position.setTime(dateFormat.parse(values[index++] + values[index++]));