diff options
author | Gary E. Miller <gem@rellim.com> | 2018-09-22 15:26:50 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2018-09-22 15:26:50 -0700 |
commit | a0fe409f3bed4dd785d17c877acb67738b570646 (patch) | |
tree | be0c545985dac8269c243d508a1067a1b11f1d00 /cgps.c | |
parent | 30ca421b674dce167311cf19b162d963e7096540 (diff) | |
download | gpsd-a0fe409f3bed4dd785d17c877acb67738b570646.tar.gz |
cgps: squeeze in one more satellite. Turn off cursor.
Diffstat (limited to 'cgps.c')
-rw-r--r-- | cgps.c | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -266,6 +266,8 @@ static void windowsetup(void) (void)initscr(); (void)noecho(); getmaxyx(stdscr, ysize, xsize); + /* turn off cursor */ + curs_set(0); #ifdef TRUENORTH if (compass_flag) { @@ -543,13 +545,11 @@ static void update_gps_panel(struct gps_data_t *gpsdata, char *message) if (gpsdata->satellites_visible != 0) { int sat_no; - int loop_end = (display_sats < gpsdata->satellites_visible) ? \ - display_sats : gpsdata->satellites_visible; qsort( gpsdata->skyview, gpsdata->satellites_visible, sizeof( struct satellite_t), sat_cmp); /* displayed all sats that fit, maybe all of them */ - for (sat_no = 0; sat_no < loop_end; sat_no++) { + for (sat_no = 0; sat_no <= display_sats; sat_no++) { int column = 1; /* column to write to */ char *gnssid; @@ -609,18 +609,21 @@ static void update_gps_panel(struct gps_data_t *gpsdata, char *message) gpsdata->skyview[sat_no].used ? 'Y' : 'N'); } - /* last line is either blank, or More... */ + /* Display More... ? */ if (sat_no < gpsdata->satellites_visible) { /* Too many sats to show them all, tell the user. */ - (void)mvwprintw(satellites, sat_no + 2, 1, "%-*s", - SATELLITES_WIDTH - 3, "More..."); + (void)mvwprintw(satellites, sat_no + 2, 1, "%s", "More..."); } else { /* Clear old data from the unused lines at bottom. */ for ( ; sat_no <= display_sats; sat_no++) { (void)mvwprintw(satellites, sat_no + 2, 1, "%-*s", SATELLITES_WIDTH - 3, ""); } + /* remove More... */ + (void)mvwprintw(satellites, sat_no + 2, 1, "%s", " "); } + /* turn off cursor */ + curs_set(0); } /* Print time/date. */ |