From d5dfbc2b8b70209e40231f5da27809548b4c8853 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 5 Jul 2017 04:53:34 +1200 Subject: Add new attribute keys (fix #3313) --- .../traccar/protocol/Gps103ProtocolDecoder.java | 4 +-- .../traccar/protocol/MeiligaoProtocolDecoder.java | 30 +++++++++++----------- 2 files changed, 17 insertions(+), 17 deletions(-) (limited to 'src/org/traccar/protocol') diff --git a/src/org/traccar/protocol/Gps103ProtocolDecoder.java b/src/org/traccar/protocol/Gps103ProtocolDecoder.java index ec8871865..f5ba3cff7 100644 --- a/src/org/traccar/protocol/Gps103ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gps103ProtocolDecoder.java @@ -211,8 +211,8 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_FUEL_CONSUMPTION, parser.nextDouble(0)); position.set(Position.KEY_HOURS, parser.nextInt()); position.set(Position.KEY_OBD_SPEED, parser.nextInt(0)); - position.set("powerLoad", parser.next()); - position.set(Position.PREFIX_TEMP + 1, parser.nextInt()); + position.set(Position.KEY_ENGINE_LOAD, parser.next()); + position.set(Position.KEY_COOLANT_TEMP, parser.nextInt()); position.set(Position.KEY_THROTTLE, parser.next()); position.set(Position.KEY_RPM, parser.nextInt(0)); position.set(Position.KEY_BATTERY, parser.nextDouble(0)); diff --git a/src/org/traccar/protocol/MeiligaoProtocolDecoder.java b/src/org/traccar/protocol/MeiligaoProtocolDecoder.java index 199feaf97..44e01d5e0 100644 --- a/src/org/traccar/protocol/MeiligaoProtocolDecoder.java +++ b/src/org/traccar/protocol/MeiligaoProtocolDecoder.java @@ -282,21 +282,21 @@ public class MeiligaoProtocolDecoder extends BaseProtocolDecoder { getLastLocation(position, null); - position.set(Position.KEY_BATTERY, parser.nextDouble(0)); - position.set(Position.KEY_RPM, parser.nextInt(0)); - position.set(Position.KEY_OBD_SPEED, parser.nextInt(0)); - position.set(Position.KEY_THROTTLE, parser.nextDouble(0)); - position.set("engineLoad", parser.nextDouble(0)); - position.set(Position.PREFIX_TEMP + 1, parser.nextInt(0)); - position.set(Position.KEY_FUEL_CONSUMPTION, parser.nextDouble(0)); - position.set("averageFuelConsumption", parser.nextDouble(0)); - position.set("drivingRange", parser.nextDouble(0)); - position.set(Position.KEY_ODOMETER, parser.nextDouble(0)); - position.set("singleFuelConsumption", parser.nextDouble(0)); - position.set("totalFuelConsumption", parser.nextDouble(0)); - position.set(Position.KEY_DTCS, parser.nextInt(0)); - position.set("harshAcelerationNo", parser.nextInt(0)); - position.set("harshBreakerNo", parser.nextInt(0)); + position.set(Position.KEY_BATTERY, parser.nextDouble()); + position.set(Position.KEY_RPM, parser.nextInt()); + position.set(Position.KEY_OBD_SPEED, parser.nextInt()); + position.set(Position.KEY_THROTTLE, parser.nextDouble()); + position.set(Position.KEY_ENGINE_LOAD, parser.nextDouble()); + position.set(Position.KEY_COOLANT_TEMP, parser.nextInt()); + position.set(Position.KEY_FUEL_CONSUMPTION, parser.nextDouble()); + position.set("averageFuelConsumption", parser.nextDouble()); + position.set("drivingRange", parser.nextDouble()); + position.set(Position.KEY_ODOMETER, parser.nextDouble()); + position.set("singleFuelConsumption", parser.nextDouble()); + position.set("totalFuelConsumption", parser.nextDouble()); + position.set(Position.KEY_DTCS, parser.nextInt()); + position.set("harshAcelerationNo", parser.nextInt()); + position.set("harshBreakerNo", parser.nextInt()); return position; } -- cgit v1.2.3