aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-06-23 09:19:16 -0700
committerGitHub <noreply@github.com>2021-06-23 09:19:16 -0700
commit48670633fd49e3ec2bd781f858b11ccd2083878d (patch)
tree330e5444b82a4b0edeae08b81eb057d56d3714be /src/main/java
parente2ec2d17b751dc3f3b829cee8693999d9ed08f40 (diff)
parent309218f2832b6395f9334816e02d755c854f15ad (diff)
downloadtraccar-server-48670633fd49e3ec2bd781f858b11ccd2083878d.tar.gz
traccar-server-48670633fd49e3ec2bd781f858b11ccd2083878d.tar.bz2
traccar-server-48670633fd49e3ec2bd781f858b11ccd2083878d.zip
Merge pull request #4702 from Thiritin/patch-1
Make field optional for the Megastek protocol
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/traccar/protocol/MegastekProtocolDecoder.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/MegastekProtocolDecoder.java b/src/main/java/org/traccar/protocol/MegastekProtocolDecoder.java
index fae73d931..f0c0df8a6 100644
--- a/src/main/java/org/traccar/protocol/MegastekProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/MegastekProtocolDecoder.java
@@ -246,7 +246,7 @@ public class MegastekProtocolDecoder extends BaseProtocolDecoder {
.number("(d+.d+),") // hdop
.number("(d+.d+)?,") // speed
.number("(d+.d+)?,") // course
- .number("(-?d+.d+),") // altitude
+ .number("(-?d+.d+)?,") // altitude
.number("(d+.d+)?,") // odometer
.number("(d+),") // mcc
.number("(d+),") // mnc
@@ -276,7 +276,7 @@ public class MegastekProtocolDecoder extends BaseProtocolDecoder {
.groupEnd("?").text(",")
.number("(d+)?,") // rfid
.number("([01])(d)?").optional() // charge and belt status
- .expression("[^,]*,")
+ .expression("[^,]*,").optional()
.number("(d+)?,") // battery
.expression("([^,]*)[,;]") // alert
.any()