aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/Minifinder2ProtocolEncoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2024-02-19 11:53:08 -0800
committerAnton Tananaev <anton@traccar.org>2024-02-19 11:53:14 -0800
commitefd9e261791942334dbf4a911883a1b2b791f282 (patch)
tree8aa830282cd64b9b3a28e858865a8783b1eea3bc /src/main/java/org/traccar/protocol/Minifinder2ProtocolEncoder.java
parent26548bb534de6c9944ece5a2aa5216da83cb8819 (diff)
downloadtrackermap-server-efd9e261791942334dbf4a911883a1b2b791f282.tar.gz
trackermap-server-efd9e261791942334dbf4a911883a1b2b791f282.tar.bz2
trackermap-server-efd9e261791942334dbf4a911883a1b2b791f282.zip
Streamline model name access
Diffstat (limited to 'src/main/java/org/traccar/protocol/Minifinder2ProtocolEncoder.java')
-rw-r--r--src/main/java/org/traccar/protocol/Minifinder2ProtocolEncoder.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/protocol/Minifinder2ProtocolEncoder.java b/src/main/java/org/traccar/protocol/Minifinder2ProtocolEncoder.java
index 72ac9db4e..6e330a4dd 100644
--- a/src/main/java/org/traccar/protocol/Minifinder2ProtocolEncoder.java
+++ b/src/main/java/org/traccar/protocol/Minifinder2ProtocolEncoder.java
@@ -21,7 +21,6 @@ import org.traccar.BaseProtocolEncoder;
import org.traccar.Protocol;
import org.traccar.helper.Checksum;
import org.traccar.model.Command;
-import org.traccar.model.Device;
import java.nio.charset.StandardCharsets;
@@ -55,8 +54,7 @@ public class Minifinder2ProtocolEncoder extends BaseProtocolEncoder {
content.writeByte(0xF0); // type
}
- Device device = getCacheManager().getObject(Device.class, command.getDeviceId());
- if ("Nano".equalsIgnoreCase(device.getModel())) {
+ if ("Nano".equalsIgnoreCase(getDeviceModel(command.getDeviceId()))) {
ByteBuf content = Unpooled.buffer();
if (command.getType().equals(Command.TYPE_FIRMWARE_UPDATE)) {
String url = command.getString(Command.KEY_DATA);