diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-12-29 10:41:19 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-12-29 10:41:19 -0800 |
commit | d4c8753543d65c4e7674d0f1ab3a78406311cf8d (patch) | |
tree | edfe4500d9c74d0382a45560dc57f2b74cf29d9e | |
parent | d5049fcf996abc1972620c53906579025f1c1153 (diff) | |
download | trackermap-server-d4c8753543d65c4e7674d0f1ab3a78406311cf8d.tar.gz trackermap-server-d4c8753543d65c4e7674d0f1ab3a78406311cf8d.tar.bz2 trackermap-server-d4c8753543d65c4e7674d0f1ab3a78406311cf8d.zip |
Another Wristband update
-rw-r--r-- | src/org/traccar/protocol/WristbandProtocolDecoder.java | 5 | ||||
-rw-r--r-- | test/org/traccar/protocol/WristbandProtocolDecoderTest.java | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/WristbandProtocolDecoder.java b/src/org/traccar/protocol/WristbandProtocolDecoder.java index 341690a0e..08e52c2d3 100644 --- a/src/org/traccar/protocol/WristbandProtocolDecoder.java +++ b/src/org/traccar/protocol/WristbandProtocolDecoder.java @@ -85,7 +85,7 @@ public class WristbandProtocolDecoder extends BaseProtocolDecoder { position.setValid(true); position.setLongitude(Double.parseDouble(values[0])); position.setLatitude(Double.parseDouble(values[1])); - position.setTime(new SimpleDateFormat("yyyyMMddHHmmss").parse(values[2])); + position.setTime(new SimpleDateFormat("yyyyMMddHHmm").parse(values[2])); position.setSpeed(UnitsConverter.knotsFromKph(Double.parseDouble(values[3]))); return position; @@ -126,6 +126,9 @@ public class WristbandProtocolDecoder extends BaseProtocolDecoder { positions.add(decodePosition(deviceSession, fragment)); } break; + case 64: + sendResponse(channel, imei, version, type, "0"); + break; default: break; } diff --git a/test/org/traccar/protocol/WristbandProtocolDecoderTest.java b/test/org/traccar/protocol/WristbandProtocolDecoderTest.java index 3f6c48d52..1c094d075 100644 --- a/test/org/traccar/protocol/WristbandProtocolDecoderTest.java +++ b/test/org/traccar/protocol/WristbandProtocolDecoderTest.java @@ -10,6 +10,9 @@ public class WristbandProtocolDecoderTest extends ProtocolTest { WristbandProtocolDecoder decoder = new WristbandProtocolDecoder(null); + verifyPositions(decoder, binary( + "00010200bc59583836383730343034343735303035357c56312e307c317c7b4630322337372e3437373831372c2d33382e3839363239322c3230313831323239313235352c302e35387c37372e3437373739362c2d33382e3839363234352c3230313831323239313235352c302e30307c37372e3437373738392c2d33382e3839363233322c3230313831323239313235352c302e30307c37372e3437373737362c2d33382e3839363232322c3230313831323239313235352c302e30307d0d0afffefc")); + verifyNull(decoder, binary( "000102004759583836383730343034343735303035357c56312e307c317c7b463931233331305f30307c30307c30307c30307c57414e444149323031382f31322f31342031353a35367d0d0afffefc")); |