Skip to content

Commit

Permalink
Add user packets counter
Browse files Browse the repository at this point in the history
Add user packet counter same as interrupt example
  • Loading branch information
TMRh20 committed Apr 15, 2022
1 parent 3f06838 commit 6cccf88
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/ncurses/RF24Gateway_ncurses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ unsigned long updateRate = 1000;

uint32_t meshInfoTimer = 0;
uint32_t mesh_timer = 0;
size_t networkPacketsRX = 0;
std::string subIP;
std::string tunStr("tun_nrf24");
bool showConnPad;
Expand Down Expand Up @@ -163,6 +164,7 @@ int main()
/*******************************/
if (network.available())
{
++networkPacketsRX;
RF24NetworkHeader header;
size_t size = network.peek(header);
uint8_t buf[size];
Expand Down Expand Up @@ -558,6 +560,7 @@ void drawRF24Pad()
wprintw(rf24Pad, "TX Packets: %u\n", ok);
wprintw(rf24Pad, "TX Drops: %u\n", fail);
#endif
wprintw(rf24Pad, "RX Packets(user): %u\n", networkPacketsRX);

if (padSelection == 1)
{
Expand Down

0 comments on commit 6cccf88

Please # to comment.