Skip to content

Commit 9c243d2

Browse files
authored
Merge pull request #175 from freifunk-gluon/glonass
ffac-update-location-gps: add support for other GNSS providers
2 parents a0dc5d7 + f978cee commit 9c243d2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ffac-update-location-gps/luasrc/usr/bin/update-location-gps

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,10 @@ while line_count < max_lines do
5151
line_count = line_count + 1 -- Increment the line counter
5252

5353
local nc = this_line:match("^([^,]+)")
54+
local nc_suffix = nc:sub(-3) -- Get the last 3 characters
5455

55-
if nc == '$GPRMC' then
56+
-- support all systems with RMC message
57+
if nc_suffix == 'RMC' and nc:sub(1, 1) == '$' then
5658
local fields = {}
5759
for field in this_line:gmatch("([^,]+)") do
5860
table.insert(fields, field)

0 commit comments

Comments
 (0)