Fix #59 no need for broadcasts when showing new node pane

This commit is contained in:
geeksville
2020-05-21 17:21:44 -07:00
parent 9dd88281af
commit d2de04d5b2
5 changed files with 26 additions and 3 deletions

View File

@@ -113,8 +113,9 @@ static void onEnter()
uint32_t now = millis();
if (now - lastPingMs > 60 * 1000) { // if more than a minute since our last press, ask other nodes to update their state
service.sendNetworkPing(NODENUM_BROADCAST, true);
if (now - lastPingMs > 30 * 1000) { // if more than a minute since our last press, ask other nodes to update their state
if (displayedNodeNum)
service.sendNetworkPing(displayedNodeNum, true); // Refresh the currently displayed node
lastPingMs = now;
}
}