diff options
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r-- | src/main/java/org/traccar/protocol/StartekProtocolDecoder.java | 8 |
1 files changed, 6 insertions, 2 deletions
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); |