From 1a43a20487bf187c6c759eedce273b38159ea140 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 12 Sep 2015 21:38:17 +1200 Subject: Use protocol name for config keys --- src/org/traccar/protocol/GlobalSatProtocolDecoder.java | 4 ++-- src/org/traccar/protocol/Gt06ProtocolDecoder.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/org/traccar/protocol/GlobalSatProtocolDecoder.java b/src/org/traccar/protocol/GlobalSatProtocolDecoder.java index 04b88114f..2b36d7a9e 100644 --- a/src/org/traccar/protocol/GlobalSatProtocolDecoder.java +++ b/src/org/traccar/protocol/GlobalSatProtocolDecoder.java @@ -35,8 +35,8 @@ public class GlobalSatProtocolDecoder extends BaseProtocolDecoder { public GlobalSatProtocolDecoder(GlobalSatProtocol protocol) { super(protocol); - format0 = Context.getConfig().getString(protocol + ".format0", "TSPRXAB27GHKLMnaicz*U!"); - format1 = Context.getConfig().getString(protocol + ".format1", "SARY*U!"); + format0 = Context.getConfig().getString(getProtocolName() + ".format0", "TSPRXAB27GHKLMnaicz*U!"); + format1 = Context.getConfig().getString(getProtocolName() + ".format1", "SARY*U!"); } public void setFormat0(String format) { diff --git a/src/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/org/traccar/protocol/Gt06ProtocolDecoder.java index 018b42dc9..e16432275 100644 --- a/src/org/traccar/protocol/Gt06ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gt06ProtocolDecoder.java @@ -36,9 +36,9 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder { public Gt06ProtocolDecoder(Gt06Protocol protocol) { super(protocol); - if (Context.getConfig().hasKey(protocol + ".timezone")) { + if (Context.getConfig().hasKey(getProtocolName() + ".timezone")) { forceTimeZone = true; - timeZone.setRawOffset(Context.getConfig().getInteger(protocol + ".timezone") * 1000); + timeZone.setRawOffset(Context.getConfig().getInteger(getProtocolName() + ".timezone") * 1000); } } -- cgit v1.2.3