aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/LaipacSFKamelProtocolDecoder.java
diff options
context:
space:
mode:
authorKevin Goos <kevingoos@telenet.be>2018-03-19 10:41:35 +0100
committerKevin Goos <kevingoos@telenet.be>2018-03-19 10:41:35 +0100
commit7297c042cc1df171b4ca8959b46001d898c2373c (patch)
tree259288754673bd4bca518151d08a0ec966e6e0ec /src/org/traccar/protocol/LaipacSFKamelProtocolDecoder.java
parent97f42f8ecd5f8c9792354c5253273b56d12c0282 (diff)
downloadtrackermap-server-7297c042cc1df171b4ca8959b46001d898c2373c.tar.gz
trackermap-server-7297c042cc1df171b4ca8959b46001d898c2373c.tar.bz2
trackermap-server-7297c042cc1df171b4ca8959b46001d898c2373c.zip
Fixed analog keys
Diffstat (limited to 'src/org/traccar/protocol/LaipacSFKamelProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/LaipacSFKamelProtocolDecoder.java7
1 files changed, 4 insertions, 3 deletions
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()) {