aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-08-23 21:55:09 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2021-08-23 21:55:09 -0700
commit0a98b2b5471526d9d166c4b81f1500fd1edb60df (patch)
tree1e27ea9432e60e957d851e5b16782628a854d12a /src/main
parente7b402ee1166a9c0610b45976da7a9528788628a (diff)
downloadtrackermap-server-0a98b2b5471526d9d166c4b81f1500fd1edb60df.tar.gz
trackermap-server-0a98b2b5471526d9d166c4b81f1500fd1edb60df.tar.bz2
trackermap-server-0a98b2b5471526d9d166c4b81f1500fd1edb60df.zip
Decode iStartek ignition
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/traccar/protocol/StartekProtocolDecoder.java8
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);