diff options
Diffstat (limited to 'src/org/traccar')
-rw-r--r-- | src/org/traccar/protocol/TeltonikaProtocolDecoder.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/TeltonikaProtocolDecoder.java b/src/org/traccar/protocol/TeltonikaProtocolDecoder.java index a06d2875a..961d4e73b 100644 --- a/src/org/traccar/protocol/TeltonikaProtocolDecoder.java +++ b/src/org/traccar/protocol/TeltonikaProtocolDecoder.java @@ -167,11 +167,12 @@ public class TeltonikaProtocolDecoder extends BaseProtocolDecoder { if (checkBit(globalMask, 1)) { int cnt = buf.readUnsignedByte(); for (int j = 0; j < cnt; j++) { - int ioID=buf.readUnsignedByte(); - if(ioID==1) + int id = buf.readUnsignedByte(); + if (id == 1) { extendedInfo.set("power", buf.readUnsignedByte()); - else - extendedInfo.set("io" + ioID, buf.readUnsignedByte()); + } else { + extendedInfo.set("io" + id, buf.readUnsignedByte()); + } } } |