From a07a7eaa97e972242b6c3d03b17669e4833d9825 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 7 Dec 2017 15:08:51 +1300 Subject: Minor T580w cleanup --- src/org/traccar/protocol/Tk103FrameDecoder.java | 8 ++------ src/org/traccar/protocol/Tk103ProtocolDecoder.java | 5 ----- 2 files changed, 2 insertions(+), 11 deletions(-) (limited to 'src/org/traccar/protocol') diff --git a/src/org/traccar/protocol/Tk103FrameDecoder.java b/src/org/traccar/protocol/Tk103FrameDecoder.java index e8e0325da..390e38906 100644 --- a/src/org/traccar/protocol/Tk103FrameDecoder.java +++ b/src/org/traccar/protocol/Tk103FrameDecoder.java @@ -25,9 +25,7 @@ public class Tk103FrameDecoder extends FrameDecoder { @Override protected Object decode( - ChannelHandlerContext ctx, - Channel channel, - ChannelBuffer buf) throws Exception { + ChannelHandlerContext ctx, Channel channel, ChannelBuffer buf) throws Exception { if (buf.readableBytes() < 2) { return null; @@ -70,10 +68,8 @@ public class Tk103FrameDecoder extends FrameDecoder { } buf.readerIndex(frameStartIndex); - ChannelBuffer result = buf.readBytes(frameEndIndex + 1 - frameStartIndex); - - return result; + return buf.readBytes(frameEndIndex + 1 - frameStartIndex); } } diff --git a/src/org/traccar/protocol/Tk103ProtocolDecoder.java b/src/org/traccar/protocol/Tk103ProtocolDecoder.java index 7e2cb06cb..eda29e3f8 100644 --- a/src/org/traccar/protocol/Tk103ProtocolDecoder.java +++ b/src/org/traccar/protocol/Tk103ProtocolDecoder.java @@ -195,11 +195,6 @@ public class Tk103ProtocolDecoder extends BaseProtocolDecoder { case "DW60": position.set(Position.KEY_ALARM, Position.ALARM_LOW_POWER); break; - case "ZC28": - case "DW41": - case "DW61": - position.set(Position.KEY_ALARM, "badBattery"); - break; default: break; } -- cgit v1.2.3