From 5bec2f79dd470415f721de275ce88870e0988bc2 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 27 Jun 2015 10:07:33 +1200 Subject: Fix Meiligao RFID decoding --- src/org/traccar/protocol/MeiligaoProtocolDecoder.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/org') diff --git a/src/org/traccar/protocol/MeiligaoProtocolDecoder.java b/src/org/traccar/protocol/MeiligaoProtocolDecoder.java index 72c28297c..2b1ea9434 100644 --- a/src/org/traccar/protocol/MeiligaoProtocolDecoder.java +++ b/src/org/traccar/protocol/MeiligaoProtocolDecoder.java @@ -59,7 +59,7 @@ public class MeiligaoProtocolDecoder extends BaseProtocolDecoder { "\\|(\\p{XDigit}{2})" + // GSM "\\|(\\p{XDigit}{8})|" + // Odometer "(\\p{XDigit}{9})" + // Odometer - "(?:\\|(\\p{XDigit}{5}))?)?)?)?)?" + // RFID + "(?:\\|(\\p{XDigit}{5,}))?)?)?)?)?" + // RFID ".*"); private static final int MSG_HEARTBEAT = 0x0001; @@ -279,7 +279,10 @@ public class MeiligaoProtocolDecoder extends BaseProtocolDecoder { } // RFID - position.set(Event.KEY_RFID, parser.group(index++)); + String rfid = parser.group(index++); + if (rfid != null) { + position.set(Event.KEY_RFID, Integer.parseInt(rfid, 16)); + } return position; } -- cgit v1.2.3