aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-06-27 10:07:33 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-06-27 10:07:33 +1200
commit5bec2f79dd470415f721de275ce88870e0988bc2 (patch)
tree1aff370c21fab7ff32d74f8ce8c52848acd595b1 /src/org
parent86d96506f51fc4c49af0487e00ecd2d5ee02218c (diff)
downloadtraccar-server-5bec2f79dd470415f721de275ce88870e0988bc2.tar.gz
traccar-server-5bec2f79dd470415f721de275ce88870e0988bc2.tar.bz2
traccar-server-5bec2f79dd470415f721de275ce88870e0988bc2.zip
Fix Meiligao RFID decoding
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/protocol/MeiligaoProtocolDecoder.java7
1 files changed, 5 insertions, 2 deletions
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;
}