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:
parent
2a78201a2d
commit
a4e43b4d5c
@ -403,8 +403,11 @@ void loop(void) {
|
|||||||
g_last_hb = millis();
|
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) {
|
if (!g_estop_active) {
|
||||||
DW1000Ranging.loop();
|
DW1000Ranging.loop();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -742,7 +742,7 @@ void DW1000RangingClass::timerTick() {
|
|||||||
checkForInactiveDevices();
|
checkForInactiveDevices();
|
||||||
}
|
}
|
||||||
counterForBlink++;
|
counterForBlink++;
|
||||||
if(counterForBlink > 20) {
|
if(counterForBlink > 5) {
|
||||||
counterForBlink = 0;
|
counterForBlink = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -60,7 +60,7 @@
|
|||||||
#define ANCHOR 1
|
#define ANCHOR 1
|
||||||
|
|
||||||
//default timer delay
|
//default timer delay
|
||||||
#define DEFAULT_TIMER_DELAY 80
|
#define DEFAULT_TIMER_DELAY 40
|
||||||
|
|
||||||
//debug mode
|
//debug mode
|
||||||
#ifndef DEBUG
|
#ifndef DEBUG
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user