diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2019-02-13 19:25:01 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2019-02-13 19:25:01 -0800 |
commit | 348dd070a30509794265e444027dac6f5c5e120e (patch) | |
tree | 6d2a6937b341994d8f0df1dbee136088e959bc44 /src/org/traccar/protocol | |
parent | 1e5ee47ce009bacbc9b3c492d0d1e7ce98fe2bea (diff) | |
download | traccar-server-348dd070a30509794265e444027dac6f5c5e120e.tar.gz traccar-server-348dd070a30509794265e444027dac6f5c5e120e.tar.bz2 traccar-server-348dd070a30509794265e444027dac6f5c5e120e.zip |
Add temperature decoding
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r-- | src/org/traccar/protocol/TeltonikaProtocolDecoder.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/org/traccar/protocol/TeltonikaProtocolDecoder.java b/src/org/traccar/protocol/TeltonikaProtocolDecoder.java index 0e1fd6280..c80cd9cda 100644 --- a/src/org/traccar/protocol/TeltonikaProtocolDecoder.java +++ b/src/org/traccar/protocol/TeltonikaProtocolDecoder.java @@ -186,6 +186,12 @@ public class TeltonikaProtocolDecoder extends BaseProtocolDecoder { case 21: position.set(Position.KEY_RSSI, readValue(buf, length, false)); break; + case 25: + case 26: + case 27: + case 28: + position.set(Position.PREFIX_TEMP + (id - 24), readValue(buf, length, true) * 0.1); + break; case 66: position.set(Position.KEY_POWER, readValue(buf, length, false) * 0.001); break; @@ -196,13 +202,9 @@ public class TeltonikaProtocolDecoder extends BaseProtocolDecoder { position.set("gpsStatus", readValue(buf, length, false)); break; case 72: - position.set(Position.PREFIX_TEMP + 1, readValue(buf, length, true) * 0.1); - break; case 73: - position.set(Position.PREFIX_TEMP + 2, readValue(buf, length, true) * 0.1); - break; case 74: - position.set(Position.PREFIX_TEMP + 3, readValue(buf, length, true) * 0.1); + position.set(Position.PREFIX_TEMP + (id - 71), readValue(buf, length, true) * 0.1); break; case 78: long driverUniqueId = readValue(buf, length, false); |