aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-10-08 19:01:31 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-10-08 19:01:31 +1300
commitbc39a5aaa85813cb003405dd67387454011da450 (patch)
treec1e3b9d819f0c3999d5f0ac144f1f944b52beb06 /src/org/traccar
parenta912ce127c23839c324db2109ab4741ff24a75f6 (diff)
downloadtrackermap-server-bc39a5aaa85813cb003405dd67387454011da450.tar.gz
trackermap-server-bc39a5aaa85813cb003405dd67387454011da450.tar.bz2
trackermap-server-bc39a5aaa85813cb003405dd67387454011da450.zip
Support Laipac new message type
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/protocol/LaipacProtocolDecoder.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/org/traccar/protocol/LaipacProtocolDecoder.java b/src/org/traccar/protocol/LaipacProtocolDecoder.java
index ebca443a1..25678af88 100644
--- a/src/org/traccar/protocol/LaipacProtocolDecoder.java
+++ b/src/org/traccar/protocol/LaipacProtocolDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013 - 2014 Anton Tananaev (anton.tananaev@gmail.com)
+ * Copyright 2013 - 2016 Anton Tananaev (anton.tananaev@gmail.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -37,7 +37,7 @@ public class LaipacProtocolDecoder extends BaseProtocolDecoder {
.text("$AVRMC,")
.expression("([^,]+),") // identifier
.number("(dd)(dd)(dd),") // time
- .expression("([AVRavr]),") // validity
+ .expression("([AVRPavrp]),") // validity
.number("(dd)(dd.d+),") // latitude
.expression("([NS]),")
.number("(ddd)(dd.d+),") // longitude
@@ -66,13 +66,13 @@ public class LaipacProtocolDecoder 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());
DateBuilder dateBuilder = new DateBuilder()