aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar')
-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(