diff options
author | Gary E. Miller <gem@rellim.com> | 2018-11-29 16:18:18 -0800 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2018-11-29 16:18:18 -0800 |
commit | 780f22ba05905e9d0b1e64ee07f624ecf3593101 (patch) | |
tree | d39000e73a002452fa2ffa761a3d07b69814303b /cgps.c | |
parent | befa413104325662dea99f067b95e38b83764e1c (diff) | |
download | gpsd-780f22ba05905e9d0b1e64ee07f624ecf3593101.tar.gz |
cgps: Clear skyview window when SKY has no sats.
Diffstat (limited to 'cgps.c')
-rw-r--r-- | cgps.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -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) { |