Library for use with VL53L1X, intended to represent the Proximity sensor expansion board with the same name.

Dependencies:   VL53L1X_mbed

Dependents:   HelloWorld_53L1A1 VL53L1A1_Simple_Ranging_With_One_Device VL53L1A1_Simple_Ranging_With_All_Devices VL53L1X_Ranging_With_Multiple_Devices_MbedOS ... more

Revision:
27:afcf740eb7b8
Parent:
22:27f00d9b777b
Child:
28:0e99f593daa9
--- a/XNucleo53L1A1.cpp	Fri May 17 09:47:11 2019 +0000
+++ b/XNucleo53L1A1.cpp	Wed Jul 24 10:38:21 2019 +0000
@@ -3,7 +3,7 @@
 XNucleo53L1A1 *XNucleo53L1A1::_instance = NULL;
 
 
-XNucleo53L1A1 *XNucleo53L1A1::instance(vl53L1X_DevI2C *ext_i2c)
+XNucleo53L1A1 *XNucleo53L1A1::instance(VL53L1X_DevI2C *ext_i2c)
 {
     if (_instance == NULL) {
         _instance = new XNucleo53L1A1(ext_i2c);
@@ -13,7 +13,7 @@
     return _instance;
 }
 
-XNucleo53L1A1 *XNucleo53L1A1::instance(vl53L1X_DevI2C *ext_i2c,
+XNucleo53L1A1 *XNucleo53L1A1::instance(VL53L1X_DevI2C *ext_i2c,
                                        PinName gpio1_centre,
                                        PinName gpio1_left, PinName gpio1_right)
 {
@@ -30,10 +30,10 @@
 {
     int status, n_dev = 0;
 
-    sensor_centre->VL53L1_Off();
-    sensor_left->VL53L1_Off();
-    sensor_right->VL53L1_Off();
-    status = sensor_centre->InitSensor(NEW_SENSOR_CENTRE_ADDRESS);
+    sensor_centre->vl53l1_off();
+    sensor_left->vl53l1_off();
+    sensor_right->vl53l1_off();
+    status = sensor_centre->initialise_sensor(NEW_SENSOR_CENTRE_ADDRESS);
     if (status) {
         delete sensor_centre;
         delete xshutdown_centre;
@@ -45,7 +45,7 @@
         n_dev++;
     }
 
-    status = sensor_left->InitSensor(NEW_SENSOR_LEFT_ADDRESS);
+    status = sensor_left->initialise_sensor(NEW_SENSOR_LEFT_ADDRESS);
     if (status) {
         delete sensor_left;
         delete xshutdown_left;
@@ -57,7 +57,7 @@
         n_dev++;
     }
 
-    status = sensor_right->InitSensor(NEW_SENSOR_RIGHT_ADDRESS);
+    status = sensor_right->initialise_sensor(NEW_SENSOR_RIGHT_ADDRESS);
     if (status) {
         delete sensor_right;
         delete xshutdown_right;
@@ -75,3 +75,4 @@
         return 0;
     }
 }
+