diff options
author | Anton Tananaev <anton@traccar.org> | 2024-03-30 07:38:13 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2024-03-30 07:38:13 -0700 |
commit | 8fe2d697064c88f5dadf5ca3aeca51ba7e925fd9 (patch) | |
tree | 2737a6180f2a6ca4b2f81dda77797b00b5403641 /src/main/java/org/traccar/protocol | |
parent | 3066f3ccfa2a674fae27922f9f94b5e16eb68f9b (diff) | |
download | trackermap-server-8fe2d697064c88f5dadf5ca3aeca51ba7e925fd9.tar.gz trackermap-server-8fe2d697064c88f5dadf5ca3aeca51ba7e925fd9.tar.bz2 trackermap-server-8fe2d697064c88f5dadf5ca3aeca51ba7e925fd9.zip |
Support virtual ignition messages
Diffstat (limited to 'src/main/java/org/traccar/protocol')
-rw-r--r-- | src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java b/src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java index b14f64f4a..775e98401 100644 --- a/src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java @@ -1031,7 +1031,7 @@ public class Gl200TextProtocolDecoder extends BaseProtocolDecoder { } private static final Pattern PATTERN_IGN = new PatternBuilder() - .text("+").expression("(?:RESP|BUFF):GTIG[NF],") + .text("+").expression("(?:RESP|BUFF):GT[IV]G[NF],") .expression("(?:.{6}|.{10})?,") // protocol version .number("(d{15}|x{14}),") // imei .expression("[^,]*,") // device name @@ -1055,7 +1055,7 @@ public class Gl200TextProtocolDecoder extends BaseProtocolDecoder { decodeLocation(position, parser); - position.set(Position.KEY_IGNITION, sentence.contains("IGN")); + position.set(Position.KEY_IGNITION, sentence.contains("GN")); position.set(Position.KEY_HOURS, parseHours(parser.next())); position.set(Position.KEY_ODOMETER, parser.nextDouble() * 1000); @@ -1677,6 +1677,8 @@ public class Gl200TextProtocolDecoder extends BaseProtocolDecoder { break; case "IGN": case "IGF": + case "VGN": + case "VGF": result = decodeIgn(channel, remoteAddress, sentence); break; case "LSW": |