When using a distance threshold mode the interrupt also gets triggered when there is no target or the target is out of range. This is in usually not intended e.g. if used as an external wake up source if a target is entering the allowed window.
The according parameter in the API function is defaulted to 1 by the abstraction (see code below), which enables the "out of window" interrupts.
In my opinion this should be set to 0 by default or settable.
When using a distance threshold mode the interrupt also gets triggered when there is no target or the target is out of range. This is in usually not intended e.g. if used as an external wake up source if a target is entering the allowed window.
The according parameter in the API function is defaulted to 1 by the abstraction (see code below), which enables the "out of window" interrupts. In my opinion this should be set to 0 by default or settable.
Current code:
Proposed correction: