From 9bbb70a0eb76bd81c494c410772a31f19d6fd584 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 9 Sep 2016 21:50:58 +1200 Subject: Add more Meiligao parameters --- src/org/traccar/protocol/MeiligaoProtocolDecoder.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3