From bc39a5aaa85813cb003405dd67387454011da450 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 8 Oct 2016 19:01:31 +1300 Subject: Support Laipac new message type --- src/org/traccar/protocol/LaipacProtocolDecoder.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/org/traccar/protocol') diff --git a/src/org/traccar/protocol/LaipacProtocolDecoder.java b/src/org/traccar/protocol/LaipacProtocolDecoder.java index ebca443a1..25678af88 100644 --- a/src/org/traccar/protocol/LaipacProtocolDecoder.java +++ b/src/org/traccar/protocol/LaipacProtocolDecoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 - 2014 Anton Tananaev (anton.tananaev@gmail.com) + * Copyright 2013 - 2016 Anton Tananaev (anton.tananaev@gmail.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,7 +37,7 @@ public class LaipacProtocolDecoder extends BaseProtocolDecoder { .text("$AVRMC,") .expression("([^,]+),") // identifier .number("(dd)(dd)(dd),") // time - .expression("([AVRavr]),") // validity + .expression("([AVRPavrp]),") // validity .number("(dd)(dd.d+),") // latitude .expression("([NS]),") .number("(ddd)(dd.d+),") // longitude @@ -66,13 +66,13 @@ public class LaipacProtocolDecoder extends BaseProtocolDecoder { return null; } - Position position = new Position(); - position.setProtocol(getProtocolName()); - DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, parser.next()); if (deviceSession == null) { return null; } + + Position position = new Position(); + position.setProtocol(getProtocolName()); position.setDeviceId(deviceSession.getDeviceId()); DateBuilder dateBuilder = new DateBuilder() -- cgit v1.2.3