From b3c2d3ab3f1c77f989af1a42154d999b024df2fe Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 4 Sep 2020 22:09:24 -0700 Subject: Decode missing parameters --- src/main/java/org/traccar/protocol/StarLinkProtocolDecoder.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/main/java') 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,10 +203,19 @@ 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); -- cgit v1.2.3