aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-03-20 01:57:03 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2017-03-20 01:57:03 +1300
commit5706941ecce30e3a6d92cdf6e26a266573e63cd7 (patch)
tree33e629c64fc5a8a79adb45f4741db8bea18f356e
parent8d0b583738be703a498843eb648743be484aadba (diff)
downloadtrackermap-server-5706941ecce30e3a6d92cdf6e26a266573e63cd7.tar.gz
trackermap-server-5706941ecce30e3a6d92cdf6e26a266573e63cd7.tar.bz2
trackermap-server-5706941ecce30e3a6d92cdf6e26a266573e63cd7.zip
Fixes to StarLink decoder
-rw-r--r--src/org/traccar/protocol/StarLinkProtocolDecoder.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/StarLinkProtocolDecoder.java b/src/org/traccar/protocol/StarLinkProtocolDecoder.java
index eaee07870..8d35ea5ba 100644
--- a/src/org/traccar/protocol/StarLinkProtocolDecoder.java
+++ b/src/org/traccar/protocol/StarLinkProtocolDecoder.java
@@ -91,6 +91,7 @@ public class StarLinkProtocolDecoder extends BaseProtocolDecoder {
Position position = new Position();
position.setProtocol(getProtocolName());
position.setDeviceId(deviceSession.getDeviceId());
+ position.setValid(true);
position.set(Position.KEY_INDEX, parser.nextInt());
@@ -123,7 +124,7 @@ public class StarLinkProtocolDecoder extends BaseProtocolDecoder {
position.setCourse(Integer.parseInt(data[i]));
break;
case "#ODO#":
- position.set(Position.KEY_ODOMETER, Integer.parseInt(data[i]));
+ position.set(Position.KEY_ODOMETER, Long.parseLong(data[i]) * 1000);
break;
case "#IN1#":
position.set(Position.PREFIX_IN + 1, Integer.parseInt(data[i]));