From 77a475886aea9604030efd5e5deeb634990312f3 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 1 Jun 2017 23:11:02 +1200 Subject: Fix FlexComm time decoding --- src/org/traccar/protocol/FlexCommProtocolDecoder.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/org/traccar/protocol/FlexCommProtocolDecoder.java b/src/org/traccar/protocol/FlexCommProtocolDecoder.java index 086a2de0b..33b4c0abb 100644 --- a/src/org/traccar/protocol/FlexCommProtocolDecoder.java +++ b/src/org/traccar/protocol/FlexCommProtocolDecoder.java @@ -89,8 +89,8 @@ public class FlexCommProtocolDecoder extends BaseProtocolDecoder { } position.setDeviceId(deviceSession.getDeviceId()); - position.setValid(parser.next().equals("1")); position.setTime(parser.nextDateTime()); + position.setValid(parser.next().equals("1")); position.setLatitude(parseSignedValue(parser, 6)); position.setLongitude(parseSignedValue(parser, 6)); position.setAltitude(parseSignedValue(parser, 0)); @@ -104,8 +104,8 @@ public class FlexCommProtocolDecoder extends BaseProtocolDecoder { position.setNetwork(new Network(CellTower.from( parser.nextInt(), parser.nextInt(), parser.nextHexInt(), parser.nextHexInt()))); - position.set(Position.KEY_INPUT, parser.nextInt()); - position.set(Position.KEY_OUTPUT, parser.nextInt()); + position.set(Position.KEY_INPUT, parser.nextBinInt()); + position.set(Position.KEY_OUTPUT, parser.nextBinInt()); position.set(Position.KEY_FUEL_LEVEL, parser.nextInt()); position.set(Position.PREFIX_TEMP + 1, parseSignedValue(parser, 0)); position.set(Position.KEY_BATTERY_LEVEL, parser.nextInt()); -- cgit v1.2.3