aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorMatjaž Črnko <m.crnko@txt.si>2023-06-13 13:37:24 +0200
committerMatjaž Črnko <m.crnko@txt.si>2023-06-13 13:37:24 +0200
commita3a086cfda4219815cba4ea6ca2cb44028c1e091 (patch)
treeecfa3a5b2e69a944b42bb68fc60177eea8ff42d7 /src/main
parent3ac7982d48bd7b3ed207a1461bc90a1cb7a888c4 (diff)
downloadtrackermap-server-a3a086cfda4219815cba4ea6ca2cb44028c1e091.tar.gz
trackermap-server-a3a086cfda4219815cba4ea6ca2cb44028c1e091.tar.bz2
trackermap-server-a3a086cfda4219815cba4ea6ca2cb44028c1e091.zip
Ruptela - tested bleBeaconID decoding
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java b/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java
index 8a9bf21a4..2680e56b2 100644
--- a/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java
@@ -293,12 +293,10 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder {
driverId.release();
}
- Long bleBeaconIdPart1 = (Long) position.getAttributes().remove(Position.PREFIX_IO + 760);
- Long bleBeaconIdPart2 = (Long) position.getAttributes().remove(Position.PREFIX_IO + 761);
- if (bleBeaconIdPart1 != null && bleBeaconIdPart2 != null) {
- ByteBuf bleBeaconId = Unpooled.copyLong(bleBeaconIdPart1, bleBeaconIdPart2);
- position.set("bleBeaconId", bleBeaconId.toString(StandardCharsets.US_ASCII));
- bleBeaconId.release();
+ Long bleBeaconIdP1 = (Long) position.getAttributes().remove(Position.PREFIX_IO + 760);
+ Long bleBeaconIdP2 = (Long) position.getAttributes().remove(Position.PREFIX_IO + 761);
+ if (bleBeaconIdP1 != null && bleBeaconIdP2 != null) {
+ position.set("bleBeaconId", Long.toHexString(bleBeaconIdP1) + Long.toHexString(bleBeaconIdP2));
}
positions.add(position);