summaryrefslogtreecommitdiff
path: root/driver_garmin.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-10-31 23:49:55 -0400
committerEric S. Raymond <esr@thyrsus.com>2013-10-31 23:49:55 -0400
commit2ae441d42411d416e9e3f39c60f6c14d23708f74 (patch)
tree37b14bf6edc83e62ab1d14d64040161d91f75220 /driver_garmin.c
parent5af8826c921dfe73e04a24e1e092a04c97f577a2 (diff)
downloadgpsd-2ae441d42411d416e9e3f39c60f6c14d23708f74.tar.gz
Contain the assumption that time hinting is done to NTPD.
Because it might be going to chrony. Or something else. No logic changes, just name changes and one new derived #define, TIMEHINT_ENABLE.
Diffstat (limited to 'driver_garmin.c')
-rw-r--r--driver_garmin.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/driver_garmin.c b/driver_garmin.c
index 32015573..ea33320b 100644
--- a/driver_garmin.c
+++ b/driver_garmin.c
@@ -1224,8 +1224,8 @@ static ssize_t garmin_control_send(struct gps_device_t *session,
}
#endif /* CONTROLSEND_ENABLE */
-#ifdef NTPSHM_ENABLE
-static double garmin_ntp_offset(struct gps_device_t *session)
+#ifdef TIMEHINT_ENABLE
+static double garmin_time_offset(struct gps_device_t *session)
{
if (session->sourcetype == source_usb) {
return 0.035; /* Garmin USB, expect +/- 40mS jitter */
@@ -1244,7 +1244,7 @@ static double garmin_ntp_offset(struct gps_device_t *session)
}
return 0.430; /* WTF? WAG */
}
-#endif /* NTPSHM_ENABLE */
+#endif /* TIMEHINT_ENABLE */
/* this is everything we export */
#ifdef __UNUSED__
@@ -1391,9 +1391,9 @@ const struct gps_type_t garmin_usb_binary_old =
#ifdef CONTROLSEND_ENABLE
.control_send = garmin_control_send, /* send raw bytes */
#endif /* CONTROLSEND_ENABLE */
-#ifdef NTPSHM_ENABLE
- .ntp_offset = garmin_ntp_offset,
-#endif /* NTPSHM_ ENABLE */
+#ifdef TIMEHINT_ENABLE
+ .time_offset = garmin_time_offset,
+#endif /* TIMEHINT_ENABLE */
};
/* *INDENT-ON* */
#endif /* __UNUSED__ */
@@ -1420,9 +1420,9 @@ const struct gps_type_t garmin_usb_binary =
#ifdef CONTROLSEND_ENABLE
.control_send = garmin_control_send, /* send raw bytes */
#endif /* CONTROLSEND_ENABLE */
-#ifdef NTPSHM_ENABLE
- .ntp_offset = garmin_ntp_offset,
-#endif /* NTPSHM_ ENABLE */
+#ifdef TIMEHINT_ENABLE
+ .time_offset = garmin_time_offset,
+#endif /* TIMEHINT_ENABLE */
};
/* *INDENT-ON* */
@@ -1448,9 +1448,9 @@ const struct gps_type_t garmin_ser_binary =
#ifdef CONTROLSEND_ENABLE
.control_send = garmin_control_send, /* send raw bytes */
#endif /* CONTROLSEND_ENABLE */
-#ifdef NTPSHM_ENABLE
- .ntp_offset = garmin_ntp_offset,
-#endif /* NTPSHM_ ENABLE */
+#ifdef TIMEHINT_ENABLE
+ .time_offset = garmin_time_offset,
+#endif /* TIMEHINT_ENABLE */
};
/* *INDENT-ON* */