aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/TeltonikaProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-01-14 11:38:01 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-01-14 11:38:01 +1300
commit9546b1abf9f296865cddebb06d1f4cadcd793b71 (patch)
tree9b462bf89d4a86cdfde27afb6b4ee66cb57bbd81 /src/org/traccar/protocol/TeltonikaProtocolDecoder.java
parente7c5f5849e8d8f0d5a37ca94e893802a12eeec7a (diff)
downloadtrackermap-server-9546b1abf9f296865cddebb06d1f4cadcd793b71.tar.gz
trackermap-server-9546b1abf9f296865cddebb06d1f4cadcd793b71.tar.bz2
trackermap-server-9546b1abf9f296865cddebb06d1f4cadcd793b71.zip
Clear formatting for Teltonika
Diffstat (limited to 'src/org/traccar/protocol/TeltonikaProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/TeltonikaProtocolDecoder.java9
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());
+ }
}
}