Closed matthias-mueller closed 5 years ago
Tested with _Example1_ReadDistance/Example1ReadDistance.ino.
Seems there are still a few of conversion issues between signed and unsigned integer types:
Compiling .pioenvs/mkrgsm1400/libcf9/SparkFun VL53L1X 4m Laser Distance Sensor_ID5304/SparkFun_VL53L1X.cpp.o .piolibdeps/SparkFun VL53L1X 4m Laser Distance Sensor_ID5304/src/SparkFun_VL53L1X.cpp: In member function 'int16_t SFEVL53L1X::getOffset()': .piolibdeps/SparkFun VL53L1X 4m Laser Distance Sensor_ID5304/src/SparkFun_VL53L1X.cpp:234:34: error: invalid conversion from 'uint16_t* {aka short unsigned int*}' to 'int16_t* {aka short int*}' [-fpermissive] _device->VL53L1X_GetOffset(&temp); ^ In file included from .piolibdeps/SparkFun VL53L1X 4m Laser Distance Sensor_ID5304/src/SparkFun_VL53L1X.h:7:0, from .piolibdeps/SparkFun VL53L1X 4m Laser Distance Sensor_ID5304/src/SparkFun_VL53L1X.cpp:3: .piolibdeps/SparkFun VL53L1X 4m Laser Distance Sensor_ID5304/src/vl53l1x_class.h:409:16: error: initializing argument 1 of 'VL53L1X_ERROR VL53L1X::VL53L1X_GetOffset(int16_t*)' [-fpermissive] VL53L1X_ERROR VL53L1X_GetOffset(int16_t *Offset); ^ .piolibdeps/SparkFun VL53L1X 4m Laser Distance Sensor_ID5304/src/SparkFun_VL53L1X.cpp: In member function 'void SFEVL53L1X::calibrateOffset(uint16_t)': .piolibdeps/SparkFun VL53L1X 4m Laser Distance Sensor_ID5304/src/SparkFun_VL53L1X.cpp:329:61: error: invalid conversion from 'int16_t {aka short int}' to 'int16_t* {aka short int*}' [-fpermissive] _device->VL53L1X_CalibrateOffset(targetDistanceInMm, offset); ^ In file included from .piolibdeps/SparkFun VL53L1X 4m Laser Distance Sensor_ID5304/src/SparkFun_VL53L1X.h:7:0, from .piolibdeps/SparkFun VL53L1X 4m Laser Distance Sensor_ID5304/src/SparkFun_VL53L1X.cpp:3: .piolibdeps/SparkFun VL53L1X 4m Laser Distance Sensor_ID5304/src/vl53l1x_class.h:505:9: error: initializing argument 2 of 'int8_t VL53L1X::VL53L1X_CalibrateOffset(uint16_t, int16_t*)' [-fpermissive] int8_t VL53L1X_CalibrateOffset(uint16_t TargetDistInMm, int16_t *offset); ^ .piolibdeps/SparkFun VL53L1X 4m Laser Distance Sensor_ID5304/src/SparkFun_VL53L1X.cpp: In member function 'void SFEVL53L1X::calibrateXTalk(uint16_t)': .piolibdeps/SparkFun VL53L1X 4m Laser Distance Sensor_ID5304/src/SparkFun_VL53L1X.cpp:335:59: error: invalid conversion from 'int16_t {aka short int}' to 'uint16_t* {aka short unsigned int*}' [-fpermissive] _device->VL53L1X_CalibrateXtalk(targetDistanceInMm, xTalk); ^ In file included from .piolibdeps/SparkFun VL53L1X 4m Laser Distance Sensor_ID5304/src/SparkFun_VL53L1X.h:7:0, from .piolibdeps/SparkFun VL53L1X 4m Laser Distance Sensor_ID5304/src/SparkFun_VL53L1X.cpp:3: .piolibdeps/SparkFun VL53L1X 4m Laser Distance Sensor_ID5304/src/vl53l1x_class.h:518:9: error: initializing argument 2 of 'int8_t VL53L1X::VL53L1X_CalibrateXtalk(uint16_t, uint16_t*)' [-fpermissive] int8_t VL53L1X_CalibrateXtalk(uint16_t TargetDistInMm, uint16_t *xtalk); ^ *** [.pioenvs/mkrgsm1400/libcf9/SparkFun VL53L1X 4m Laser Distance Sensor_ID5304/SparkFun_VL53L1X.cpp.o] Error 1
Woops, should be fixed in 1.1.3
Tested with _Example1_ReadDistance/Example1ReadDistance.ino.
Seems there are still a few of conversion issues between signed and unsigned integer types: