diff options
author | Rafael Guterres <guterresrafael@gmail.com> | 2015-11-27 03:45:22 -0200 |
---|---|---|
committer | Rafael Guterres <guterresrafael@gmail.com> | 2015-11-27 03:45:22 -0200 |
commit | ca06e8d38c0bbd5a68e63ebada8e115da252b055 (patch) | |
tree | 39c00c4ceb571cae540d4c25d38ad3d45c72b49c /src/org/traccar/protocol/Tk103ProtocolDecoder.java | |
parent | c57bd2d472467b1b3a45aee1b97c9a0aeef5958a (diff) | |
parent | 7db2eb1ad224bf00608ebbcfe13bfa7fd519a7fc (diff) | |
download | traccar-server-ca06e8d38c0bbd5a68e63ebada8e115da252b055.tar.gz traccar-server-ca06e8d38c0bbd5a68e63ebada8e115da252b055.tar.bz2 traccar-server-ca06e8d38c0bbd5a68e63ebada8e115da252b055.zip |
Merge tananaev/master
Conflicts:
src/org/traccar/web/WebServer.java
Diffstat (limited to 'src/org/traccar/protocol/Tk103ProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/Tk103ProtocolDecoder.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/Tk103ProtocolDecoder.java b/src/org/traccar/protocol/Tk103ProtocolDecoder.java index 6fa4edb06..e8d0d210d 100644 --- a/src/org/traccar/protocol/Tk103ProtocolDecoder.java +++ b/src/org/traccar/protocol/Tk103ProtocolDecoder.java @@ -154,6 +154,11 @@ public class Tk103ProtocolDecoder extends BaseProtocolDecoder { } position.setDeviceId(getDeviceId()); + int alarm = sentence.indexOf("BO01"); + if (alarm != -1) { + position.set(Event.KEY_ALARM, Integer.parseInt(sentence.substring(alarm + 4, alarm + 5))); + } + DateBuilder dateBuilder = new DateBuilder(); if (parser.next() == null) { dateBuilder.setDate(parser.nextInt(), parser.nextInt(), parser.nextInt()); |