aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-10-21 18:24:27 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2017-10-21 18:24:27 +1300
commit9ace2318b9ea5a2d949800eedff8398808d3a6ce (patch)
tree96ef2897a2f4293110ed1f885b71eebd1560a58d /src/org
parent6b5c8006f27153886618e091466073dbb9983c0f (diff)
downloadtraccar-server-9ace2318b9ea5a2d949800eedff8398808d3a6ce.tar.gz
traccar-server-9ace2318b9ea5a2d949800eedff8398808d3a6ce.tar.bz2
traccar-server-9ace2318b9ea5a2d949800eedff8398808d3a6ce.zip
Support GVT900E device protocol
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/protocol/MegastekProtocolDecoder.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/MegastekProtocolDecoder.java b/src/org/traccar/protocol/MegastekProtocolDecoder.java
index 994e2d983..3ef52acd1 100644
--- a/src/org/traccar/protocol/MegastekProtocolDecoder.java
+++ b/src/org/traccar/protocol/MegastekProtocolDecoder.java
@@ -267,7 +267,7 @@ public class MegastekProtocolDecoder extends BaseProtocolDecoder {
.or().text(" ")
.groupEnd("?").text(",")
.number("(d+)?,") // rfid
- .number("d*,")
+ .expression("[^,]*,")
.number("(d+)?,") // battery
.expression("([^,]*);") // alert
.any()
@@ -280,13 +280,13 @@ public class MegastekProtocolDecoder extends BaseProtocolDecoder {
return null;
}
- Position position = new Position();
- position.setProtocol(getProtocolName());
-
DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, parser.next());
if (deviceSession == null) {
return null;
}
+
+ Position position = new Position();
+ position.setProtocol(getProtocolName());
position.setDeviceId(deviceSession.getDeviceId());
if (parser.next().equals("S")) {