From d6dafe5cb4096cb2d664d3b6dcfcd7bd2269d79e Mon Sep 17 00:00:00 2001 From: Teemu Ikonen Date: Tue, 24 Aug 2021 18:33:51 +0300 Subject: location-gps-nmea: Fix handling of multi-sentence NMEA messages Fixes the regexp in check_append_or_replace() to accept 1. more multi-sentence NMEA messages (ALM, GSV, RTE, SFI) 2. multi-sentence NMEA messages from all talkers, not just GPS (i.e. GPGSV, GLGSV, GAGSV etc.) --- libmm-glib/mm-location-gps-nmea.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmm-glib/mm-location-gps-nmea.c b/libmm-glib/mm-location-gps-nmea.c index f1a33bf75..396e24fc1 100644 --- a/libmm-glib/mm-location-gps-nmea.c +++ b/libmm-glib/mm-location-gps-nmea.c @@ -52,7 +52,7 @@ check_append_or_replace (MMLocationGpsNmea *self, GMatchInfo *match_info = NULL; if (G_UNLIKELY (!self->priv->sequence_regex)) - self->priv->sequence_regex = g_regex_new ("\\$GPGSV,(\\d),(\\d).*", + self->priv->sequence_regex = g_regex_new ("\\$..(?:ALM|GSV|RTE|SFI),(\\d),(\\d).*", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); -- cgit v1.2.1