aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/EelinkProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-01-22 21:36:17 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2019-01-22 21:36:17 -0800
commit555c537739df5fc505f48530afe245f4f308a548 (patch)
treea5c024ce18097e1eb2a9dcb604e9a2a7dbf8c942 /src/org/traccar/protocol/EelinkProtocolDecoder.java
parentdaa652338717cdcb83c66e9e78fb337b9d86f83d (diff)
downloadtrackermap-server-555c537739df5fc505f48530afe245f4f308a548.tar.gz
trackermap-server-555c537739df5fc505f48530afe245f4f308a548.tar.bz2
trackermap-server-555c537739df5fc505f48530afe245f4f308a548.zip
Decode eelink probe temperature
Diffstat (limited to 'src/org/traccar/protocol/EelinkProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/EelinkProtocolDecoder.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/EelinkProtocolDecoder.java b/src/org/traccar/protocol/EelinkProtocolDecoder.java
index bffefbddf..dcc87dccc 100644
--- a/src/org/traccar/protocol/EelinkProtocolDecoder.java
+++ b/src/org/traccar/protocol/EelinkProtocolDecoder.java
@@ -273,6 +273,10 @@ public class EelinkProtocolDecoder extends BaseProtocolDecoder {
position.set("co2", buf.readUnsignedInt());
}
+ if (buf.readableBytes() >= 2) {
+ position.set(Position.PREFIX_TEMP + 2, buf.readUnsignedShort() / 16.0);
+ }
+
}
return position;