aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/traccar/protocol/EskyProtocolDecoder.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/EskyProtocolDecoder.java b/src/main/java/org/traccar/protocol/EskyProtocolDecoder.java
index 1a4f9b906..14b4376d5 100644
--- a/src/main/java/org/traccar/protocol/EskyProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/EskyProtocolDecoder.java
@@ -53,6 +53,7 @@ public class EskyProtocolDecoder extends BaseProtocolDecoder {
.number("(d+)[+;]") // message type
.number("(d+)[+;]") // odometer
.groupEnd("?")
+ .number("(d+)[+;]") // adc 1
.number("(d+)") // voltage
.any()
.compile();
@@ -93,7 +94,8 @@ public class EskyProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.KEY_ODOMETER, parser.nextInt());
}
- position.set(Position.KEY_BATTERY, parser.nextInt() * 0.001);
+ position.set(Position.PREFIX_ADC + 1, parser.nextInt());
+ position.set(Position.KEY_BATTERY, parser.nextInt() * 0.01);
int index = sentence.lastIndexOf('+');
if (index > 0 && channel instanceof DatagramChannel) {