Skip to content

Commit

Permalink
ignore long inline conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
2bndy5 committed Jun 20, 2022
1 parent 2445bd1 commit 5a4e8f7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
10 changes: 6 additions & 4 deletions examples/ncurses/RF24Gateway_ncurses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -646,14 +646,16 @@ void drawRF24Pad()
wprintw(rf24Pad, "nodeID: %d\n", mesh.getNodeID());
wprintw(rf24Pad, "En Mesh: %s\n", gw.meshEnabled() ? "True" : "False");
int dr = radio.getDataRate();
int pa = radio.getPALevel();
// clang-format off
wprintw(rf24Pad, "Data-Rate: %s\n", dr == 0 ? "1MBPS" : dr == 1 ? "2MBPS"
: dr == 2 ? "250KBPS"
: dr == 2 ? "250KBPS"
: "ERROR");
int pa = radio.getPALevel();
wprintw(rf24Pad, "PA Level: %s\n", pa == 0 ? "MIN" : pa == 1 ? "LOW"
: pa == 2 ? "HIGH"
: pa == 3 ? "MAX"
: pa == 2 ? "HIGH"
: pa == 3 ? "MAX"
: "ERROR");
// clang-format on
wprintw(rf24Pad, "IF Type: %s\n", gw.config_TUN == 1 ? "TUN" : "TAP");
wprintw(rf24Pad, "IF Drops: %u\n", gw.ifDropped());
#if defined(ENABLE_NETWORK_STATS)
Expand Down
8 changes: 5 additions & 3 deletions examples/ncursesInt/RF24Gateway_ncursesInt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -684,13 +684,15 @@ void drawRF24Pad()
int dr = radio.getDataRate();
int pa = radio.getPALevel();
radio.maskIRQ(1, 1, 0);
// clang-format off
wprintw(rf24Pad, "Data-Rate: %s\n", dr == 0 ? "1MBPS" : dr == 1 ? "2MBPS"
: dr == 2 ? "250KBPS"
: dr == 2 ? "250KBPS"
: "ERROR");
wprintw(rf24Pad, "PA Level: %s\n", pa == 0 ? "MIN" : pa == 1 ? "LOW"
: pa == 2 ? "HIGH"
: pa == 3 ? "MAX"
: pa == 2 ? "HIGH"
: pa == 3 ? "MAX"
: "ERROR");
// clang-format on
wprintw(rf24Pad, "IF Type: %s\n", gw.config_TUN == 1 ? "TUN" : "TAP");
wprintw(rf24Pad, "IF Drops: %u\n", gw.ifDropped());
#if defined(ENABLE_NETWORK_STATS)
Expand Down

0 comments on commit 5a4e8f7

Please # to comment.