aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/MeiligaoProtocolEncoder.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/MeiligaoProtocolEncoder.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/MeiligaoProtocolEncoder.java')
-rw-r--r--src/main/java/org/traccar/protocol/MeiligaoProtocolEncoder.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/MeiligaoProtocolEncoder.java b/src/main/java/org/traccar/protocol/MeiligaoProtocolEncoder.java
index 5859d91ce..6d3b4f7e9 100644
--- a/src/main/java/org/traccar/protocol/MeiligaoProtocolEncoder.java
+++ b/src/main/java/org/traccar/protocol/MeiligaoProtocolEncoder.java
@@ -24,7 +24,6 @@ import org.traccar.helper.Checksum;
import org.traccar.helper.DataConverter;
import org.traccar.helper.model.AttributeUtil;
import org.traccar.model.Command;
-import org.traccar.model.Device;
import java.nio.charset.StandardCharsets;
import java.util.Set;
@@ -64,7 +63,7 @@ public class MeiligaoProtocolEncoder extends BaseProtocolEncoder {
int outputCount;
int outputType;
- String model = getCacheManager().getObject(Device.class, deviceId).getModel();
+ String model = getDeviceModel(deviceId);
if (model != null && Set.of("TK510", "GT08", "TK208", "TK228", "MT05").contains(model)) {
outputCount = 5;