Skip to content

Commit

Permalink
Merge pull request #98 from CarsonF/more-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyr3x authored Jan 17, 2022
2 parents dec419a + 279951a commit 8040f59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/vl53l1x/vl53l1x.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ optional<uint16_t> VL53L1X::read_distance(ROI *roi, VL53L1_Error &status) {

ESP_LOGVV(TAG, "Beginning distance read");

if (last_roi != nullptr && *roi != *last_roi) {
if (last_roi == nullptr || *roi != *last_roi) {
status = this->sensor.SetROI(roi->width, roi->height);
status += this->sensor.SetROICenter(roi->center);
if (status != VL53L1_ERROR_NONE) {
Expand Down

0 comments on commit 8040f59

Please sign in to comment.