diff --git a/examples/ncursesInt/RF24Gateway_ncursesInt.cpp b/examples/ncursesInt/RF24Gateway_ncursesInt.cpp index 065ba58..fb450d5 100644 --- a/examples/ncursesInt/RF24Gateway_ncursesInt.cpp +++ b/examples/ncursesInt/RF24Gateway_ncursesInt.cpp @@ -164,15 +164,13 @@ int main() wclear(renewPad); mvwprintw(renewPad, 0, 0, "*Renewing Address*"); prefresh(renewPad, 0, 0, 3, 26, 4, 55); - if (mesh.renewAddress() != MESH_DEFAULT_ADDRESS) + ok = mesh.renewAddress() != MESH_DEFAULT_ADDRESS; + if (ok) { ok = true; wclear(renewPad); prefresh(renewPad, 0, 0, 3, 26, 4, 55); } - else { - ok = false; - } } mesh_timer = millis(); }