aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-01-14 11:35:58 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-01-14 11:35:58 +1300
commite7c5f5849e8d8f0d5a37ca94e893802a12eeec7a (patch)
treed3558e1c0b8342166967b80550550cfc40b6d25d /src/org/traccar/protocol
parent04982b2acfa6e79c7ebccb814457ab0eaab86f9f (diff)
parent786a73d92a0ead492766b86a5272f5b8eec03103 (diff)
downloadtrackermap-server-e7c5f5849e8d8f0d5a37ca94e893802a12eeec7a.tar.gz
trackermap-server-e7c5f5849e8d8f0d5a37ca94e893802a12eeec7a.tar.bz2
trackermap-server-e7c5f5849e8d8f0d5a37ca94e893802a12eeec7a.zip
Merge pull request #1028 from pallavt/master
Saving Teltonika device power state
Diffstat (limited to 'src/org/traccar/protocol')
-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());
}
}