From d4dbf85d9536bfec85252a58fc552e2bad42ff17 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 4 Oct 2015 13:20:46 +1300 Subject: Remove trailing whitespaces from code --- src/org/traccar/protocol/EelinkProtocolDecoder.java | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/org/traccar/protocol/EelinkProtocolDecoder.java') diff --git a/src/org/traccar/protocol/EelinkProtocolDecoder.java b/src/org/traccar/protocol/EelinkProtocolDecoder.java index 8bcc70c19..08612dafd 100644 --- a/src/org/traccar/protocol/EelinkProtocolDecoder.java +++ b/src/org/traccar/protocol/EelinkProtocolDecoder.java @@ -76,45 +76,45 @@ public class EelinkProtocolDecoder extends BaseProtocolDecoder { int type = buf.readUnsignedByte(); buf.readShort(); // length int index = buf.readUnsignedShort(); - + if (type != MSG_GPS && type != MSG_DATA) { sendResponse(channel, type, index); } - + if (type == MSG_LOGIN) { identify(ChannelBufferTools.readHexString(buf, 16).substring(1), channel); } - + else if (hasDeviceId() && (type == MSG_GPS || type == MSG_ALARM || type == MSG_STATE || type == MSG_SMS)) { - + // Create new position Position position = new Position(); position.setDeviceId(getDeviceId()); - + position.setProtocol(getProtocolName()); position.set(Event.KEY_INDEX, index); - + // Location position.setTime(new Date(buf.readUnsignedInt() * 1000)); position.setLatitude(buf.readInt() / 1800000.0); position.setLongitude(buf.readInt() / 1800000.0); position.setSpeed(UnitsConverter.knotsFromKph(buf.readUnsignedByte())); position.setCourse(buf.readUnsignedShort()); - + // Cell position.set(Event.KEY_CELL, ChannelBufferTools.readHexString(buf, 18)); - + // Validity position.setValid((buf.readUnsignedByte() & 0x01) != 0); - + if (type == MSG_ALARM) { position.set(Event.KEY_ALARM, buf.readUnsignedByte()); } - + if (type == MSG_STATE) { position.set(Event.KEY_STATUS, buf.readUnsignedByte()); } -- cgit v1.2.3