aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-09-04 22:09:24 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2020-09-04 22:09:24 -0700
commitb3c2d3ab3f1c77f989af1a42154d999b024df2fe (patch)
treef4bc823e4272133c31a22307cefb5cace0b10cd4 /src
parentf122c85a71603fddad2c92e48370a8dfafbddaf1 (diff)
downloadtraccar-server-b3c2d3ab3f1c77f989af1a42154d999b024df2fe.tar.gz
traccar-server-b3c2d3ab3f1c77f989af1a42154d999b024df2fe.tar.bz2
traccar-server-b3c2d3ab3f1c77f989af1a42154d999b024df2fe.zip
Decode missing parameters
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/traccar/protocol/StarLinkProtocolDecoder.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/StarLinkProtocolDecoder.java b/src/main/java/org/traccar/protocol/StarLinkProtocolDecoder.java
index f0c969870..f791df0f3 100644
--- a/src/main/java/org/traccar/protocol/StarLinkProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/StarLinkProtocolDecoder.java
@@ -203,11 +203,20 @@ public class StarLinkProtocolDecoder extends BaseProtocolDecoder {
case "#ENG#":
position.set("engine", data[i].equals("1"));
break;
+ case "#TS1#":
+ position.set("sensor1State", Integer.parseInt(data[i]));
+ break;
+ case "#TS2#":
+ position.set("sensor2State", Integer.parseInt(data[i]));
+ break;
case "#TD1#":
case "#TD2#":
StarLinkMessage.mEventReport_TDx message =
StarLinkMessage.mEventReport_TDx.parseFrom(DataConverter.parseBase64(data[i]));
position.set(
+ "sensor" + message.getSensorNumber() + "Id",
+ message.getSensorID());
+ position.set(
"sensor" + message.getSensorNumber() + "Temp",
message.getTemperature() * 0.1);
position.set(