From 1948e0f63202dddca607dcb51fa9a92a83e49154 Mon Sep 17 00:00:00 2001 From: jon-stumpf Date: Fri, 10 Oct 2014 19:23:21 -0400 Subject: Eliminated the need for hardcoded protocol strings in the src/org/traccar/protocol/*ProtocolDecoder.java files. --- src/org/traccar/protocol/GatorProtocolDecoder.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/org/traccar/protocol/GatorProtocolDecoder.java') diff --git a/src/org/traccar/protocol/GatorProtocolDecoder.java b/src/org/traccar/protocol/GatorProtocolDecoder.java index 15a46d375..7f93082fd 100644 --- a/src/org/traccar/protocol/GatorProtocolDecoder.java +++ b/src/org/traccar/protocol/GatorProtocolDecoder.java @@ -33,6 +33,10 @@ public class GatorProtocolDecoder extends BaseProtocolDecoder { super(serverManager); } + public GatorProtocolDecoder(ServerManager serverManager, String protocol) { + super(serverManager, protocol); + } + private static final int PACKET_HEARTBEAT = 0x21; private static final int PACKET_POSITION_DATA = 0x80; private static final int PACKET_ROLLCALL_RESPONSE = 0x81; @@ -66,7 +70,7 @@ public class GatorProtocolDecoder extends BaseProtocolDecoder { // Create new position Position position = new Position(); - ExtendedInfoFormatter extendedInfo = new ExtendedInfoFormatter("gator"); + ExtendedInfoFormatter extendedInfo = new ExtendedInfoFormatter(getProtocol()); // Identification try { -- cgit v1.2.3