aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-07-08 07:36:01 -0700
committerAnton Tananaev <anton@traccar.org>2023-07-08 07:36:01 -0700
commit5b5f5d04863d3ca766c66441d8e1a8925e3e3d41 (patch)
tree1a05a38986b7031a2e2d9d497ec7d7f97b495a3f
parent7a59e7a1924bcab3184d1031273c51c9211a842a (diff)
downloadtrackermap-server-5b5f5d04863d3ca766c66441d8e1a8925e3e3d41.tar.gz
trackermap-server-5b5f5d04863d3ca766c66441d8e1a8925e3e3d41.tar.bz2
trackermap-server-5b5f5d04863d3ca766c66441d8e1a8925e3e3d41.zip
Fix format config
-rw-r--r--src/main/java/org/traccar/config/Keys.java2
-rw-r--r--src/main/java/org/traccar/protocol/StarLinkProtocolDecoder.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/config/Keys.java b/src/main/java/org/traccar/config/Keys.java
index e171511e6..6f5360c22 100644
--- a/src/main/java/org/traccar/config/Keys.java
+++ b/src/main/java/org/traccar/config/Keys.java
@@ -238,7 +238,7 @@ public final class Keys {
*/
public static final ConfigSuffix<String> PROTOCOL_FORMAT = new StringConfigSuffix(
".format",
- List.of(KeyType.DEVICE));
+ List.of(KeyType.CONFIG, KeyType.DEVICE));
/**
* Protocol date format. Used by protocols that have configurable date format.
diff --git a/src/main/java/org/traccar/protocol/StarLinkProtocolDecoder.java b/src/main/java/org/traccar/protocol/StarLinkProtocolDecoder.java
index aa23bfac5..193005e28 100644
--- a/src/main/java/org/traccar/protocol/StarLinkProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/StarLinkProtocolDecoder.java
@@ -61,10 +61,10 @@ public class StarLinkProtocolDecoder extends BaseProtocolDecoder {
@Override
protected void init() {
setFormat(getConfig().getString(
- getProtocolName() + ".format", "#EDT#,#EID#,#PDT#,#LAT#,#LONG#,#SPD#,#HEAD#,#ODO#,"
+ Keys.PROTOCOL_FORMAT.withPrefix(getProtocolName()), "#EDT#,#EID#,#PDT#,#LAT#,#LONG#,#SPD#,#HEAD#,#ODO#,"
+ "#IN1#,#IN2#,#IN3#,#IN4#,#OUT1#,#OUT2#,#OUT3#,#OUT4#,#LAC#,#CID#,#VIN#,#VBAT#,#DEST#,#IGN#,#ENG#"));
- setDateFormat(getConfig().getString(getProtocolName() + ".dateFormat", "yyMMddHHmmss"));
+ setDateFormat(getConfig().getString(Keys.PROTOCOL_DATE_FORMAT.withPrefix(getProtocolName()), "yyMMddHHmmss"));
}
public String[] getFormat(long deviceId) {