diff options
-rw-r--r-- | src/org/traccar/protocol/WatchProtocolDecoder.java | 2 | ||||
-rw-r--r-- | test/org/traccar/protocol/WatchProtocolDecoderTest.java | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/WatchProtocolDecoder.java b/src/org/traccar/protocol/WatchProtocolDecoder.java index dbd5072e7..437cf3407 100644 --- a/src/org/traccar/protocol/WatchProtocolDecoder.java +++ b/src/org/traccar/protocol/WatchProtocolDecoder.java @@ -206,7 +206,7 @@ public class WatchProtocolDecoder extends BaseProtocolDecoder { sendResponse(channel, manufacturer, id, "TKQ"); - } else if (type.equals("PULSE")) { + } else if (type.equals("PULSE") || type.equals("heart")) { Position position = new Position(); position.setProtocol(getProtocolName()); diff --git a/test/org/traccar/protocol/WatchProtocolDecoderTest.java b/test/org/traccar/protocol/WatchProtocolDecoderTest.java index 9f402cef2..a1b9e458a 100644 --- a/test/org/traccar/protocol/WatchProtocolDecoderTest.java +++ b/test/org/traccar/protocol/WatchProtocolDecoderTest.java @@ -69,6 +69,12 @@ public class WatchProtocolDecoderTest extends ProtocolTest { verifyAttributes(decoder, text( "[CS*8800000015*0008*PULSE,72")); + verifyAttributes(decoder, text( + "[3G*6005412902*0007*heart,0")); + + verifyAttributes(decoder, text( + "[3G*6005412902*0008*heart,71")); + } } |