summaryrefslogtreecommitdiff
path: root/cgps.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2018-11-29 16:18:18 -0800
committerGary E. Miller <gem@rellim.com>2018-11-29 16:18:18 -0800
commit780f22ba05905e9d0b1e64ee07f624ecf3593101 (patch)
treed39000e73a002452fa2ffa761a3d07b69814303b /cgps.c
parentbefa413104325662dea99f067b95e38b83764e1c (diff)
downloadgpsd-780f22ba05905e9d0b1e64ee07f624ecf3593101.tar.gz
cgps: Clear skyview window when SKY has no sats.
Diffstat (limited to 'cgps.c')
-rw-r--r--cgps.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/cgps.c b/cgps.c
index 82fe2e14..0c9b9dbf 100644
--- a/cgps.c
+++ b/cgps.c
@@ -644,9 +644,18 @@ static void update_gps_panel(struct gps_data_t *gpsdata, char *message)
/* remove More... */
(void)mvwhline(satellites, sat_no + 2, 1, 0, 8);
}
- /* turn off cursor */
- curs_set(0);
+ } else {
+ int sat_no = 0;
+ /* no sats, clear screen */
+ for ( ; sat_no < display_sats; sat_no++) {
+ (void)mvwprintw(satellites, sat_no + 2, 1, "%-*s",
+ SATELLITES_WIDTH - 3, "");
+ }
+ /* remove More... */
+ (void)mvwhline(satellites, sat_no + 2, 1, 0, 8);
}
+ /* turn off cursor */
+ curs_set(0);
/* Print time/date. */
if (isfinite(gpsdata->fix.time) != 0) {