aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorPallav Tantia <pallavt@gmail.com>2015-01-13 11:45:59 +0530
committerPallav Tantia <pallavt@gmail.com>2015-01-13 11:45:59 +0530
commit786a73d92a0ead492766b86a5272f5b8eec03103 (patch)
treed3558e1c0b8342166967b80550550cfc40b6d25d /src/org
parent04982b2acfa6e79c7ebccb814457ab0eaab86f9f (diff)
downloadtraccar-server-786a73d92a0ead492766b86a5272f5b8eec03103.tar.gz
traccar-server-786a73d92a0ead492766b86a5272f5b8eec03103.tar.bz2
traccar-server-786a73d92a0ead492766b86a5272f5b8eec03103.zip
Saving Teltonika device power state.
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/protocol/TeltonikaProtocolDecoder.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/TeltonikaProtocolDecoder.java b/src/org/traccar/protocol/TeltonikaProtocolDecoder.java
index 62d3db539..a06d2875a 100644
--- a/src/org/traccar/protocol/TeltonikaProtocolDecoder.java
+++ b/src/org/traccar/protocol/TeltonikaProtocolDecoder.java
@@ -167,7 +167,11 @@ public class TeltonikaProtocolDecoder extends BaseProtocolDecoder {
if (checkBit(globalMask, 1)) {
int cnt = buf.readUnsignedByte();
for (int j = 0; j < cnt; j++) {
- extendedInfo.set("io" + buf.readUnsignedByte(), buf.readUnsignedByte());
+ int ioID=buf.readUnsignedByte();
+ if(ioID==1)
+ extendedInfo.set("power", buf.readUnsignedByte());
+ else
+ extendedInfo.set("io" + ioID, buf.readUnsignedByte());
}
}