Initial release.
Dependencies: X_NUCLEO_COMMON ST_INTERFACES
Dependents: X_NUCLEO_53L1A1_mbed X_NUCLEO_53L1A1_mbed VL53L1X_Ranging_With_Standalone_Satellite_MbedOS X_NUCLEO_53L1A1
Revision 8:744e8b1b9837, committed 2019-07-24
- Comitter:
- johnAlexander
- Date:
- Wed Jul 24 12:28:33 2019 +0000
- Parent:
- 7:6d3ab15363a2
- Child:
- 9:1d4f91c8df4b
- Commit message:
- Rationalise init_sensor & initialise_sensor, to remove duplication.
Changed in this revision
| VL53L1X_Class.cpp | Show annotated file Show diff for this revision Revisions of this file |
| VL53L1X_Class.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/VL53L1X_Class.cpp Wed Jul 24 10:36:51 2019 +0000
+++ b/VL53L1X_Class.cpp Wed Jul 24 12:28:33 2019 +0000
@@ -67,21 +67,6 @@
return status;
}
-int VL53L1X::init_sensor(uint8_t new_addr)
-{
- Device->I2cDevAddr = new_addr;
- int status = 0;
- vl53l1_off();
- vl53l1_on();
-
- status = is_present();
- if (!status) {
- printf("Failed to init VL53L0X sensor!\n\r");
- return status;
- }
- return status;
-}
-
VL53L1X_ERROR VL53L1X::vl53l1x_sensor_init()
{
--- a/VL53L1X_Class.h Wed Jul 24 10:36:51 2019 +0000
+++ b/VL53L1X_Class.h Wed Jul 24 12:28:33 2019 +0000
@@ -251,7 +251,7 @@
* @return 0 on Success
*/
- VL53L1X_ERROR initialise_sensor(uint8_t address){
+ VL53L1X_ERROR init_sensor(uint8_t address){
VL53L1X_ERROR status = 0;
uint8_t sensorState = 0;
vl53l1_off();
@@ -284,12 +284,6 @@
}
- /**
- * @brief Initialize the sensor with default values
- * @return "0" on success
- */
- int init_sensor(uint8_t new_addr);
-
/* Read function of the ID device */
virtual int read_id(uint8_t *id){
int status = 0;