aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-03-13 10:58:22 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-03-13 10:58:22 +1300
commit810faf1d9b5420a5a5b80e90f024c96c018e7844 (patch)
tree2baa6ac152e2dfc0074f425abb89c37c700ce258 /src/org
parent7568adcc9350dfaeb23645a92b5d63663509ddc6 (diff)
downloadtrackermap-server-810faf1d9b5420a5a5b80e90f024c96c018e7844.tar.gz
trackermap-server-810faf1d9b5420a5a5b80e90f024c96c018e7844.tar.bz2
trackermap-server-810faf1d9b5420a5a5b80e90f024c96c018e7844.zip
Add ignition support for Tramigo (fix #1771)
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/protocol/TramigoProtocolDecoder.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/TramigoProtocolDecoder.java b/src/org/traccar/protocol/TramigoProtocolDecoder.java
index 10bab3d6c..1fd427ecf 100644
--- a/src/org/traccar/protocol/TramigoProtocolDecoder.java
+++ b/src/org/traccar/protocol/TramigoProtocolDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2014 - 2015 Anton Tananaev (anton.tananaev@gmail.com)
+ * Copyright 2014 - 2016 Anton Tananaev (anton.tananaev@gmail.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -130,6 +130,12 @@ public class TramigoProtocolDecoder extends BaseProtocolDecoder {
position.setTime(DateUtil.correctYear(
dateFormat.parse(matcher.group(1) + " " + Calendar.getInstance().get(Calendar.YEAR))));
+ if (sentence.contains("Ignition on detected")) {
+ position.set(Event.KEY_IGNITION, true);
+ } else if (sentence.contains("Ignition off detected")) {
+ position.set(Event.KEY_IGNITION, false);
+ }
+
return position;
}