From 57941c8095839951caf868368963ba13e8fc3da3 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 17 Apr 2017 16:59:36 +1200 Subject: Decode numeric OsmAnd parameters --- src/org/traccar/protocol/OsmAndProtocolDecoder.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/org/traccar') diff --git a/src/org/traccar/protocol/OsmAndProtocolDecoder.java b/src/org/traccar/protocol/OsmAndProtocolDecoder.java index 382865e8f..579dbe3e6 100644 --- a/src/org/traccar/protocol/OsmAndProtocolDecoder.java +++ b/src/org/traccar/protocol/OsmAndProtocolDecoder.java @@ -129,7 +129,11 @@ public class OsmAndProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_BATTERY, value); break; default: - position.set(entry.getKey(), value); + try { + position.set(entry.getKey(), Double.parseDouble(value)); + } catch (NumberFormatException e) { + position.set(entry.getKey(), value); + } break; } } -- cgit v1.2.3