From 0b69523b721b2f719ff32abb4eb9555279a99208 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 26 May 2017 22:47:48 +1200 Subject: Implement StarLink Dallas decoding --- src/org/traccar/protocol/StarLinkProtocolDecoder.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/org/traccar/protocol/StarLinkProtocolDecoder.java b/src/org/traccar/protocol/StarLinkProtocolDecoder.java index 8fbecc35e..e90dde455 100644 --- a/src/org/traccar/protocol/StarLinkProtocolDecoder.java +++ b/src/org/traccar/protocol/StarLinkProtocolDecoder.java @@ -192,7 +192,11 @@ public class StarLinkProtocolDecoder extends BaseProtocolDecoder { } if (event == 20) { - position.set(Position.KEY_RFID, data[data.length - 1]); + String rfid = data[data.length - 1]; + if (rfid.matches("0+")) { + rfid = data[data.length - 2]; + } + position.set(Position.KEY_RFID, rfid); } return position; -- cgit v1.2.3