From 582812218089fa5aa34675af6d97e0c15e0f6c07 Mon Sep 17 00:00:00 2001 From: Evgeny S Maksimov Date: Sun, 13 Jan 2019 12:00:04 +0300 Subject: Fixed output field for F4 format --- src/org/traccar/protocol/NavisProtocolDecoder.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/org/traccar/protocol/NavisProtocolDecoder.java b/src/org/traccar/protocol/NavisProtocolDecoder.java index 6476d3dfb..83088e9f0 100644 --- a/src/org/traccar/protocol/NavisProtocolDecoder.java +++ b/src/org/traccar/protocol/NavisProtocolDecoder.java @@ -113,14 +113,13 @@ public class NavisProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_STATUS, buf.readUnsignedByte()); position.set(Position.KEY_RSSI, buf.readUnsignedByte()); - // NOTE: Needs testing if (isFormat(format, F10, F20, F30)) { position.set(Position.KEY_OUTPUT, buf.readUnsignedShortLE()); - } else if (isFormat(format, F40, F50, F51, F52)) { + } else if (isFormat(format, F50, F51, F52)) { int extField = buf.readUnsignedByte(); position.set(Position.KEY_OUTPUT, extField & 0x3); position.set(Position.KEY_SATELLITES, extField >> 2); - } else if (isFormat(format, F60)) { + } else if (isFormat(format, F40, F60)) { position.set(Position.KEY_OUTPUT, buf.readUnsignedByte() & 0xF); } -- cgit v1.2.3