aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-01-03 22:44:00 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2017-01-03 22:44:00 +1300
commite512848dc07145664f3c5d0adff7a9f88b2f17b6 (patch)
tree6beabf7aea080ce47db7e94867129360e461429c /src/org
parent46f05634aeeff470743e2bf73f9299dbe9fdc44d (diff)
downloadtrackermap-server-e512848dc07145664f3c5d0adff7a9f88b2f17b6.tar.gz
trackermap-server-e512848dc07145664f3c5d0adff7a9f88b2f17b6.tar.bz2
trackermap-server-e512848dc07145664f3c5d0adff7a9f88b2f17b6.zip
Fix GoSafe protocol decoder
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/protocol/GoSafeProtocolDecoder.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/org/traccar/protocol/GoSafeProtocolDecoder.java b/src/org/traccar/protocol/GoSafeProtocolDecoder.java
index 40a0d4d73..deeea2333 100644
--- a/src/org/traccar/protocol/GoSafeProtocolDecoder.java
+++ b/src/org/traccar/protocol/GoSafeProtocolDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 - 2016 Anton Tananaev (anton@traccar.org)
+ * Copyright 2015 - 2017 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.
@@ -69,13 +69,13 @@ public class GoSafeProtocolDecoder extends BaseProtocolDecoder {
.groupEnd()
.groupBegin()
.text("GSM:")
- .number("d+;") // registration
- .number("d+;") // gsm signal
+ .number("d*;") // registration
+ .number("d*;") // gsm signal
.number("(d+);") // mcc
.number("(d+);") // mnc
.number("(x+);") // lac
.number("(x+);") // cid
- .number("-d+") // rssi
+ .number("(-d+)") // rssi
.expression("[^,]*,?")
.groupEnd("?")
.groupBegin()
@@ -86,8 +86,8 @@ public class GoSafeProtocolDecoder extends BaseProtocolDecoder {
.groupEnd("?")
.groupBegin()
.text("ADC:")
- .number("(d+.d+);") // power
- .number("(d+.d+),?") // battery
+ .number("(d+.d+)") // power
+ .number("(?:;(d+.d+))?,?") // battery
.groupEnd("?")
.groupBegin()
.text("DTT:")
@@ -158,7 +158,7 @@ public class GoSafeProtocolDecoder extends BaseProtocolDecoder {
if (parser.hasNext(4)) {
position.setNetwork(new Network(CellTower.from(
- parser.nextInt(), parser.nextInt(), parser.nextInt(16), parser.nextInt(16))));
+ parser.nextInt(), parser.nextInt(), parser.nextInt(16), parser.nextInt(16), parser.nextInt())));
}
if (parser.hasNext()) {
position.set(Position.KEY_ODOMETER, parser.nextInt());