aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-11-05 22:37:55 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2019-11-05 22:37:55 -0800
commitcce68c7e6c116dc23a66dde7ca5476ad7ea575b2 (patch)
treeef5f86b800a93734973e24279f10283a5808bde7 /src/main
parent771768c215d31e6b9e4a50079cabdbd96fc62d5f (diff)
downloadtraccar-server-cce68c7e6c116dc23a66dde7ca5476ad7ea575b2.tar.gz
traccar-server-cce68c7e6c116dc23a66dde7ca5476ad7ea575b2.tar.bz2
traccar-server-cce68c7e6c116dc23a66dde7ca5476ad7ea575b2.zip
Decode inputs and outputs
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java b/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java
index 197e93602..cd0b3d363 100644
--- a/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java
@@ -593,6 +593,16 @@ public class SuntechProtocolDecoder extends BaseProtocolDecoder {
position.setValid(buf.readUnsignedByte() > 0);
}
+ if (BitUtil.check(mask, 17)) {
+ int input = buf.readUnsignedByte();
+ position.set(Position.KEY_IGNITION, BitUtil.check(input, 0));
+ position.set(Position.KEY_INPUT, input);
+ }
+
+ if (BitUtil.check(mask, 18)) {
+ position.set(Position.KEY_OUTPUT, buf.readUnsignedByte());
+ }
+
return position;
}