Skip to content

Commit

Permalink
woops, swapped calib!
Browse files Browse the repository at this point in the history
  • Loading branch information
ladyada committed Dec 6, 2016
1 parent 39f1d5a commit bb0c0e8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Adafruit_VL53L0X.cpp
Expand Up @@ -76,14 +76,6 @@ VL53L0X_Error Adafruit_VL53L0X::rangingTest(VL53L0X_RangingMeasurementData_t *Ra
Status = VL53L0X_StaticInit(pMyDevice); // Device Initialization
}

if(Status == VL53L0X_ERROR_NONE)
{
if (debug)
Serial.println(F("Call of VL53L0X_PerformRefCalibration"));
Status = VL53L0X_PerformRefCalibration(pMyDevice,
&VhvSettings, &PhaseCal); // Device Initialization
}

if(Status == VL53L0X_ERROR_NONE)
{
if (debug)
Expand All @@ -98,6 +90,14 @@ VL53L0X_Error Adafruit_VL53L0X::rangingTest(VL53L0X_RangingMeasurementData_t *Ra
}
}

if(Status == VL53L0X_ERROR_NONE)
{
if (debug)
Serial.println(F("Call of VL53L0X_PerformRefCalibration"));
Status = VL53L0X_PerformRefCalibration(pMyDevice,
&VhvSettings, &PhaseCal); // Device Initialization
}

if(Status == VL53L0X_ERROR_NONE)
{
// no need to do this when we use VL53L0X_PerformSingleRangingMeasurement
Expand Down

0 comments on commit bb0c0e8

Please sign in to comment.