Fix TCP receive: path table update + interface naming + 10Mbps bitrate

- Fix path table insert bug: C++ map::insert() silently fails when key
  exists (unlike Python dict[key]=value). Changed to erase()+insert() so
  updated paths (e.g. local TCP replacing stale LoRa) actually take effect.
- Add name parameter to TcpInterface constructor to give each instance a
  unique identity hash, fixing map collision between backbone and local
  TCP server interfaces.
- Set TCP interface bitrate to 10 Mbps (was 500 bps) so Transport
  correctly prefers TCP paths over LoRa when both exist.
- Add PRG button hold >5s white screen indicator for config portal.
- Boundary mode cull_path_table: evict backbone paths first, preserving
  local paths needed for inbound routing.
This commit is contained in:
James L
2026-02-22 20:28:13 -05:00
parent a746937390
commit 1cbed7afdf
5 changed files with 59 additions and 23 deletions

19
Input.h
View File

@@ -31,6 +31,7 @@
int button_events = EVENT_CLICKS;
int button_state = RELEASED;
bool display_lock_white = false;
int debounce_state = button_state;
unsigned long button_debounce_last = 0;
unsigned long button_debounce_delay = 25;
@@ -82,6 +83,24 @@
}
}
// ── Live hold indicator: turn display white when held >5s ──
#ifdef BOUNDARY_MODE
{
if (button_state == PRESSED && button_down_last > 0) {
unsigned long held = millis() - button_down_last;
if (held > 5000 && !display_lock_white) {
display_lock_white = true;
#if HAS_DISPLAY
if (disp_ready) {
display.fillScreen(SSD1306_WHITE);
display.display();
}
#endif
}
}
}
#endif
}
bool button_pressed() {