From 9546b1abf9f296865cddebb06d1f4cadcd793b71 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 14 Jan 2015 11:38:01 +1300 Subject: Clear formatting for Teltonika --- src/org/traccar/protocol/TeltonikaProtocolDecoder.java | 9 +++++---- 1 file 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()); + } } } -- cgit v1.2.3