diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-01-14 11:38:01 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-01-14 11:38:01 +1300 |
commit | 9546b1abf9f296865cddebb06d1f4cadcd793b71 (patch) | |
tree | 9b462bf89d4a86cdfde27afb6b4ee66cb57bbd81 /src/org | |
parent | e7c5f5849e8d8f0d5a37ca94e893802a12eeec7a (diff) | |
download | traccar-server-9546b1abf9f296865cddebb06d1f4cadcd793b71.tar.gz traccar-server-9546b1abf9f296865cddebb06d1f4cadcd793b71.tar.bz2 traccar-server-9546b1abf9f296865cddebb06d1f4cadcd793b71.zip |
Clear formatting for Teltonika
Diffstat (limited to 'src/org')
-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()); + } } } |