aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-05-12 17:19:32 -0700
committerAnton Tananaev <anton@traccar.org>2022-05-12 17:19:32 -0700
commit78a3d28440b4de89eaab79664fef512e6e869030 (patch)
treec65cbe10cfd571d66710a8c93c9800c97aa006d6 /src/main/java/org
parentb8f0c159aa3e13e902305e4b68ad7f851696b69c (diff)
downloadtrackermap-server-78a3d28440b4de89eaab79664fef512e6e869030.tar.gz
trackermap-server-78a3d28440b4de89eaab79664fef512e6e869030.tar.bz2
trackermap-server-78a3d28440b4de89eaab79664fef512e6e869030.zip
Support Envotech IVM format
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/traccar/protocol/EnvotechProtocolDecoder.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/EnvotechProtocolDecoder.java b/src/main/java/org/traccar/protocol/EnvotechProtocolDecoder.java
index 347063547..65d5e3859 100644
--- a/src/main/java/org/traccar/protocol/EnvotechProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/EnvotechProtocolDecoder.java
@@ -48,7 +48,8 @@ public class EnvotechProtocolDecoder extends BaseProtocolDecoder {
.number("(ddd),") // battery
.number("(xx)") // inputs
.number("(xx),") // outputs
- .number("(xxx)?,") // fuel
+ .number("(xxx)?") // fuel
+ .number("(xxx)?,") // weight
.number("(x{8}),") // status
.expression("[^']*'")
.number("(dd)(dd)(dd)") // date (ddmmyy)
@@ -99,6 +100,7 @@ public class EnvotechProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.KEY_INPUT, parser.nextHexInt());
position.set(Position.PREFIX_OUT, parser.nextHexInt());
position.set(Position.KEY_FUEL_LEVEL, parser.nextHexInt());
+ position.set("weight", parser.nextHexInt());
position.set(Position.KEY_STATUS, parser.nextHexLong());
position.setFixTime(parser.nextDateTime(Parser.DateTimeFormat.DMY_HMS));