forked from RoboStack/ros-humble
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathros-humble-gpsd-client.patch
43 lines (40 loc) · 1.45 KB
/
ros-humble-gpsd-client.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e593495..f4b1b2f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,7 +25,7 @@ target_compile_definitions(${PROJECT_NAME}
)
rclcpp_components_register_nodes(${PROJECT_NAME} "gpsd_client::GPSDClientComponent")
target_link_libraries(${PROJECT_NAME}
- ${libgps_LIBRARIES}
+ ${libgps_LINK_LIBRARIES}
)
ament_target_dependencies(${PROJECT_NAME}
"gps_msgs"
diff --git a/src/client.cpp b/src/client.cpp
index 425d1c3..86bd257 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -152,14 +152,14 @@ namespace gpsd_client
#endif
}
- if ((p->status & STATUS_FIX) && !(check_fix_by_variance_ && std::isnan(p->fix.epx)))
+ if ((p->fix.status & STATUS_FIX) && !(check_fix_by_variance_ && std::isnan(p->fix.epx)))
{
status.status = 0; // FIXME: gpsmm puts its constants in the global
// namespace, so `GPSStatus::STATUS_FIX' is illegal.
// STATUS_DGPS_FIX was removed in API version 6 but re-added afterward
#if GPSD_API_MAJOR_VERSION != 6
- if (p->status & STATUS_DGPS_FIX)
+ if (p->fix.status & STATUS_DGPS_FIX)
status.status |= 18; // same here
#endif
@@ -234,7 +234,7 @@ namespace gpsd_client
* so we need to use the ROS message's integer values
* for status.status
*/
- switch (p->status)
+ switch (p->fix.status)
{
case STATUS_NO_FIX:
fix->status.status = -1; // NavSatStatus::STATUS_NO_FIX;