Skip to content

Interrupt on no target should be off by default or settable #44

@mindlekofer

Description

@mindlekofer

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:

void SFEVL53L1X::setDistanceThreshold(uint16_t lowThresh, uint16_t hiThresh, uint8_t window)
{
	_device->VL53L1X_SetDistanceThreshold(lowThresh, hiThresh, window, 1);
}

Proposed correction:

void SFEVL53L1X::setDistanceThreshold(uint16_t lowThresh, uint16_t hiThresh, uint8_t window)
{
	_device->VL53L1X_SetDistanceThreshold(lowThresh, hiThresh, window, 0);
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions