diff options
author | Mohamed Khalil HADDED <Mohamed Khalil HADDED> | 2023-07-29 00:55:09 +0100 |
---|---|---|
committer | Mohamed Khalil HADDED <Mohamed Khalil HADDED> | 2023-07-29 00:55:09 +0100 |
commit | d4db066c6e0295a4c8646d82a982cd82e42c84c4 (patch) | |
tree | 6520f65936f6037320c29013b2119235dddcd361 /src/main/java/org/traccar | |
parent | 2561c3340719089518ef095dd7497c660351eb64 (diff) | |
download | trackermap-server-d4db066c6e0295a4c8646d82a982cd82e42c84c4.tar.gz trackermap-server-d4db066c6e0295a4c8646d82a982cd82e42c84c4.tar.bz2 trackermap-server-d4db066c6e0295a4c8646d82a982cd82e42c84c4.zip |
Watch Protocol Decoder update
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r-- | src/main/java/org/traccar/protocol/WatchProtocolDecoder.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/WatchProtocolDecoder.java b/src/main/java/org/traccar/protocol/WatchProtocolDecoder.java index 40d56b130..b586f4e92 100644 --- a/src/main/java/org/traccar/protocol/WatchProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/WatchProtocolDecoder.java @@ -51,7 +51,7 @@ public class WatchProtocolDecoder extends BaseProtocolDecoder { .number("(dd)(dd)(dd),") // time (hhmmss) .expression("([AV]),") // validity .number(" *(-?d+.d+),") // latitude - .expression("([NS]),") + .expression("([NS])?,") .number(" *(-?d+.d+),") // longitude .expression("([EW])?,") .number("(d+.?d*),") // speed @@ -285,7 +285,8 @@ public class WatchProtocolDecoder extends BaseProtocolDecoder { || type.equalsIgnoreCase("BLOOD") || type.equalsIgnoreCase("BPHRT") || type.equalsIgnoreCase("TEMP") - || type.equalsIgnoreCase("btemp2")) { + || type.equalsIgnoreCase("btemp2") + || type.equalsIgnoreCase("oxygen")) { if (buf.isReadable()) { @@ -303,6 +304,8 @@ public class WatchProtocolDecoder extends BaseProtocolDecoder { if (Integer.parseInt(values[valueIndex++]) > 0) { position.set(Position.PREFIX_TEMP + 1, Double.parseDouble(values[valueIndex])); } + } else if (type.equalsIgnoreCase("oxygen")) { + position.set("bloodOxygen", Integer.parseInt(values[++valueIndex])); } else { if (type.equalsIgnoreCase("BPHRT") || type.equalsIgnoreCase("BLOOD")) { position.set("pressureHigh", values[valueIndex++]); |