Skip to content

Commit

Permalink
clang format
Browse files Browse the repository at this point in the history
  • Loading branch information
TMRh20 committed Jun 19, 2024
1 parent 09ba198 commit 11f0d14
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 22 deletions.
21 changes: 10 additions & 11 deletions examples/ncurses/RF24Gateway_ncurses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,18 +547,17 @@ void drawCfg(bool isConf)

if (strlen(ip) >= 6 && strlen(mask) >= 7)
{
if(gw.setIP(ip, mask) < 0){
mvwprintw(win, 8, 1, "Unable to set IP/Subnet \n");
uint32_t UID = getuid();
if (UID) {
mvwprintw(win, 9, 1, "Not running as root, configure as follows, where 'pi' is your username:\n");
mvwprintw(win, 10, 1, "sudo ip tuntap add dev tun_nrf24 mode tun user pi multi_queue\n");
mvwprintw(win, 11, 1, "sudo ifconfig tun_nrf24 10.10.2.2/24\n");
}
refresh();
sleep(10);
if (gw.setIP(ip, mask) < 0) {
mvwprintw(win, 8, 1, "Unable to set IP/Subnet \n");
uint32_t UID = getuid();
if (UID) {
mvwprintw(win, 9, 1, "Not running as root, configure as follows, where 'pi' is your username:\n");
mvwprintw(win, 10, 1, "sudo ip tuntap add dev tun_nrf24 mode tun user pi multi_queue\n");
mvwprintw(win, 11, 1, "sudo ifconfig tun_nrf24 10.10.2.2/24\n");
}
refresh();
sleep(10);
}

}
else
{
Expand Down
21 changes: 10 additions & 11 deletions examples/ncursesInt/RF24Gateway_ncursesInt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -575,18 +575,17 @@ void drawCfg(bool isConf)

if (strlen(ip) >= 6 && strlen(mask) >= 7)
{
if(gw.setIP(ip, mask) < 0){
mvwprintw(win, 8, 1, "Unable to set IP/Subnet \n");
uint32_t UID = getuid();
if (UID) {
mvwprintw(win, 9, 1, "Not running as root, configure as follows, where 'pi' is your username:\n");
mvwprintw(win, 10, 1, "sudo ip tuntap add dev tun_nrf24 mode tun user pi multi_queue\n");
mvwprintw(win, 11, 1, "sudo ifconfig tun_nrf24 10.10.2.2/24\n");
}
refresh();
sleep(10);
if (gw.setIP(ip, mask) < 0) {
mvwprintw(win, 8, 1, "Unable to set IP/Subnet \n");
uint32_t UID = getuid();
if (UID) {
mvwprintw(win, 9, 1, "Not running as root, configure as follows, where 'pi' is your username:\n");
mvwprintw(win, 10, 1, "sudo ip tuntap add dev tun_nrf24 mode tun user pi multi_queue\n");
mvwprintw(win, 11, 1, "sudo ifconfig tun_nrf24 10.10.2.2/24\n");
}
refresh();
sleep(10);
}

}
else
{
Expand Down

0 comments on commit 11f0d14

Please sign in to comment.