From 46f00829df94484f49ccd3523d770bbf152952e0 Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Tue, 18 Jun 2024 01:57:28 -0700 Subject: [PATCH] address build warnings about ncurses example resolves #241 --- examples_RPi/ncurses/RF24Mesh_Ncurses_Master.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/examples_RPi/ncurses/RF24Mesh_Ncurses_Master.cpp b/examples_RPi/ncurses/RF24Mesh_Ncurses_Master.cpp index 34e2852..3767b03 100644 --- a/examples_RPi/ncurses/RF24Mesh_Ncurses_Master.cpp +++ b/examples_RPi/ncurses/RF24Mesh_Ncurses_Master.cpp @@ -216,7 +216,7 @@ void drawTopology() wclear(topoPad); wattroff(topoPad, COLOR_PAIR(1)); mvprintw(17, 10, "Mesh Topology"); - mvwprintw(topoPad, nodeY > 15 ? nodeY - 16 : 0, 0, ""); + mvwaddch(topoPad, nodeY > 15 ? nodeY - 16 : 0, 0, 0); wattron(topoPad, COLOR_PAIR(1)); int topoPadmaxX; topoPadmaxX = getmaxx(topoPad); @@ -238,9 +238,7 @@ void drawTopology() for (int j = 0; j < mesh.addrListTop; j++) { if (mesh.addrList[j].address == i) { - int y = 0; - int x = 0; - getyx(topoPad, y, x); + int x = getcurx(topoPad); if (x >= topoPadmaxX) wprintw(topoPad, "\n"); wprintw(topoPad, "0%o[%d] ", mesh.addrList[j].address, mesh.addrList[j].nodeID); } @@ -258,9 +256,7 @@ void drawTopology() for (int j = 0; j < mesh.addrListTop; j++) { if (mesh.addrList[j].address == i) { - int y = 0; - int x = 0; - getyx(topoPad, y, x); + int x = getcurx(topoPad); if (x >= topoPadmaxX) wprintw(topoPad, "\n"); wprintw(topoPad, "0%o[%d] ", mesh.addrList[j].address, mesh.addrList[j].nodeID); } @@ -278,9 +274,7 @@ void drawTopology() for (int j = 0; j < mesh.addrListTop; j++) { if (mesh.addrList[j].address == i) { - int y = 0; - int x = 0; - getyx(topoPad, y, x); + int x = getcurx(topoPad); if (x >= topoPadmaxX) wprintw(topoPad, "\n"); wprintw(topoPad, "0%o[%d] ", mesh.addrList[j].address, mesh.addrList[j].nodeID); }