From e7ba2f77c7e9c9f1065b31a337715b94f43afe26 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 8 Oct 2019 22:20:13 -0700 Subject: Handle long status field --- src/main/java/org/traccar/protocol/FifotrackProtocolDecoder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/org/traccar/protocol') diff --git a/src/main/java/org/traccar/protocol/FifotrackProtocolDecoder.java b/src/main/java/org/traccar/protocol/FifotrackProtocolDecoder.java index 458e92065..40e146e0b 100644 --- a/src/main/java/org/traccar/protocol/FifotrackProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/FifotrackProtocolDecoder.java @@ -60,7 +60,7 @@ public class FifotrackProtocolDecoder extends BaseProtocolDecoder { .number("(-?d+),") // altitude .number("(d+),") // odometer .number("d+,") // runtime - .number("(xxxx),") // status + .number("(x{4,8}),") // status .number("(x+)?,") // input .number("(x+)?,") // output .number("(d+)|") // mcc @@ -151,7 +151,7 @@ public class FifotrackProtocolDecoder extends BaseProtocolDecoder { position.setAltitude(parser.nextInt()); position.set(Position.KEY_ODOMETER, parser.nextLong()); - position.set(Position.KEY_STATUS, parser.nextHexInt()); + position.set(Position.KEY_STATUS, parser.nextHexLong()); position.set(Position.KEY_INPUT, parser.nextHexInt()); position.set(Position.KEY_OUTPUT, parser.nextHexInt()); -- cgit v1.2.3