aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-03-02 14:49:18 -0800
committerAnton Tananaev <anton@traccar.org>2023-03-02 14:49:18 -0800
commit847e581a4846994474a3116fc17fc16bde658f00 (patch)
tree0f7353bc027dc869734c5ca43e7283614f13ed81 /src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
parent01ca9d91616d148db30333ae79d3bf3fc13fc1e8 (diff)
downloadtrackermap-server-847e581a4846994474a3116fc17fc16bde658f00.tar.gz
trackermap-server-847e581a4846994474a3116fc17fc16bde658f00.tar.bz2
trackermap-server-847e581a4846994474a3116fc17fc16bde658f00.zip
Decode full IMEI number
Diffstat (limited to 'src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java')
-rw-r--r--src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
index f79641bcf..3945b86a3 100644
--- a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
@@ -169,7 +169,7 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder {
} else {
long imei = id.getUnsignedShort(0);
imei = (imei << 32) + id.getUnsignedInt(2);
- return String.valueOf(imei);
+ return String.valueOf(imei) + Checksum.luhn(imei);
}
}