aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-05-25 20:08:58 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2021-05-25 20:08:58 -0700
commit0e050e0f85422377096abd0ee8e7deead693c41a (patch)
treeab6fa35c65f3ca065fa40608a23c5c39432a7473
parent9af428e5ca6a00fc809eb74f576c71485d36f076 (diff)
downloadtraccar-server-0e050e0f85422377096abd0ee8e7deead693c41a.tar.gz
traccar-server-0e050e0f85422377096abd0ee8e7deead693c41a.tar.bz2
traccar-server-0e050e0f85422377096abd0ee8e7deead693c41a.zip
Decode ignition value
-rw-r--r--src/main/java/org/traccar/protocol/FlexibleReportProtocolDecoder.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/FlexibleReportProtocolDecoder.java b/src/main/java/org/traccar/protocol/FlexibleReportProtocolDecoder.java
index 339eccb37..759f2cd6f 100644
--- a/src/main/java/org/traccar/protocol/FlexibleReportProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/FlexibleReportProtocolDecoder.java
@@ -145,7 +145,9 @@ public class FlexibleReportProtocolDecoder extends BaseProtocolDecoder {
buf.readUnsignedByte(); // rssi
}
if (BitUtil.check(mask, 12)) {
- position.set(Position.PREFIX_IO + 1, buf.readUnsignedByte());
+ int inputs = buf.readUnsignedByte();
+ position.set(Position.KEY_IGNITION, BitUtil.check(inputs, 0));
+ position.set(Position.PREFIX_IO + 1, inputs);
}
if (BitUtil.check(mask, 13)) {
position.set(Position.PREFIX_IO + 2, buf.readUnsignedByte());