Skip to content

Commit 75f65f0

Browse files
author
Andrew England
committed
Didn't pull in source files from working library, remade 1.1.2 so it is actually included
1 parent 8cefa5b commit 75f65f0

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

examples/Example1_ReadDistance/Example1_ReadDistance.ino

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
#include <ComponentObject.h>
2+
#include <RangeSensor.h>
3+
#include <SparkFun_VL53L1X.h>
4+
#include <vl53l1x_class.h>
5+
#include <vl53l1_error_codes.h>
6+
17
/*
28
Reading distance from the laser based VL53L1X
39
By: Nathan Seidle
@@ -32,8 +38,9 @@ void setup(void)
3238
Serial.println("VL53L1X Qwiic Test");
3339

3440
if (distanceSensor.begin() == false)
41+
{
3542
Serial.println("Sensor online!");
36-
43+
}
3744
}
3845

3946
void loop(void)

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=SparkFun VL53L1X 4m Laser Distance Sensor
2-
version=1.1.2
2+
version=1.1.3
33
author=SparkFun Electronics <[email protected]>
44
maintainer=SparkFun Electronics <sparkfun.com>
55
sentence=Library for the SparkFun Qwiic 4m Distance Sensor - VL53L1X

src/SparkFun_VL53L1X.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ void SFEVL53L1X::setOffset(int16_t offset)
230230

231231
int16_t SFEVL53L1X::getOffset()
232232
{
233-
uint16_t temp;
233+
int16_t temp;
234234
_device->VL53L1X_GetOffset(&temp);
235235
return temp;
236236
}
@@ -326,11 +326,11 @@ void SFEVL53L1X::startTemperatureUpdate()
326326
void SFEVL53L1X::calibrateOffset(uint16_t targetDistanceInMm)
327327
{
328328
int16_t offset = getOffset();
329-
_device->VL53L1X_CalibrateOffset(targetDistanceInMm, offset);
329+
_device->VL53L1X_CalibrateOffset(targetDistanceInMm, &offset);
330330
}
331331

332332
void SFEVL53L1X::calibrateXTalk(uint16_t targetDistanceInMm)
333333
{
334-
int16_t xTalk = getXTalk();
335-
_device->VL53L1X_CalibrateXtalk(targetDistanceInMm, xTalk);
334+
uint16_t xTalk = getXTalk();
335+
_device->VL53L1X_CalibrateXtalk(targetDistanceInMm, &xTalk);
336336
};

0 commit comments

Comments
 (0)