diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2021-12-10 22:22:28 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2021-12-10 22:22:28 -0800 |
commit | ffd8ab43e4c2d7fa69753fe73d4e546896d920b6 (patch) | |
tree | 22a981cf5371001fdbb8eb6d899ab9d1681d832b /src/main/java/org/traccar/protocol | |
parent | f020e0472d4544c7f968d8fb2504ad8e85174a49 (diff) | |
download | trackermap-server-ffd8ab43e4c2d7fa69753fe73d4e546896d920b6.tar.gz trackermap-server-ffd8ab43e4c2d7fa69753fe73d4e546896d920b6.tar.bz2 trackermap-server-ffd8ab43e4c2d7fa69753fe73d4e546896d920b6.zip |
Fix status response
Diffstat (limited to 'src/main/java/org/traccar/protocol')
-rw-r--r-- | src/main/java/org/traccar/protocol/TopinProtocolDecoder.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/protocol/TopinProtocolDecoder.java b/src/main/java/org/traccar/protocol/TopinProtocolDecoder.java index 40a583f2a..4fe261aa4 100644 --- a/src/main/java/org/traccar/protocol/TopinProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/TopinProtocolDecoder.java @@ -193,10 +193,12 @@ public class TopinProtocolDecoder extends BaseProtocolDecoder { getLastLocation(position, null); + ByteBuf content = buf.retainedSlice(buf.readerIndex(), buf.readableBytes() - 2); + position.set(Position.KEY_BATTERY_LEVEL, buf.readUnsignedByte()); position.set(Position.KEY_VERSION_FW, buf.readUnsignedByte()); buf.readUnsignedByte(); // timezone - int interval = buf.readUnsignedByte(); + buf.readUnsignedByte(); // interval if (buf.readableBytes() >= 1 + 2) { position.set(Position.KEY_RSSI, buf.readUnsignedByte()); } @@ -210,8 +212,6 @@ public class TopinProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_HEART_RATE, buf.readUnsignedByte()); } - ByteBuf content = Unpooled.buffer(); - content.writeByte(interval); sendResponse(channel, length, type, content); return position; |