diff options
author | jon-stumpf <jon.stumpf@gmail.com> | 2017-02-25 21:02:31 -0500 |
---|---|---|
committer | jon-stumpf <jon.stumpf@gmail.com> | 2017-03-04 16:00:16 -0500 |
commit | e849902d7a5aa564bd930465f04f6d4b8498ddf2 (patch) | |
tree | 1730c6d07fe941e3bbe0f6801003b7a6f4f32028 /src/org/traccar | |
parent | 2d6adb7ba45ae0668e0084e85441ad275ebfb7eb (diff) | |
download | trackermap-server-e849902d7a5aa564bd930465f04f6d4b8498ddf2.tar.gz trackermap-server-e849902d7a5aa564bd930465f04f6d4b8498ddf2.tar.bz2 trackermap-server-e849902d7a5aa564bd930465f04f6d4b8498ddf2.zip |
Renamed Position.KEY_TRIP_ODOMETER to Position.KEY_ODOMETER_TRIP;
Diffstat (limited to 'src/org/traccar')
7 files changed, 9 insertions, 9 deletions
diff --git a/src/org/traccar/model/Position.java b/src/org/traccar/model/Position.java index 54c97c373..9083f070d 100644 --- a/src/org/traccar/model/Position.java +++ b/src/org/traccar/model/Position.java @@ -32,7 +32,7 @@ public class Position extends Message { public static final String KEY_ALARM = "alarm"; public static final String KEY_STATUS = "status"; public static final String KEY_ODOMETER = "odometer"; // meters - public static final String KEY_TRIP_ODOMETER = "tripOdometer"; + public static final String KEY_ODOMETER_TRIP = "tripOdometer"; public static final String KEY_HOURS = "hours"; public static final String KEY_INPUT = "input"; public static final String KEY_OUTPUT = "output"; diff --git a/src/org/traccar/protocol/AplicomProtocolDecoder.java b/src/org/traccar/protocol/AplicomProtocolDecoder.java index f6b97435b..d5779a8d8 100644 --- a/src/org/traccar/protocol/AplicomProtocolDecoder.java +++ b/src/org/traccar/protocol/AplicomProtocolDecoder.java @@ -332,7 +332,7 @@ public class AplicomProtocolDecoder extends BaseProtocolDecoder { } if ((selector & 0x0100) != 0) { - position.set(Position.KEY_TRIP_ODOMETER, buf.readUnsignedInt() * 5); + position.set(Position.KEY_ODOMETER_TRIP, buf.readUnsignedInt() * 5); } if ((selector & 0x8000) != 0) { @@ -464,7 +464,7 @@ public class AplicomProtocolDecoder extends BaseProtocolDecoder { position.set("brakeTemperature", buf.readUnsignedByte() * 10); } else if (type == 0x06) { position.set(Position.KEY_ODOMETER, buf.readUnsignedInt() * 5); - position.set(Position.KEY_TRIP_ODOMETER, buf.readUnsignedInt() * 5); + position.set(Position.KEY_ODOMETER_TRIP, buf.readUnsignedInt() * 5); position.set("serviceDistance", (buf.readUnsignedInt() - 2105540607) * 5); } else if (type == 0x0A) { ChannelBuffer brakeData = buf.readBytes(length); diff --git a/src/org/traccar/protocol/AstraProtocolDecoder.java b/src/org/traccar/protocol/AstraProtocolDecoder.java index 215ef6650..fc70aebb3 100644 --- a/src/org/traccar/protocol/AstraProtocolDecoder.java +++ b/src/org/traccar/protocol/AstraProtocolDecoder.java @@ -93,7 +93,7 @@ public class AstraProtocolDecoder extends BaseProtocolDecoder { buf.readUnsignedByte(); // max journey speed buf.skipBytes(6); // accelerometer - position.set(Position.KEY_TRIP_ODOMETER, buf.readUnsignedShort()); // journey distance + position.set(Position.KEY_ODOMETER_TRIP, buf.readUnsignedShort()); // journey distance buf.readUnsignedShort(); // journey idle time position.setAltitude(buf.readUnsignedByte() * 20); diff --git a/src/org/traccar/protocol/CastelProtocolDecoder.java b/src/org/traccar/protocol/CastelProtocolDecoder.java index f61c76f9f..52d7f4edb 100644 --- a/src/org/traccar/protocol/CastelProtocolDecoder.java +++ b/src/org/traccar/protocol/CastelProtocolDecoder.java @@ -178,7 +178,7 @@ public class CastelProtocolDecoder extends BaseProtocolDecoder { buf.readUnsignedInt(); // ACC ON time buf.readUnsignedInt(); // UTC time position.set(Position.KEY_ODOMETER, buf.readUnsignedInt()); - position.set(Position.KEY_TRIP_ODOMETER, buf.readUnsignedInt()); // trip odometer + position.set(Position.KEY_ODOMETER_TRIP, buf.readUnsignedInt()); // trip odometer position.set(Position.KEY_FUEL_CONSUMPTION, buf.readUnsignedInt()); // total fuel consumption buf.readUnsignedShort(); // current fuel consumption position.set(Position.KEY_STATUS, buf.readUnsignedInt()); @@ -276,7 +276,7 @@ public class CastelProtocolDecoder extends BaseProtocolDecoder { for (int i = 0; i < count; i++) { Position position = readPosition(deviceSession, buf); position.set(Position.KEY_ODOMETER, odometer); - position.set(Position.KEY_TRIP_ODOMETER, tripOdometer); + position.set(Position.KEY_ODOMETER_TRIP, tripOdometer); position.set(Position.KEY_FUEL_CONSUMPTION, fuelConsumption); position.set(Position.KEY_STATUS, status); positions.add(position); diff --git a/src/org/traccar/protocol/RitiProtocolDecoder.java b/src/org/traccar/protocol/RitiProtocolDecoder.java index 1ca517057..087d4e63b 100644 --- a/src/org/traccar/protocol/RitiProtocolDecoder.java +++ b/src/org/traccar/protocol/RitiProtocolDecoder.java @@ -74,7 +74,7 @@ public class RitiProtocolDecoder extends BaseProtocolDecoder { buf.readUnsignedShort(); position.set(Position.KEY_DISTANCE, buf.readUnsignedInt()); - position.set(Position.KEY_TRIP_ODOMETER, buf.readUnsignedInt()); + position.set(Position.KEY_ODOMETER_TRIP, buf.readUnsignedInt()); // Parse GPRMC int end = buf.indexOf(buf.readerIndex(), buf.writerIndex(), (byte) '*'); diff --git a/src/org/traccar/protocol/SkypatrolProtocolDecoder.java b/src/org/traccar/protocol/SkypatrolProtocolDecoder.java index 915426f15..56b53cb38 100644 --- a/src/org/traccar/protocol/SkypatrolProtocolDecoder.java +++ b/src/org/traccar/protocol/SkypatrolProtocolDecoder.java @@ -154,7 +154,7 @@ public class SkypatrolProtocolDecoder extends BaseProtocolDecoder { } if (BitUtil.check(mask, 20)) { - position.set(Position.KEY_TRIP_ODOMETER, buf.readUnsignedInt()); + position.set(Position.KEY_ODOMETER_TRIP, buf.readUnsignedInt()); } if (BitUtil.check(mask, 21)) { diff --git a/src/org/traccar/protocol/TytanProtocolDecoder.java b/src/org/traccar/protocol/TytanProtocolDecoder.java index 429479de0..f7d69bfd0 100644 --- a/src/org/traccar/protocol/TytanProtocolDecoder.java +++ b/src/org/traccar/protocol/TytanProtocolDecoder.java @@ -49,7 +49,7 @@ public class TytanProtocolDecoder extends BaseProtocolDecoder { switch (type) { case 2: - position.set(Position.KEY_TRIP_ODOMETER, buf.readUnsignedMedium()); + position.set(Position.KEY_ODOMETER_TRIP, buf.readUnsignedMedium()); break; case 5: position.set(Position.KEY_INPUT, buf.readUnsignedByte()); |