From f38ced7862c7eb635db25e52d61ef7956da58ce9 Mon Sep 17 00:00:00 2001 From: Edward Valley Date: Tue, 16 Jul 2019 23:05:26 -0400 Subject: Pass a Protocol object to encoders --- src/main/java/org/traccar/protocol/FifotrackProtocolEncoder.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main/java/org/traccar/protocol/FifotrackProtocolEncoder.java') diff --git a/src/main/java/org/traccar/protocol/FifotrackProtocolEncoder.java b/src/main/java/org/traccar/protocol/FifotrackProtocolEncoder.java index ff0a2e56e..a4e69b47b 100644 --- a/src/main/java/org/traccar/protocol/FifotrackProtocolEncoder.java +++ b/src/main/java/org/traccar/protocol/FifotrackProtocolEncoder.java @@ -18,9 +18,14 @@ package org.traccar.protocol; import org.traccar.StringProtocolEncoder; import org.traccar.helper.Checksum; import org.traccar.model.Command; +import org.traccar.Protocol; public class FifotrackProtocolEncoder extends StringProtocolEncoder { + public FifotrackProtocolEncoder(Protocol protocol) { + super(protocol); + } + private Object formatCommand(Command command, String content) { String uniqueId = getUniqueId(command.getDeviceId()); int length = 1 + uniqueId.length() + 3 + content.length(); -- cgit v1.2.3