Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge master to main #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/vl53l0x.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ VL53L0X_Error vl53l0x_init(VL53L0X_Dev_t* p_device, VL53L0X_DeviceInfo_t device_
VL53L0X_VCSEL_PERIOD_FINAL_RANGE, FINAL_RANGE_PULSE_PERIOD);
}

VL53L0X_SetGpioConfig(p_device, 0, VL53L0X_DEVICEMODE_CONTINUOUS_RANGING, VL53L0X_GPIOFUNCTIONALITY_NEW_MEASURE_READY, VL53L0X_INTERRUPTPOLARITY_LOW);

VL53L0X_ClearInterruptMask(p_device, 0);

// Start reading
if (Status == VL53L0X_ERROR_NONE) {
Status = VL53L0X_StartMeasurement(p_device);
Expand Down Expand Up @@ -175,6 +179,8 @@ uint8_t vl53l0x_update_range(VL53L0X_Dev_t* p_device, VL53L0X_RangingMeasurement
uint16_t aux_range = *range;
status = VL53L0X_GetRangingMeasurementData(p_device, p_ranging_data);

VL53L0X_ClearInterruptMask(p_device, 0);

if (status != VL53L0X_ERROR_NONE) {
return status;
}
Expand Down