summaryrefslogtreecommitdiff
path: root/garmin.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2006-11-14 07:28:44 +0000
committerEric S. Raymond <esr@thyrsus.com>2006-11-14 07:28:44 +0000
commitd3eff5b06eccf4ef3e52fcaf8b18fda31870b0a4 (patch)
treeffcc5e69b7b985c7ccc8b80fb66bf930a9dbece2 /garmin.c
parent8ceb9ed4cfebc51d2fdd7617f4fab313a2fde9a8 (diff)
downloadgpsd-d3eff5b06eccf4ef3e52fcaf8b18fda31870b0a4.tar.gz
Split wrapup method into revert and wrapup. The revert method is onlt called
if configuration is enabled.
Diffstat (limited to 'garmin.c')
-rw-r--r--garmin.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/garmin.c b/garmin.c
index fbaac8b7..f0ad1c9e 100644
--- a/garmin.c
+++ b/garmin.c
@@ -783,6 +783,7 @@ static void garmin_probe_subtype(struct gps_device_t *session, unsigned int seq)
}
}
+#ifdef ALLOW_RECONFIGURE
/*
* garmin_configure()
*
@@ -808,6 +809,7 @@ static void garmin_configure(struct gps_device_t *session)
, GARMIN_PKTID_L001_COMMAND_DATA, 2, CMND_START_RM_DATA);
#endif
}
+#endif /* ALLOW_RECONFIGURE */
static void garmin_close(struct gps_device_t *session UNUSED)
{
@@ -1125,7 +1127,9 @@ struct gps_type_t garmin_usb_binary_old =
.probe_wakeup = NULL, /* no wakeup to be done before hunt */
.probe_detect = garmin_detect, /* how to detect at startup time */
.probe_subtype = garmin_probe_subtype, /* get subtype info */
+#ifdef ALLOW_RECONFIGURE
.configurator = garmin_configure, /* eable what we need */
+#endif /* ALLOW_RECONFIGURE */
.get_packet = garmin_get_packet,/* how to grab a packet */
.parse_packet = garmin_usb_parse, /* parse message packets */
.rtcm_writer = NULL, /* don't send DGPS corrections */
@@ -1133,6 +1137,9 @@ struct gps_type_t garmin_usb_binary_old =
.mode_switcher = NULL, /* no mode switcher */
.rate_switcher = NULL, /* no sample-rate switcher */
.cycle_chars = -1, /* not relevant, no rate switch */
+#ifdef ALLOW_RECONFIGURE
+ .revert = NULL, /* no setting-reversion method */
+#endif /* ALLOW_RECONFIGURE */
.wrapup = garmin_close, /* close hook */
.cycle = 1, /* updates every second */
};
@@ -1146,7 +1153,9 @@ struct gps_type_t garmin_usb_binary =
.probe_wakeup = NULL, /* no wakeup to be done before hunt */
.probe_detect = garmin_detect, /* how to detect at startup time */
.probe_subtype = garmin_probe_subtype, /* get subtype info */
+#ifdef ALLOW_RECONFIGURE
.configurator = garmin_configure, /* eable what we need */
+#endif /* ALLOW_RECONFIGURE */
.get_packet = packet_get, /* how to grab a packet */
.parse_packet = garmin_ser_parse, /* parse message packets */
.rtcm_writer = NULL, /* don't send DGPS corrections */
@@ -1154,6 +1163,9 @@ struct gps_type_t garmin_usb_binary =
.mode_switcher = NULL, /* no mode switcher */
.rate_switcher = NULL, /* no sample-rate switcher */
.cycle_chars = -1, /* not relevant, no rate switch */
+#ifdef ALLOW_RECONFIGURE
+ .revert = NULL, /* no setting-reversion method */
+#endif /* ALLOW_RECONFIGURE */
.wrapup = garmin_close, /* close hook */
.cycle = 1, /* updates every second */
};
@@ -1166,7 +1178,9 @@ struct gps_type_t garmin_ser_binary =
.probe_wakeup = NULL, /* no wakeup to be done before hunt */
.probe_detect = NULL, /* how to detect at startup time */
.probe_subtype = NULL, /* initialize the device */
+#ifdef ALLOW_RECONFIGURE
.configurator = garmin_configure, /* enable what we need */
+#endif /* ALLOW_RECONFIGURE */
.get_packet = packet_get, /* how to grab a packet */
.parse_packet = garmin_ser_parse, /* parse message packets */
.rtcm_writer = NULL, /* don't send DGPS corrections */
@@ -1174,6 +1188,9 @@ struct gps_type_t garmin_ser_binary =
.mode_switcher = garmin_switcher, /* how to change modes */
.rate_switcher = NULL, /* no sample-rate switcher */
.cycle_chars = -1, /* not relevant, no rate switch */
+#ifdef ALLOW_RECONFIGURE
+ .revert = NULL, /* no setting-reversion method */
+#endif /* ALLOW_RECONFIGURE */
.wrapup = NULL, /* close hook */
.cycle = 1, /* updates every second */
};