From 786a73d92a0ead492766b86a5272f5b8eec03103 Mon Sep 17 00:00:00 2001 From: Pallav Tantia Date: Tue, 13 Jan 2015 11:45:59 +0530 Subject: Saving Teltonika device power state. --- src/org/traccar/protocol/TeltonikaProtocolDecoder.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/org') 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()); } } -- cgit v1.2.3