diff options
Diffstat (limited to 'src/org/traccar/protocol/ArnaviProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/ArnaviProtocolDecoder.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/org/traccar/protocol/ArnaviProtocolDecoder.java b/src/org/traccar/protocol/ArnaviProtocolDecoder.java index 56f58f2b5..9c4ab5d05 100644 --- a/src/org/traccar/protocol/ArnaviProtocolDecoder.java +++ b/src/org/traccar/protocol/ArnaviProtocolDecoder.java @@ -74,23 +74,23 @@ public class ArnaviProtocolDecoder extends BaseProtocolDecoder { } position.setDeviceId(deviceSession.getDeviceId()); - position.set(Position.KEY_INDEX, parser.nextInt()); - position.set(Position.KEY_POWER, parser.nextInt() * 0.01); - position.set(Position.KEY_BATTERY, parser.nextInt() * 0.01); - position.set(Position.KEY_IGNITION, parser.nextInt() == 1); - position.set(Position.KEY_INPUT, parser.nextInt()); - position.set(Position.KEY_SATELLITES, parser.nextInt()); + position.set(Position.KEY_INDEX, parser.nextInt(0)); + position.set(Position.KEY_POWER, parser.nextInt(0) * 0.01); + position.set(Position.KEY_BATTERY, parser.nextInt(0) * 0.01); + position.set(Position.KEY_IGNITION, parser.nextInt(0) == 1); + position.set(Position.KEY_INPUT, parser.nextInt(0)); + position.set(Position.KEY_SATELLITES, parser.nextInt(0)); DateBuilder dateBuilder = new DateBuilder() - .setTime(parser.nextInt(), parser.nextInt(), parser.nextInt()); + .setTime(parser.nextInt(0), parser.nextInt(0), parser.nextInt(0)); position.setValid(true); position.setLatitude(parser.nextCoordinate()); position.setLongitude(parser.nextCoordinate()); - position.setSpeed(parser.nextDouble()); - position.setCourse(parser.nextDouble()); + position.setSpeed(parser.nextDouble(0)); + position.setCourse(parser.nextDouble(0)); - dateBuilder.setDateReverse(parser.nextInt(), parser.nextInt(), parser.nextInt()); + dateBuilder.setDateReverse(parser.nextInt(0), parser.nextInt(0), parser.nextInt(0)); position.setTime(dateBuilder.getDate()); return position; |