From 1f2c8ab848ac2b9d80440d8cdad8c1c293088bae Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 11 Apr 2015 10:24:07 +1200 Subject: Add more CalAmp unit tests --- src/org/traccar/protocol/CalAmpProtocolDecoder.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/org/traccar/protocol/CalAmpProtocolDecoder.java b/src/org/traccar/protocol/CalAmpProtocolDecoder.java index 7850de1ca..c89983c23 100644 --- a/src/org/traccar/protocol/CalAmpProtocolDecoder.java +++ b/src/org/traccar/protocol/CalAmpProtocolDecoder.java @@ -212,13 +212,15 @@ public class CalAmpProtocolDecoder extends BaseProtocolDecoder { // Event code and status if (type == MSG_EVENT_REPORT || type == MSG_MINI_EVENT_REPORT) { - extendedInfo.set("event", buf.readUnsignedByte()); + extendedInfo.set("event", buf.readUnsignedByte() + " - " + buf.readUnsignedByte()); } // Accumulators - /*int accCount = buf.readUnsignedByte(); + int accCount = buf.readUnsignedByte(); int accType = accCount >> 6; accCount &= 0x3f; + + buf.readUnsignedByte(); // reserved if (accType == 1) { buf.readUnsignedInt(); // threshold @@ -227,7 +229,7 @@ public class CalAmpProtocolDecoder extends BaseProtocolDecoder { for (int i = 0; i < accCount; i++) { extendedInfo.set("acc" + i, buf.readUnsignedInt()); - }*/ + } position.setExtendedInfo(extendedInfo.toString()); return position; -- cgit v1.2.3