diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-09-04 22:09:24 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-09-04 22:09:24 -0700 |
commit | b3c2d3ab3f1c77f989af1a42154d999b024df2fe (patch) | |
tree | f4bc823e4272133c31a22307cefb5cace0b10cd4 /src/main/java | |
parent | f122c85a71603fddad2c92e48370a8dfafbddaf1 (diff) | |
download | traccar-server-b3c2d3ab3f1c77f989af1a42154d999b024df2fe.tar.gz traccar-server-b3c2d3ab3f1c77f989af1a42154d999b024df2fe.tar.bz2 traccar-server-b3c2d3ab3f1c77f989af1a42154d999b024df2fe.zip |
Decode missing parameters
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/traccar/protocol/StarLinkProtocolDecoder.java | 9 |
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( |