From 47c35e66193d1dda4db5c326c9d39709aee3e2a6 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 13 Jul 2020 22:36:00 -0700 Subject: Handle negative altitude --- src/main/java/org/traccar/protocol/WatchProtocolDecoder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main') diff --git a/src/main/java/org/traccar/protocol/WatchProtocolDecoder.java b/src/main/java/org/traccar/protocol/WatchProtocolDecoder.java index 9b2bc33bf..c5431be8d 100644 --- a/src/main/java/org/traccar/protocol/WatchProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/WatchProtocolDecoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 - 2018 Anton Tananaev (anton@traccar.org) + * Copyright 2015 - 2020 Anton Tananaev (anton@traccar.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -57,7 +57,7 @@ public class WatchProtocolDecoder extends BaseProtocolDecoder { .expression("([EW])?,") .number("(d+.?d*),") // speed .number("(d+.?d*),") // course - .number("(d+.?d*),") // altitude + .number("(-?d+.?d*),") // altitude .number("(d+),") // satellites .number("(d+),") // rssi .number("(d+),") // battery -- cgit v1.2.3