From 2738665b298f3b8de33f96c893ae40ac5d6d25d0 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 27 Apr 2018 06:21:56 +1200 Subject: Fix Totem alarm decoding --- src/org/traccar/protocol/TotemProtocolDecoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/org') diff --git a/src/org/traccar/protocol/TotemProtocolDecoder.java b/src/org/traccar/protocol/TotemProtocolDecoder.java index 841c3c3dc..06a1fbc41 100644 --- a/src/org/traccar/protocol/TotemProtocolDecoder.java +++ b/src/org/traccar/protocol/TotemProtocolDecoder.java @@ -367,7 +367,7 @@ public class TotemProtocolDecoder extends BaseProtocolDecoder { String sentence = (String) msg; Pattern pattern = PATTERN3; - if (sentence.indexOf("A") == 6) { + if (sentence.charAt(2) == '0') { pattern = PATTERN4; } else if (sentence.contains("$GPRMC")) { pattern = PATTERN1; -- cgit v1.2.3