summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-11-17 20:52:10 -0500
committerEric S. Raymond <esr@thyrsus.com>2013-11-17 20:52:10 -0500
commitd4a915c757c7749cc2b16e31919e5c2bf45e6431 (patch)
tree6a9c4a4c1b550a534fd775672c39ae109ede4432
parent56282bb6ae5bea3eaa63c6e4910c1a18bc31cdd7 (diff)
downloadgpsd-d4a915c757c7749cc2b16e31919e5c2bf45e6431.tar.gz
Be explicit when PPS is not available because the build used pps=no.
-rw-r--r--gpsmon.c4
-rw-r--r--monitor_nmea.c3
-rw-r--r--monitor_oncore.c3
-rw-r--r--monitor_sirf.c5
-rw-r--r--monitor_ubx.c7
5 files changed, 18 insertions, 4 deletions
diff --git a/gpsmon.c b/gpsmon.c
index 9dc60fdf..97db3e33 100644
--- a/gpsmon.c
+++ b/gpsmon.c
@@ -147,7 +147,7 @@ static inline void report_lock(void) { }
static inline void report_unlock(void) { }
#endif /* PPS_ENABLE */
-#define PPSBAR "-------------------------------------" \
+#define PPSBAR "-------------------------------------" \
" PPS " \
"-------------------------------------\n"
@@ -546,6 +546,7 @@ static char *curses_get_command(void)
*
******************************************************************************/
+#ifdef PPS_ENABLE
static void packet_log(const char *fmt, ...)
{
char buf[BUFSIZ];
@@ -555,6 +556,7 @@ static void packet_log(const char *fmt, ...)
packet_vlog(buf, sizeof(buf), fmt, ap);
va_end(ap);
}
+#endif /* PPS_ENABLE */
void gpsd_report(const int debuglevel, const int errlevel, const char *fmt, ...)
/* our version of the logger */
diff --git a/monitor_nmea.c b/monitor_nmea.c
index 43b9bfb2..e108a407 100644
--- a/monitor_nmea.c
+++ b/monitor_nmea.c
@@ -93,6 +93,9 @@ static bool nmea_initialize(void)
(void)mvwprintw(gpgsawin, 2, 1, "Sats: ");
(void)mvwprintw(gpgsawin, 3, 1, "DOP: H= V= P=");
(void)mvwprintw(gpgsawin, 4, 1, "PPS offset: ");
+#ifndef PPS_ENABLE
+ (void)mvwaddstr(gpgsawin, 4, 13, "Not available");
+#endif /* PPS_ENABLE */
(void)mvwprintw(gpgsawin, 5, 9, " GSA + PPS ");
(void)wattrset(gpgsawin, A_NORMAL);
diff --git a/monitor_oncore.c b/monitor_oncore.c
index 74a243dc..40346f15 100644
--- a/monitor_oncore.c
+++ b/monitor_oncore.c
@@ -150,6 +150,9 @@ static bool oncore_initialize(void)
(void)wborder(Aywin, 0, 0, 0, 0, 0, 0, 0, 0),
(void)wattrset(Aywin, A_BOLD);
(void)mvwprintw(Aywin, 1, 1, "PPS offset:");
+#ifndef PPS_ENABLE
+ (void)mvwaddstr(Aywin, 1, 13, "Not available");
+#endif /* PPS_ENABLE */
(void)mvwprintw(Aywin, 3, 4, " @@Ay ");
(void)wattrset(Aywin, A_NORMAL);
diff --git a/monitor_sirf.c b/monitor_sirf.c
index dc737300..2e54a648 100644
--- a/monitor_sirf.c
+++ b/monitor_sirf.c
@@ -170,7 +170,10 @@ static bool sirf_initialize(void)
display(mid7win, 1, 9, "Drift: ");
display(mid7win, 1, 23, "Bias: ");
display(mid7win, 2, 1, "Est. GPS Time: ");
- display(mid7win, 2, 27, "PPS Offset: ");
+ display(mid7win, 2, 27, "PPS offset: ");
+#ifndef PPS_ENABLE
+ (void)mvwaddstr(mid7win, 2, 40, "Not available");
+#endif /* PPS_ENABLE */
display(mid7win, 3, 8, " Packet type 7 (0x07) ");
(void)wattrset(mid7win, A_NORMAL);
diff --git a/monitor_ubx.c b/monitor_ubx.c
index 436bab86..04f487b2 100644
--- a/monitor_ubx.c
+++ b/monitor_ubx.c
@@ -15,6 +15,7 @@ extern const struct gps_type_t driver_ubx;
static WINDOW *satwin, *navsolwin, *dopwin, *ppswin;
#define display (void)mvwprintw
+
static bool ubx_initialize(void)
{
int i;
@@ -73,8 +74,10 @@ static bool ubx_initialize(void)
return false;
(void)wborder(ppswin, 0, 0, 0, 0, 0, 0, 0, 0);
(void)wattrset(ppswin, A_BOLD);
- (void)wmove(ppswin, 1, 1);
- (void)wprintw(ppswin, "PPS offset: ");
+ (void)mvwaddstr(ppswin, 1, 1, "PPS offset: ");
+#ifndef PPS_ENABLE
+ (void)mvwaddstr(ppswin, 1, 13, "Not available");
+#endif /* PPS_ENABLE */
display(ppswin, 2, 22, " PPS ");
(void)wattrset(ppswin, A_NORMAL);