diff options
Diffstat (limited to 'src/main/java/org/traccar/protocol/FifotrackProtocolDecoder.java')
-rw-r--r-- | src/main/java/org/traccar/protocol/FifotrackProtocolDecoder.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/FifotrackProtocolDecoder.java b/src/main/java/org/traccar/protocol/FifotrackProtocolDecoder.java index 70972f847..4a23d57d0 100644 --- a/src/main/java/org/traccar/protocol/FifotrackProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/FifotrackProtocolDecoder.java @@ -206,7 +206,12 @@ public class FifotrackProtocolDecoder extends BaseProtocolDecoder { } if (parser.hasNext()) { - position.set(Position.KEY_DRIVER_UNIQUE_ID, String.valueOf(parser.nextHexInt())); + String rfid = parser.next(); + if (rfid.matches("\\p{XDigit}+")) { + position.set(Position.KEY_DRIVER_UNIQUE_ID, String.valueOf(Integer.parseInt(rfid, 16))); + } else { + position.set("driverLicense", rfid); + } } if (parser.hasNext()) { |