From 06eb72ad101b5a0de9a975fd6f3585238d887cef Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 27 Aug 2016 11:04:03 +1200 Subject: Fix an issue in GpsMaker protocol decoder --- src/org/traccar/protocol/GpsMarkerProtocolDecoder.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/org/traccar/protocol/GpsMarkerProtocolDecoder.java b/src/org/traccar/protocol/GpsMarkerProtocolDecoder.java index 4f6faa6ba..89537fa3d 100644 --- a/src/org/traccar/protocol/GpsMarkerProtocolDecoder.java +++ b/src/org/traccar/protocol/GpsMarkerProtocolDecoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com) + * Copyright 2015 - 2016 Anton Tananaev (anton.tananaev@gmail.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,7 +45,7 @@ public class GpsMarkerProtocolDecoder extends BaseProtocolDecoder { .number("(ddd)(dd)(dddd)") // longitude .number("(ddd)") // speed .number("(ddd)") // course - .number("(d)") // satellites + .number("(x)") // satellites .number("(dd)") // battery .number("(d)") // input .number("(d)") // output @@ -82,7 +82,7 @@ public class GpsMarkerProtocolDecoder extends BaseProtocolDecoder { position.setSpeed(parser.nextDouble()); position.setCourse(parser.nextDouble()); - position.set(Position.KEY_SATELLITES, parser.next()); + position.set(Position.KEY_SATELLITES, parser.nextInt(16)); position.set(Position.KEY_BATTERY, parser.next()); position.set(Position.KEY_INPUT, parser.next()); position.set(Position.KEY_OUTPUT, parser.next()); -- cgit v1.2.3