diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-05-26 22:47:48 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-05-26 22:47:48 +1200 |
commit | 0b69523b721b2f719ff32abb4eb9555279a99208 (patch) | |
tree | 815e39c4da2aeff753948beff89f9f6d386bc986 /src/org/traccar | |
parent | 593303cbfd1e28c1ec3d2af6c7e9ceea872b691c (diff) | |
download | traccar-server-0b69523b721b2f719ff32abb4eb9555279a99208.tar.gz traccar-server-0b69523b721b2f719ff32abb4eb9555279a99208.tar.bz2 traccar-server-0b69523b721b2f719ff32abb4eb9555279a99208.zip |
Implement StarLink Dallas decoding
Diffstat (limited to 'src/org/traccar')
-rw-r--r-- | src/org/traccar/protocol/StarLinkProtocolDecoder.java | 6 |
1 files changed, 5 insertions, 1 deletions
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; |