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.)
This commit is contained in:
Teemu Ikonen
2021-08-24 18:33:51 +03:00
committed by Teemu Ikonen
parent 5af93dbfee
commit d6dafe5cb4

View File

@@ -52,7 +52,7 @@ check_append_or_replace (MMLocationGpsNmea *self,
GMatchInfo *match_info = NULL; GMatchInfo *match_info = NULL;
if (G_UNLIKELY (!self->priv->sequence_regex)) 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, G_REGEX_RAW | G_REGEX_OPTIMIZE,
0, 0,
NULL); NULL);