diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-04 13:20:46 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-04 13:20:46 +1300 |
commit | d4dbf85d9536bfec85252a58fc552e2bad42ff17 (patch) | |
tree | 4a849426c2cd60538b152138b147abef47b40966 /src/org/traccar/protocol/EelinkProtocolDecoder.java | |
parent | 9218bc65b9673b24d2866aae3d5bbe1a5388bab0 (diff) | |
download | trackermap-server-d4dbf85d9536bfec85252a58fc552e2bad42ff17.tar.gz trackermap-server-d4dbf85d9536bfec85252a58fc552e2bad42ff17.tar.bz2 trackermap-server-d4dbf85d9536bfec85252a58fc552e2bad42ff17.zip |
Remove trailing whitespaces from code
Diffstat (limited to 'src/org/traccar/protocol/EelinkProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/EelinkProtocolDecoder.java | 20 |
1 files changed, 10 insertions, 10 deletions
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()); } |