aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Jt600ProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/Jt600ProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/Jt600ProtocolDecoder.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/Jt600ProtocolDecoder.java b/src/org/traccar/protocol/Jt600ProtocolDecoder.java
index ef20a9534..2bd02d3f1 100644
--- a/src/org/traccar/protocol/Jt600ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Jt600ProtocolDecoder.java
@@ -107,7 +107,7 @@ public class Jt600ProtocolDecoder extends BaseProtocolDecoder {
if (battery == 0xff) {
position.set(Position.KEY_CHARGE, true);
} else {
- position.set(Position.KEY_BATTERY, battery + "%");
+ position.set(Position.KEY_BATTERY_LEVEL, battery);
}
CellTower cellTower = CellTower.fromCidLac(buf.readUnsignedShort(), buf.readUnsignedShort());
@@ -218,7 +218,7 @@ public class Jt600ProtocolDecoder extends BaseProtocolDecoder {
.number("(d+.?d*),") // speed
.number("(d+),") // course
.number("(d+),") // satellites
- .number("(d+%),") // battery
+ .number("(d+)%,") // battery
.expression("([01]+),") // status
.number("(d+),") // cid
.number("(d+),") // lac
@@ -257,7 +257,7 @@ public class Jt600ProtocolDecoder extends BaseProtocolDecoder {
position.setCourse(parser.nextDouble(0));
position.set(Position.KEY_SATELLITES, parser.nextInt(0));
- position.set(Position.KEY_BATTERY, parser.next());
+ position.set(Position.KEY_BATTERY_LEVEL, parser.nextInt(0));
position.set(Position.KEY_STATUS, parser.nextBinInt(0));
CellTower cellTower = CellTower.fromCidLac(parser.nextInt(0), parser.nextInt(0));