From 8acd5f768df28622506a292b6efec0198f27967d Mon Sep 17 00:00:00 2001 From: lukasha12 <66280366+lukasha12@users.noreply.github.com> Date: Thu, 4 Jun 2020 18:05:28 +0200 Subject: Teltonika protocol - change Ecodriving io and movement (#4539) Teltonika protocol: changed Ecodriving from io238 to io253. removed io237. --- .../traccar/protocol/TeltonikaProtocolDecoder.java | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'src/main/java/org') diff --git a/src/main/java/org/traccar/protocol/TeltonikaProtocolDecoder.java b/src/main/java/org/traccar/protocol/TeltonikaProtocolDecoder.java index 36116cc5e..ab7aa4b43 100644 --- a/src/main/java/org/traccar/protocol/TeltonikaProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/TeltonikaProtocolDecoder.java @@ -315,10 +315,16 @@ public class TeltonikaProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_ALARM, Position.ALARM_OVERSPEED); } break; - case 237: - position.set(Position.KEY_MOTION, readValue(buf, length, false) == 0); + case 239: + position.set(Position.KEY_IGNITION, readValue(buf, length, false) == 1); + break; + case 240: + position.set(Position.KEY_MOTION, readValue(buf, length, false) == 1); break; - case 238: + case 241: + position.set(Position.KEY_OPERATOR, readValue(buf, length, false)); + break; + case 253: switch ((int) readValue(buf, length, false)) { case 1: position.set(Position.KEY_ALARM, Position.ALARM_ACCELERATION); @@ -333,15 +339,6 @@ public class TeltonikaProtocolDecoder extends BaseProtocolDecoder { break; } break; - case 239: - position.set(Position.KEY_IGNITION, readValue(buf, length, false) == 1); - break; - case 240: - position.set(Position.KEY_MOTION, readValue(buf, length, false) == 1); - break; - case 241: - position.set(Position.KEY_OPERATOR, readValue(buf, length, false)); - break; default: position.set(Position.PREFIX_IO + id, readValue(buf, length, false)); break; -- cgit v1.2.3