Skip to content

Commit

Permalink
Switching to use mode of fix instead of status to be more robust to c…
Browse files Browse the repository at this point in the history
…hanges in API
  • Loading branch information
danthony06 committed May 9, 2024
1 parent 4e61959 commit e6ee597
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gpsd_client/src/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,12 @@ namespace gpsd_client
}
#if GPSD_API_MAJOR_VERSION >= 10
#ifdef STATUS_FIX
if ((p->fix.status != STATUS_NO_FIX) && !(check_fix_by_variance_ && std::isnan(p->fix.epx)))
if (((p->fix.mode == MODE_2D) || (p->fix.mode == MODE_3D)) && !(check_fix_by_variance_ && std::isnan(p->fix.epx)))
#else
if ((p->fix.status != STATUS_NO_FIX) && !(check_fix_by_variance_ && std::isnan(p->fix.epx)))
if (((p->fix.mode == MODE_2D) || (p->fix.mode == MODE_3D)) && !(check_fix_by_variance_ && std::isnan(p->fix.epx)))
#endif
#else
if ((p->status != STATUS_NO_FIX) && !(check_fix_by_variance_ && std::isnan(p->fix.epx)))
if (((p->fix.mode == MODE_2D) || (p->fix.mode == MODE_3D)) && !(check_fix_by_variance_ && std::isnan(p->fix.epx)))
#endif
{
status.status = 0; // FIXME: gpsmm puts its constants in the global
Expand Down

0 comments on commit e6ee597

Please sign in to comment.