Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor improvement of multi-node info #444

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/changepars.c
Original file line number Diff line number Diff line change
Expand Up @@ -665,11 +665,11 @@ void networkinfo(void) {
wipe_display();

if (lan_active)
mvaddstr(1, 10, "Network status: on");
mvprintw(1, 10, "Network status: on Node: %c", thisnode);
else
mvaddstr(1, 10, "Network status: off");

mvprintw(3, 28, "Packets rcvd: %d | %d", recv_packets, recv_error);
mvprintw(3, 22, "Total packets rcvd: %d | %d", recv_packets, recv_error);

for (int i = 0; i < nodes; i++) {
mvaddstr(4 + i, 10, bc_hostaddress[i]);
Expand Down
4 changes: 3 additions & 1 deletion src/clusterinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,10 @@ void clusterinfo(void) {
node_frequencies[thisnode - 'A'] = atof(band[bandinx]);

for (f = 0; f < MAXNODES; f++) {
char node_id = 'A' + f;
if (node_frequencies[f] != 0)
mvprintw(15 + f, 4, " Stn %c : %5.0f", 'A' + f,
mvprintw(15 + f, 4, "%cStn %c : %5.0f",
(node_id == thisnode ? '*' : ' '), node_id,
node_frequencies[f] / 1000.0);
}
nicebox(14, 3, 8, 27, "Frequencies");
Expand Down
2 changes: 1 addition & 1 deletion test/test_clusterinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ void test_freqwindow(void **state) {
clusterinfo();

// frequency shown rounded to kHz
check_mvprintw_output(0, 15, 4, " Stn A : 7124");
check_mvprintw_output(0, 15, 4, "*Stn A : 7124");

assert_string_equal(nicebox_boxname, "Frequencies");

Expand Down