feat: UWB anchor auto-discovery (Issue #698) #706
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "sl-uwb/issue-698-anchor-discovery"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Replaces the hardcoded
NUM_ANCHORS=2anchor list with a fully dynamic discovery engine. No anchor firmware changes required — the tag uses standard DS-TWR POLL frames as probes; anchors that respond are considered discovered.Changes
esp32/uwb_tag/src/main.cppAnchorEntrytable (8 slots):present,active,range_mm,rssi,last_ok_ms,miss_countDISC_SCAN→DISC_RANGEstate machineDISC_RESCAN_MS(10 s)range_and_update(id): ranges, updates table, emits+DISC:FOUND/+DISC:LOSTserial andMSG_DISC(0x40) ESP-NOWdisc_scan_step(): advances cursor one probe per ranging slotesp32/uwb_tag/platformio.iniMaUWB_DW3000(DW3000 chip)NUM_ANCHORSbuild flag (now dynamic)Notes
esp32/uwb_anchor) is untouched — frozen for calibrationMaUWB_DW3000library requires GitHub credentials not available on this machineTest plan
+DISC:FOUNDserial output+DISC:LOSTappears after ANCHOR_MISS_LIMIT misses