From cbfc5e524c98115ae0b1a4fb0754e9841a4fb915 Mon Sep 17 00:00:00 2001 From: Matjaž Črnko Date: Tue, 13 Jun 2023 15:49:46 +0200 Subject: Ruptela renamed bleBeaconId to tagId --- .../org/traccar/protocol/RuptelaProtocolDecoder.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/main/java/org/traccar/protocol') diff --git a/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java b/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java index 2680e56b2..1f2887859 100644 --- a/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java @@ -285,18 +285,18 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder { driverId.release(); } - Long tcoDriverIdPart1 = (Long) position.getAttributes().remove(Position.PREFIX_IO + 155); - Long tcoDriverIdPart2 = (Long) position.getAttributes().remove(Position.PREFIX_IO + 156); - if (tcoDriverIdPart1 != null && tcoDriverIdPart2 != null) { - ByteBuf driverId = Unpooled.copyLong(tcoDriverIdPart1, tcoDriverIdPart2); + driverIdPart1 = (Long) position.getAttributes().remove(Position.PREFIX_IO + 155); + driverIdPart2 = (Long) position.getAttributes().remove(Position.PREFIX_IO + 156); + if (driverIdPart1 != null && driverIdPart2 != null) { + ByteBuf driverId = Unpooled.copyLong(driverIdPart1, driverIdPart2); position.set(Position.KEY_DRIVER_UNIQUE_ID, driverId.toString(StandardCharsets.US_ASCII)); driverId.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)); + Long tagIdPart1 = (Long) position.getAttributes().remove(Position.PREFIX_IO + 760); + Long tagIdPart2 = (Long) position.getAttributes().remove(Position.PREFIX_IO + 761); + if (tagIdPart1 != null && tagIdPart2 != null) { + position.set("tagId", Long.toHexString(tagIdPart1) + Long.toHexString(tagIdPart2)); } positions.add(position); -- cgit v1.2.3