diff options
author | jcardus <asklocation.net@gmail.com> | 2021-09-30 19:20:41 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-30 19:20:41 -0300 |
commit | a7431f4cccd273c6e56e5a099c71f2a4b5b76197 (patch) | |
tree | cf4d39e441c6f65807efe01b14c44313ce310f96 /src/main/java | |
parent | c1b406b6fcc442f96f9698774f5544ec9a0588e9 (diff) | |
download | traccar-server-a7431f4cccd273c6e56e5a099c71f2a4b5b76197.tar.gz traccar-server-a7431f4cccd273c6e56e5a099c71f2a4b5b76197.tar.bz2 traccar-server-a7431f4cccd273c6e56e5a099c71f2a4b5b76197.zip |
Update MobilogixProtocolDecoder.java
We are losing data from the events with two digits like T21 and T22 (ignition on and off). Also included the event code
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/traccar/protocol/MobilogixProtocolDecoder.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/MobilogixProtocolDecoder.java b/src/main/java/org/traccar/protocol/MobilogixProtocolDecoder.java index 8677ba9ec..efefaf627 100644 --- a/src/main/java/org/traccar/protocol/MobilogixProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/MobilogixProtocolDecoder.java @@ -39,7 +39,7 @@ public class MobilogixProtocolDecoder extends BaseProtocolDecoder { .text("[") .number("(dddd)-(dd)-(dd) ") // date (yyyymmdd) .number("(dd):(dd):(dd),") // time (hhmmss) - .number("Td,") // type + .number("Td+,") // type .number("d+,") // device type .expression("[^,]+,") // protocol version .expression("([^,]+),") // serial number @@ -80,6 +80,7 @@ public class MobilogixProtocolDecoder extends BaseProtocolDecoder { Position position = new Position(getProtocolName()); + position.set(Position.KEY_EVENT, type); position.setTime(parser.nextDateTime()); DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, parser.next()); |