From 2199e490e0c47a267caab2795cdfe023aca1238d Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 31 Mar 2020 21:41:10 -0700 Subject: Decode engine data --- src/main/java/org/traccar/protocol/OmnicommProtocolDecoder.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main/java/org/traccar') diff --git a/src/main/java/org/traccar/protocol/OmnicommProtocolDecoder.java b/src/main/java/org/traccar/protocol/OmnicommProtocolDecoder.java index 6e9cf52a5..99f5c074c 100644 --- a/src/main/java/org/traccar/protocol/OmnicommProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/OmnicommProtocolDecoder.java @@ -24,6 +24,7 @@ import org.traccar.BaseProtocolDecoder; import org.traccar.DeviceSession; import org.traccar.NetworkMessage; import org.traccar.Protocol; +import org.traccar.helper.BitUtil; import org.traccar.helper.Checksum; import org.traccar.helper.UnitsConverter; import org.traccar.model.Position; @@ -115,6 +116,8 @@ public class OmnicommProtocolDecoder extends BaseProtocolDecoder { OmnicommMessageOuterClass.OmnicommMessage.General data = message.getGeneral(); position.set(Position.KEY_POWER, data.getUboard() * 0.1); position.set(Position.KEY_BATTERY_LEVEL, data.getBatLife()); + position.set(Position.KEY_IGNITION, BitUtil.check(data.getFLG(), 0)); + position.set(Position.KEY_RPM, data.getTImp()); } if (message.hasNAV()) { -- cgit v1.2.3