From 0fc02b910558cbcf10fa82f92938475f52d39a52 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 31 Mar 2020 21:24:15 -0700 Subject: Implement inputs and outputs --- src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/main/java/org/traccar') diff --git a/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java b/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java index 978d768be..9521a1248 100644 --- a/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java @@ -513,6 +513,14 @@ public class SuntechProtocolDecoder extends BaseProtocolDecoder { position.setValid(values[index++].equals("1")); } + if (BitUtil.check(mask, 17)) { + position.set(Position.KEY_INPUT, Integer.parseInt(values[index++])); + } + + if (BitUtil.check(mask, 18)) { + position.set(Position.KEY_OUTPUT, Integer.parseInt(values[index++])); + } + return position; } -- cgit v1.2.3