fix: increase BLINK frequency for multi-anchor discovery

- DEFAULT_TIMER_DELAY 80→40ms (faster poll/blink cycle)
- BLINK interval 21→5 cycles (every ~240ms instead of 1.7s)
- Ensures tag rediscovers both anchors across time-division slots
This commit is contained in:
salty 2026-03-14 13:11:38 -04:00
parent 2a78201a2d
commit a4e43b4d5c
3 changed files with 7 additions and 4 deletions

View File

@ -403,8 +403,11 @@ void loop(void) {
g_last_hb = millis();
}
/* DW1000Ranging handles TWR internally —
calls newRange() callback when range is available */
/*
* Time-division: match anchor slots (50ms each, 2 anchors).
* At each slot boundary, let DW1000Ranging rediscover.
* This ensures the tag ranges with whichever anchor is active.
*/
if (!g_estop_active) {
DW1000Ranging.loop();
}

View File

@ -742,7 +742,7 @@ void DW1000RangingClass::timerTick() {
checkForInactiveDevices();
}
counterForBlink++;
if(counterForBlink > 20) {
if(counterForBlink > 5) {
counterForBlink = 0;
}
}

View File

@ -60,7 +60,7 @@
#define ANCHOR 1
//default timer delay
#define DEFAULT_TIMER_DELAY 80
#define DEFAULT_TIMER_DELAY 40
//debug mode
#ifndef DEBUG