diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-12-27 14:12:30 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-12-27 14:12:36 -0800 |
commit | d86f7a4befb7fd4b5ee1a558ccf1a5b553b02ab6 (patch) | |
tree | 4735711940060f2e2cf91f6a5818a61ed7f30ef0 | |
parent | 3634098dc835e457b908cb941a3cd4555af4400d (diff) | |
download | trackermap-server-d86f7a4befb7fd4b5ee1a558ccf1a5b553b02ab6.tar.gz trackermap-server-d86f7a4befb7fd4b5ee1a558ccf1a5b553b02ab6.tar.bz2 trackermap-server-d86f7a4befb7fd4b5ee1a558ccf1a5b553b02ab6.zip |
Update Wristband decoder
-rw-r--r-- | src/org/traccar/protocol/WristbandProtocolDecoder.java | 2 | ||||
-rw-r--r-- | test/org/traccar/protocol/WristbandProtocolDecoderTest.java | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/WristbandProtocolDecoder.java b/src/org/traccar/protocol/WristbandProtocolDecoder.java index 4e044c915..b750f1bad 100644 --- a/src/org/traccar/protocol/WristbandProtocolDecoder.java +++ b/src/org/traccar/protocol/WristbandProtocolDecoder.java @@ -59,7 +59,7 @@ public class WristbandProtocolDecoder extends BaseProtocolDecoder { private static final Pattern PATTERN = new PatternBuilder() .expression("..") // header .number("(d+)|") // imei - .number("(vd+.d+)|") // version + .number("([vV]d+.d+)|") // version .number("d+|") // model .text("{") .number("F(d+)") // function diff --git a/test/org/traccar/protocol/WristbandProtocolDecoderTest.java b/test/org/traccar/protocol/WristbandProtocolDecoderTest.java index cedc06f79..a0db93749 100644 --- a/test/org/traccar/protocol/WristbandProtocolDecoderTest.java +++ b/test/org/traccar/protocol/WristbandProtocolDecoderTest.java @@ -11,6 +11,9 @@ public class WristbandProtocolDecoderTest extends ProtocolTest { WristbandProtocolDecoder decoder = new WristbandProtocolDecoder(null); verifyNull(decoder, binary( + "000102004759583836383730343034343735303035357c56312e307c317c7b463931233331305f30307c30307c30307c30307c57414e444149323031382f31322f31342031353a35367d0d0afffefc")); + + verifyNull(decoder, binary( "000102004159583336373535313631303030303934347c56312e307c317c7b4639312330317c30307c30307c33475f7065745f323031382f30352f31362031313a30307d0d0afffefc")); } |