core: gps: skip active satellites with ID > 31

Some GPS modules can work on multiple systems at the same time. However,
the current code has been written only for GPS and, consequently is not
able to manage satellites with an ID greater than 32. This commit provides
an hotfix until all the GPS code gets refactored an extended to support
also GLONASS and Galileo.

Signed-off-by: Silvano Seva <silseva@fastwebnet.it>
This commit is contained in:
Silvano Seva 2025-10-02 19:22:41 +02:00
parent f2f84f3da1
commit b3b057699b
1 changed files with 1 additions and 1 deletions

View File

@ -109,7 +109,7 @@ void gps_task(const struct gpsDevice *dev)
gps_data.fix_type = frame.fix_type;
for (int i = 0; i < 12; i++)
{
if (frame.sats[i] != 0)
if (frame.sats[i] != 0 && frame.sats[i] < 31)
{
gps_data.active_sats |= 1 << (frame.sats[i] - 1);
}