diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/org/traccar/model/Position.java | 2 | ||||
-rw-r--r-- | src/org/traccar/protocol/LaipacSFKamelProtocolDecoder.java | 7 | ||||
-rw-r--r-- | src/org/traccar/protocol/OsmAndProtocolDecoder.java | 2 |
3 files changed, 5 insertions, 6 deletions
diff --git a/src/org/traccar/model/Position.java b/src/org/traccar/model/Position.java index 0e8bd9a6e..65bd03de6 100644 --- a/src/org/traccar/model/Position.java +++ b/src/org/traccar/model/Position.java @@ -52,8 +52,6 @@ public class Position extends Message { public static final String KEY_BATTERY_LEVEL = "batteryLevel"; // percentage public static final String KEY_FUEL_LEVEL = "fuel"; // liters public static final String KEY_FUEL_CONSUMPTION = "fuelConsumption"; // liters/hour - public static final String KEY_ANALOG_1 = "analog 1"; // volts - public static final String KEY_ANALOG_2 = "analog 2"; // volts public static final String KEY_VERSION_FW = "versionFw"; public static final String KEY_VERSION_HW = "versionHw"; diff --git a/src/org/traccar/protocol/LaipacSFKamelProtocolDecoder.java b/src/org/traccar/protocol/LaipacSFKamelProtocolDecoder.java index 60a6b2468..925b032a9 100644 --- a/src/org/traccar/protocol/LaipacSFKamelProtocolDecoder.java +++ b/src/org/traccar/protocol/LaipacSFKamelProtocolDecoder.java @@ -61,7 +61,8 @@ public class LaipacSFKamelProtocolDecoder extends BaseProtocolDecoder { .compile(); @Override - protected Object decode(Channel channel, SocketAddress remoteAddress, Object msg) throws Exception { + protected Object decode( + Channel channel, SocketAddress remoteAddress, Object msg) throws Exception { String sentence = (String) msg; if (sentence.startsWith("$ECHK") && channel != null) { @@ -106,8 +107,8 @@ public class LaipacSFKamelProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_BATTERY, parser.nextDouble() * 0.001); position.set(Position.KEY_TOTAL_DISTANCE, parser.nextDouble()); position.set(Position.KEY_GPS, parser.nextInt()); - position.set(Position.KEY_ANALOG_1, parser.nextDouble() * 0.001); - position.set(Position.KEY_ANALOG_2, parser.nextDouble() * 0.001); + position.set(Position.PREFIX_ADC + 1, parser.nextDouble() * 0.001); + position.set(Position.PREFIX_ADC + 2, parser.nextDouble() * 0.001); String checksum = parser.next(); if (parser.hasNext()) { diff --git a/src/org/traccar/protocol/OsmAndProtocolDecoder.java b/src/org/traccar/protocol/OsmAndProtocolDecoder.java index a9e411978..03abdd588 100644 --- a/src/org/traccar/protocol/OsmAndProtocolDecoder.java +++ b/src/org/traccar/protocol/OsmAndProtocolDecoder.java @@ -43,7 +43,7 @@ public class OsmAndProtocolDecoder extends BaseHttpProtocolDecoder { @Override protected Object decode( - Channel channel, SocketAddress remoteAddress, Object msg) throws Exception { + Channel channel, SocketAddress remoteAddress, Object msg) throws Exception { HttpRequest request = (HttpRequest) msg; QueryStringDecoder decoder = new QueryStringDecoder(request.getUri()); |