diff options
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/traccar/protocol/TramigoProtocolDecoder.java | 8 |
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; } |