aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/protocol/CarcellProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/RaveonProtocolDecoder.java6
2 files changed, 5 insertions, 6 deletions
diff --git a/src/org/traccar/protocol/CarcellProtocolDecoder.java b/src/org/traccar/protocol/CarcellProtocolDecoder.java
index fedc65168..fc5710f09 100644
--- a/src/org/traccar/protocol/CarcellProtocolDecoder.java
+++ b/src/org/traccar/protocol/CarcellProtocolDecoder.java
@@ -47,7 +47,7 @@ public class CarcellProtocolDecoder extends BaseProtocolDecoder {
.number("(d+),") // speed
.number("(d+),") // course
.groupBegin()
- .number("([-+]ddd)([-+]ddd)([-+]ddd),") // x,y,z
+ .number("([-+]ddd)([-+]ddd)([-+]ddd),") // x,y,z
.or()
.number("(d+),") // accel
.groupEnd()
@@ -55,7 +55,7 @@ public class CarcellProtocolDecoder extends BaseProtocolDecoder {
.number("(d+),") // csq
.number("(d),") // jamming
.number("(d+),") // hdop
- .expression("([CG]),?") // clock type
+ .expression("([CG]),?") // clock type
.number("(dd)(dd)(dd),") // date (ddmmyy)
.number("(dd)(dd)(dd),") // time (hhmmss)
.number("(d),") // block
@@ -81,7 +81,6 @@ public class CarcellProtocolDecoder extends BaseProtocolDecoder {
Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {
Parser parser = new Parser(PATTERN, (String) msg);
-
if (!parser.matches()) {
return null;
}
diff --git a/src/org/traccar/protocol/RaveonProtocolDecoder.java b/src/org/traccar/protocol/RaveonProtocolDecoder.java
index 75027246e..cbe6026a2 100644
--- a/src/org/traccar/protocol/RaveonProtocolDecoder.java
+++ b/src/org/traccar/protocol/RaveonProtocolDecoder.java
@@ -63,13 +63,13 @@ public class RaveonProtocolDecoder 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());
position.setLatitude(parser.nextCoordinate(Parser.CoordinateFormat.HEM_DEG_MIN));