allow for NMEA messages longer than 80 characters (although the spec only allows for 80, but long decimal values may exceed this)

This commit is contained in:
Axel Uhl authored and Fredrik Teschke committed 2014-02-16 09:25:47 +01:00
1 parent aaaea162f5
commit 0bb4990136
1 file changed
+2 -2
@@ -55,9 +55,9 @@ public final class SentenceValidator {
int i = nmea.indexOf(Sentence.CHECKSUM_DELIMITER);
// printable ASCII chars 0x20 to 0x7E
String re = "^[$|!]{1}[A-Z0-9]{5}[,][\\x20-\\x7F]{0,72}[*][A-F0-9]{2}$";
String re = "^[$|!]{1}[A-Z0-9]{5}[,][\\x20-\\x7F]{0,197}[*][A-F0-9]{2}$";
if (i < 0) {
re = "^[$|!]{1}[A-Z0-9]{5}[,][\\x20-\\x7F]{0,75}$";
re = "^[$|!]{1}[A-Z0-9]{5}[,][\\x20-\\x7F]{0,200}$";
}
return nmea.matches(re);