diff options
author | Iván Ávalos <avalos@disroot.org> | 2021-12-27 20:53:51 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2021-12-27 20:53:51 -0600 |
commit | 91c7fe29bf8a4c069dc9274ba7baa64bb2974d93 (patch) | |
tree | 92c7479893be5144ae0abe3b27587bf3df45b2cd | |
parent | aa59b968c7d6a89b8e6285647ab2e6e62f02cf7f (diff) | |
download | traccar-server-91c7fe29bf8a4c069dc9274ba7baa64bb2974d93.tar.gz traccar-server-91c7fe29bf8a4c069dc9274ba7baa64bb2974d93.tar.bz2 traccar-server-91c7fe29bf8a4c069dc9274ba7baa64bb2974d93.zip |
Suntech Universal protocol ignition support
-rw-r--r-- | src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java b/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java index e13483449..5bf76eba7 100644 --- a/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java @@ -541,7 +541,9 @@ public class SuntechProtocolDecoder extends BaseProtocolDecoder { } if (BitUtil.check(mask, 17)) { - position.set(Position.KEY_INPUT, Integer.parseInt(values[index++])); + String in = values[index++]; + position.set(Position.KEY_INPUT, Integer.parseInt(in)); + position.set(Position.KEY_IGNITION, in.charAt(7) == '1'); } if (BitUtil.check(mask, 18)) { |