aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java4
-rw-r--r--src/test/java/org/traccar/protocol/Minifinder2ProtocolDecoderTest.java4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java
index 0b08badb8..aa43a6054 100644
--- a/src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java
@@ -277,6 +277,10 @@ public class Minifinder2ProtocolDecoder extends BaseProtocolDecoder {
i += 1;
}
break;
+ case 0x37:
+ buf.readUnsignedIntLE(); // timestamp
+ position.set("barkCount", BitUtil.to(buf.readUnsignedIntLE(), 31));
+ break;
case 0x40:
buf.readUnsignedIntLE(); // timestamp
int heartRate = buf.readUnsignedByte();
diff --git a/src/test/java/org/traccar/protocol/Minifinder2ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Minifinder2ProtocolDecoderTest.java
index 2013fa820..693a11fc5 100644
--- a/src/test/java/org/traccar/protocol/Minifinder2ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Minifinder2ProtocolDecoderTest.java
@@ -11,6 +11,10 @@ public class Minifinder2ProtocolDecoderTest extends ProtocolTest {
var decoder = inject(new Minifinder2ProtocolDecoder(null));
verifyAttribute(decoder, binary(
+ "ab101c00d6f61e000110013836333932313033393939363038300937efd201640c000000"),
+ "barkCount", 12L);
+
+ verifyAttribute(decoder, binary(
"ab102600080f1400011001383633393231303339393833343736092429b347633003a96409020000008027b34763"),
"bark", true);