diff options
Diffstat (limited to 'src/org/traccar/protocol/HuabaoProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/HuabaoProtocolDecoder.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/org/traccar/protocol/HuabaoProtocolDecoder.java b/src/org/traccar/protocol/HuabaoProtocolDecoder.java index a9a4741fc..6ed490c1a 100644 --- a/src/org/traccar/protocol/HuabaoProtocolDecoder.java +++ b/src/org/traccar/protocol/HuabaoProtocolDecoder.java @@ -19,8 +19,8 @@ import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.buffer.ChannelBuffers; import org.jboss.netty.channel.Channel; import org.traccar.BaseProtocolDecoder; +import org.traccar.helper.BcdUtil; import org.traccar.helper.BitUtil; -import org.traccar.helper.ChannelBufferTools; import org.traccar.helper.Checksum; import org.traccar.helper.DateBuilder; import org.traccar.helper.UnitsConverter; @@ -132,12 +132,12 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder { position.setCourse(buf.readUnsignedShort()); DateBuilder dateBuilder = new DateBuilder(TimeZone.getTimeZone("GMT+8")) - .setYear(ChannelBufferTools.readHexInteger(buf, 2)) - .setMonth(ChannelBufferTools.readHexInteger(buf, 2)) - .setDay(ChannelBufferTools.readHexInteger(buf, 2)) - .setHour(ChannelBufferTools.readHexInteger(buf, 2)) - .setMinute(ChannelBufferTools.readHexInteger(buf, 2)) - .setSecond(ChannelBufferTools.readHexInteger(buf, 2)); + .setYear(BcdUtil.readInteger(buf, 2)) + .setMonth(BcdUtil.readInteger(buf, 2)) + .setDay(BcdUtil.readInteger(buf, 2)) + .setHour(BcdUtil.readInteger(buf, 2)) + .setMinute(BcdUtil.readInteger(buf, 2)) + .setSecond(BcdUtil.readInteger(buf, 2)); position.setTime(dateBuilder.getDate()); // additional information |