aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/protocol/WatchProtocolDecoder.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/WatchProtocolDecoder.java b/src/org/traccar/protocol/WatchProtocolDecoder.java
index f0d06a3cc..ad43215a2 100644
--- a/src/org/traccar/protocol/WatchProtocolDecoder.java
+++ b/src/org/traccar/protocol/WatchProtocolDecoder.java
@@ -65,7 +65,7 @@ public class WatchProtocolDecoder extends BaseProtocolDecoder {
.number("d+,") // tumbles
.number("(x+),") // status
.expression("([^\\]]*)") // cell and wifi
- .text("]").optional()
+ .text("]")
.compile();
private void sendResponse(Channel channel, String manufacturer, String id, String content) {
@@ -160,7 +160,8 @@ public class WatchProtocolDecoder extends BaseProtocolDecoder {
getLastLocation(position, null);
- position.set(Position.KEY_BATTERY_LEVEL, Integer.parseInt(values[3]));
+ position.set(Position.KEY_BATTERY_LEVEL,
+ Integer.parseInt(values[3].substring(0, values[3].length() - 1)));
return position;
}