diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-03-04 22:40:46 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-03-04 22:40:46 -0800 |
commit | bc81692c898481cd71ddc54bf05c099796132b5f (patch) | |
tree | ab248280421fb91f585e511d7516e0fbf724a6fc /src/main/java/org/traccar/protocol | |
parent | 6b7bec4554134517b2f1835d0eb86365e4a8fe42 (diff) | |
download | trackermap-server-bc81692c898481cd71ddc54bf05c099796132b5f.tar.gz trackermap-server-bc81692c898481cd71ddc54bf05c099796132b5f.tar.bz2 trackermap-server-bc81692c898481cd71ddc54bf05c099796132b5f.zip |
Decode ignition value
Diffstat (limited to 'src/main/java/org/traccar/protocol')
-rw-r--r-- | src/main/java/org/traccar/protocol/StarLinkProtocolDecoder.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/StarLinkProtocolDecoder.java b/src/main/java/org/traccar/protocol/StarLinkProtocolDecoder.java index bad6f03a9..2d1613e03 100644 --- a/src/main/java/org/traccar/protocol/StarLinkProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/StarLinkProtocolDecoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 - 2019 Anton Tananaev (anton@traccar.org) + * Copyright 2017 - 2020 Anton Tananaev (anton@traccar.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -140,6 +140,11 @@ public class StarLinkProtocolDecoder extends BaseProtocolDecoder { event = Integer.parseInt(data[i]); position.set(Position.KEY_ALARM, decodeAlarm(event)); position.set(Position.KEY_EVENT, event); + if (event == 24) { + position.set(Position.KEY_IGNITION, true); + } else if (event == 25) { + position.set(Position.KEY_IGNITION, false); + } break; case "#PDT#": position.setFixTime(dateFormat.parse(data[i])); |