diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-01-09 17:22:52 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-01-09 17:22:52 -0800 |
commit | 92f02e0accbffad409761bfe962c94cf4fca2288 (patch) | |
tree | c79fde85947d513f087c7e857e2545660d927be1 /src/main/java/org | |
parent | 42a0fef17757082442e3dea4d1fc0f57750c0f90 (diff) | |
download | traccar-server-92f02e0accbffad409761bfe962c94cf4fca2288.tar.gz traccar-server-92f02e0accbffad409761bfe962c94cf4fca2288.tar.bz2 traccar-server-92f02e0accbffad409761bfe962c94cf4fca2288.zip |
Support Suntech 410 devices
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java | 6 |
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++])); |