aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-04-17 16:59:36 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2017-04-17 16:59:36 +1200
commit57941c8095839951caf868368963ba13e8fc3da3 (patch)
tree8e3e4290a47d0ad61c2cab291a74bba7e0e00057 /src
parentd643e9a75f1c6580d098b68cffc2c709db611d8e (diff)
downloadtraccar-server-57941c8095839951caf868368963ba13e8fc3da3.tar.gz
traccar-server-57941c8095839951caf868368963ba13e8fc3da3.tar.bz2
traccar-server-57941c8095839951caf868368963ba13e8fc3da3.zip
Decode numeric OsmAnd parameters
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/protocol/OsmAndProtocolDecoder.java6
1 files changed, 5 insertions, 1 deletions
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;
}
}