From e5d29490af8e0d7f95519ffd93867ff2a0fc861e Mon Sep 17 00:00:00 2001 From: jon-stumpf Date: Thu, 16 Mar 2017 23:45:40 -0400 Subject: Reverted changes to StarLinkProtocolDecoder.java to avoid merge conflict; --- src/org/traccar/protocol/StarLinkProtocolDecoder.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/org') diff --git a/src/org/traccar/protocol/StarLinkProtocolDecoder.java b/src/org/traccar/protocol/StarLinkProtocolDecoder.java index baa2cf823..46d8ee9cc 100644 --- a/src/org/traccar/protocol/StarLinkProtocolDecoder.java +++ b/src/org/traccar/protocol/StarLinkProtocolDecoder.java @@ -18,6 +18,7 @@ package org.traccar.protocol; import org.jboss.netty.channel.Channel; import org.traccar.BaseProtocolDecoder; import org.traccar.DeviceSession; +import org.traccar.helper.DateBuilder; import org.traccar.helper.Parser; import org.traccar.helper.PatternBuilder; import org.traccar.model.CellTower; @@ -77,11 +78,17 @@ public class StarLinkProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_TYPE, parser.nextInt()); position.set(Position.KEY_INDEX, parser.nextInt()); - position.setDeviceTime(parser.nextDateTime()); + DateBuilder dateBuilder = new DateBuilder() + .setDate(parser.nextInt(), parser.nextInt(), parser.nextInt()) + .setTime(parser.nextInt(), parser.nextInt(), parser.nextInt()); + position.setDeviceTime(dateBuilder.getDate()); position.set(Position.KEY_EVENT, parser.nextInt()); - position.setFixTime(parser.nextDateTime()); + dateBuilder = new DateBuilder() + .setDate(parser.nextInt(), parser.nextInt(), parser.nextInt()) + .setTime(parser.nextInt(), parser.nextInt(), parser.nextInt()); + position.setFixTime(dateBuilder.getDate()); position.setValid(true); position.setLatitude(parser.nextCoordinate(Parser.CoordinateFormat.HEM_DEG_MIN)); -- cgit v1.2.3