diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-04-18 02:49:43 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-04-18 02:49:43 +1200 |
commit | 4a5eece13341722fbd20d299ce28bbbcdfc146bd (patch) | |
tree | 113c13d143e1101f82aef69207c8a50f93432061 /src/org | |
parent | b8d998875277a59a7d18f71fc725ba32ac61eda3 (diff) | |
download | traccar-server-4a5eece13341722fbd20d299ce28bbbcdfc146bd.tar.gz traccar-server-4a5eece13341722fbd20d299ce28bbbcdfc146bd.tar.bz2 traccar-server-4a5eece13341722fbd20d299ce28bbbcdfc146bd.zip |
Implement Teltonika tachograph driver decoding
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/traccar/protocol/TeltonikaProtocolDecoder.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/TeltonikaProtocolDecoder.java b/src/org/traccar/protocol/TeltonikaProtocolDecoder.java index d2069e6c9..3935ebd60 100644 --- a/src/org/traccar/protocol/TeltonikaProtocolDecoder.java +++ b/src/org/traccar/protocol/TeltonikaProtocolDecoder.java @@ -141,6 +141,16 @@ public class TeltonikaProtocolDecoder extends BaseProtocolDecoder { case 80: position.set("workMode", readValue(buf, length, false)); break; + case 129: + case 130: + case 131: + case 132: + case 133: + case 134: + String driver = id == 129 || id == 132 ? "" : position.getString("driver1"); + position.set("driver" + (id >= 132 ? 2 : 1), + driver + buf.readBytes(length).toString(StandardCharsets.US_ASCII).trim()); + break; case 179: position.set(Position.PREFIX_OUT + 1, readValue(buf, length, false) == 1); break; |