From ee834a1f70431e25063f929af6fe4eff4e27e6c0 Mon Sep 17 00:00:00 2001 From: jon-stumpf Date: Fri, 17 Mar 2017 10:05:40 -0400 Subject: Removed capture of milliseconds in Homtecs protocol; The *one* test position has 2 digits instead of 3; Access to documentation online and/or more test positions are needed to safely implement the capture of milliseconds; --- src/org/traccar/protocol/HomtecsProtocolDecoder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/org') diff --git a/src/org/traccar/protocol/HomtecsProtocolDecoder.java b/src/org/traccar/protocol/HomtecsProtocolDecoder.java index 846df0b66..2557e1ac7 100644 --- a/src/org/traccar/protocol/HomtecsProtocolDecoder.java +++ b/src/org/traccar/protocol/HomtecsProtocolDecoder.java @@ -34,7 +34,7 @@ public class HomtecsProtocolDecoder extends BaseProtocolDecoder { private static final Pattern PATTERN = new PatternBuilder() .expression("([^,]+),") // id .number("(dd)(dd)(dd),") // date (yymmdd) - .number("(dd)(dd)(dd).(d+),") // time (hhmmss.ms) + .number("(dd)(dd)(dd).d+,") // time (hhmmss) .number("(d+),") // satellites .number("(dd)(dd.d+),") // latitude .expression("([NS]),") @@ -63,7 +63,7 @@ public class HomtecsProtocolDecoder extends BaseProtocolDecoder { } position.setDeviceId(deviceSession.getDeviceId()); - position.setTime(parser.nextDateTime(Parser.DateTimeFormat.YMD_HMSS)); + position.setTime(parser.nextDateTime(Parser.DateTimeFormat.YMD_HMS)); position.setValid(true); position.set(Position.KEY_SATELLITES, parser.nextInt()); -- cgit v1.2.3