diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java | 4 | ||||
-rw-r--r-- | src/main/java/org/traccar/protocol/RstProtocolDecoder.java | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java index b51da00d7..c435b6cec 100644 --- a/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java @@ -1001,7 +1001,7 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder { } else if (type == MSG_GPS_MODULAR) { - return decodeExtendedModular(channel, buf, deviceSession, type); + return decodeExtendedModular(buf, deviceSession); } else { @@ -1012,7 +1012,7 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder { return null; } - private Object decodeExtendedModular(Channel channel, ByteBuf buf, DeviceSession deviceSession, int type) { + private Object decodeExtendedModular(ByteBuf buf, DeviceSession deviceSession) { Position position = new Position(getProtocolName()); position.setDeviceId(deviceSession.getDeviceId()); diff --git a/src/main/java/org/traccar/protocol/RstProtocolDecoder.java b/src/main/java/org/traccar/protocol/RstProtocolDecoder.java index f9c8d9df8..8981c117b 100644 --- a/src/main/java/org/traccar/protocol/RstProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/RstProtocolDecoder.java @@ -122,7 +122,7 @@ public class RstProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_RSSI, parser.nextInt()); position.set(Position.PREFIX_TEMP + 1, (int) parser.nextHexInt().byteValue()); - int status = parser.nextHexInt() << 8 + parser.nextHexInt(); + int status = (parser.nextHexInt() << 8) + parser.nextHexInt(); position.set(Position.KEY_IGNITION, BitUtil.check(status, 7)); position.set(Position.KEY_STATUS, status); |