aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-09-09 21:50:58 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2016-09-09 21:50:58 +1200
commit9bbb70a0eb76bd81c494c410772a31f19d6fd584 (patch)
treef4dabb4352cd24569fe7945c368afdfaea3d8b45 /src
parentb425f82d2a17ce7a4ddbab5abfecf493998d6618 (diff)
downloadtraccar-server-9bbb70a0eb76bd81c494c410772a31f19d6fd584.tar.gz
traccar-server-9bbb70a0eb76bd81c494c410772a31f19d6fd584.tar.bz2
traccar-server-9bbb70a0eb76bd81c494c410772a31f19d6fd584.zip
Add more Meiligao parameters
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/protocol/MeiligaoProtocolDecoder.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/org/traccar/protocol/MeiligaoProtocolDecoder.java b/src/org/traccar/protocol/MeiligaoProtocolDecoder.java
index 3510b56a3..f1a87f4b7 100644
--- a/src/org/traccar/protocol/MeiligaoProtocolDecoder.java
+++ b/src/org/traccar/protocol/MeiligaoProtocolDecoder.java
@@ -85,14 +85,14 @@ public class MeiligaoProtocolDecoder extends BaseProtocolDecoder {
.number("(d+),") // rpm
.number("(d+),") // speed
.number("(d+.d+),") // throttle
- .number("d+.d+,") // engine load
+ .number("(d+.d+),") // engine load
.number("(-?d+),") // coolant temp
.number("d+.d+,") // instantaneous fuel
.number("(d+.d+),") // average fuel
- .number("d+.d+,") // driving range
+ .number("(d+.d+),") // driving range
.number("(d+.?d*),") // odometer
- .number("d+.d+,")
- .number("d+.d+,")
+ .number("(d+.d+),")
+ .number("(d+.d+),")
.number("(d+),") // error code count
.number("d+,") // harsh acceleration count
.number("d+") // harsh break count
@@ -281,9 +281,13 @@ public class MeiligaoProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.KEY_RPM, parser.nextInt());
position.set(Position.KEY_OBD_SPEED, parser.nextInt());
position.set(Position.KEY_THROTTLE, parser.nextDouble());
+ position.set("engineLoad", parser.nextDouble());
position.set(Position.PREFIX_TEMP + 1, parser.nextInt());
position.set(Position.KEY_FUEL_CONSUMPTION, parser.nextDouble());
- position.set(Position.KEY_ODOMETER, parser.nextDouble());
+ position.set("drivingRange", parser.nextDouble() * 1000);
+ position.set(Position.KEY_ODOMETER, parser.nextDouble() * 1000);
+ position.set("singleFuelConsumption", parser.nextDouble());
+ position.set("totalFuelConsumption", parser.nextDouble());
return position;
}