From 0a98b2b5471526d9d166c4b81f1500fd1edb60df Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 23 Aug 2021 21:55:09 -0700 Subject: Decode iStartek ignition --- src/main/java/org/traccar/protocol/StartekProtocolDecoder.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/org/traccar/protocol/StartekProtocolDecoder.java b/src/main/java/org/traccar/protocol/StartekProtocolDecoder.java index aae764993..b791e7bdd 100644 --- a/src/main/java/org/traccar/protocol/StartekProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/StartekProtocolDecoder.java @@ -168,8 +168,12 @@ public class StartekProtocolDecoder extends BaseProtocolDecoder { parser.nextInt(), parser.nextInt(), parser.nextHexInt(), parser.nextHexInt(), parser.nextInt()))); position.set(Position.KEY_STATUS, parser.nextHexInt()); - position.set(Position.KEY_INPUT, parser.nextHexInt()); - position.set(Position.KEY_OUTPUT, parser.nextHexInt()); + + int input = parser.nextHexInt(); + int output = parser.nextHexInt(); + position.set(Position.KEY_IGNITION, BitUtil.check(input, 1)); + position.set(Position.KEY_INPUT, input); + position.set(Position.KEY_OUTPUT, output); position.set(Position.KEY_POWER, parser.nextHexInt() * 0.01); position.set(Position.KEY_BATTERY, parser.nextHexInt() * 0.01); -- cgit v1.2.3