diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-05-03 16:49:11 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-05-03 16:49:11 +1200 |
commit | 0d2867eb1d79ee0840c35d1e60860952e44eaab1 (patch) | |
tree | aa7539acbe837cce53118124f8e5961b0c6daa0b /src/org/traccar/protocol/TeltonikaProtocolDecoder.java | |
parent | ff1f4cc5a0ef001b104fb1e36a4e7e660b555910 (diff) | |
download | trackermap-server-0d2867eb1d79ee0840c35d1e60860952e44eaab1.tar.gz trackermap-server-0d2867eb1d79ee0840c35d1e60860952e44eaab1.tar.bz2 trackermap-server-0d2867eb1d79ee0840c35d1e60860952e44eaab1.zip |
Decode Teltonika green driving IO values
Diffstat (limited to 'src/org/traccar/protocol/TeltonikaProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/TeltonikaProtocolDecoder.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/TeltonikaProtocolDecoder.java b/src/org/traccar/protocol/TeltonikaProtocolDecoder.java index 3935ebd60..230db5dde 100644 --- a/src/org/traccar/protocol/TeltonikaProtocolDecoder.java +++ b/src/org/traccar/protocol/TeltonikaProtocolDecoder.java @@ -163,6 +163,29 @@ public class TeltonikaProtocolDecoder extends BaseProtocolDecoder { case 182: position.set(Position.KEY_HDOP, readValue(buf, length, false) * 0.1); break; + case 236: + if (readValue(buf, length, false) == 1) { + position.set(Position.KEY_ALARM, Position.ALARM_OVERSPEED); + } + break; + case 237: + position.set(Position.KEY_MOTION, readValue(buf, length, false) == 0); + break; + case 238: + switch ((int) readValue(buf, length, false)) { + case 1: + position.set(Position.KEY_ALARM, Position.ALARM_ACCELERATION); + break; + case 2: + position.set(Position.KEY_ALARM, Position.ALARM_BRAKING); + break; + case 3: + position.set(Position.KEY_ALARM, Position.ALARM_CORNERING); + break; + default: + break; + } + break; case 239: position.set(Position.KEY_IGNITION, readValue(buf, length, false) == 1); break; |