Library for the NucleoVl53L1 shield and the Vl53L1

Dependencies:   VL53L1

Dependents:   VL53L1CB_shield_sensor_polling VL53L1CB_MB2_NoShield_3sensors_interrupt_ranging VL53L1CB_MB5_NoShield_3sensors_interrupt_ranging VL53L1CB_MB5_NoShield_3sensors_interrupt_ranging

Files at this revision

API Documentation at this revision

Comitter:
Charles MacNeill
Date:
Wed Jun 09 10:18:22 2021 +0100
Parent:
9:57998dc85ed4
Commit message:
change name of functions and class from VL53L1 to VL53L1CB

Changed in this revision

XNucleo53L1A2.cpp Show annotated file Show diff for this revision Revisions of this file
XNucleo53L1A2.h Show annotated file Show diff for this revision Revisions of this file
--- a/XNucleo53L1A2.cpp	Thu May 13 08:29:42 2021 +0000
+++ b/XNucleo53L1A2.cpp	Wed Jun 09 10:18:22 2021 +0100
@@ -48,9 +48,9 @@
 {
     int status, n_dev = 0;
 
-    sensor_centre->VL53L1_Off();
-    sensor_left->VL53L1_Off();
-    sensor_right->VL53L1_Off();
+    sensor_centre->VL53L1CB_Off();
+    sensor_left->VL53L1CB_Off();
+    sensor_right->VL53L1CB_Off();
     int i = 0;
     
     // On startup or on the shutdown pin going high the VL53l1 devices have a i2c address of 0x52.
--- a/XNucleo53L1A2.h	Thu May 13 08:29:42 2021 +0000
+++ b/XNucleo53L1A2.h	Wed Jun 09 10:18:22 2021 +0100
@@ -55,7 +55,7 @@
 
 
 /* Includes ------------------------------------------------------------------*/
-#include "vl53l1.h"
+#include "VL53L1CB.h"
 #include "Stmpe1600.h"
 //#include "DevI2C.h"
 #include "ToF_I2C.h"
@@ -88,13 +88,13 @@
         stmpe1600_exp1 = new Stmpe1600((DevI2C*)ext_i2c, (0x42 * 2));     // U19
 
         xshutdown_centre = new Stmpe1600DigiOut((DevI2C*)dev_i2c, GPIO_15, (0x42 * 2));     // U19 on schematic
-        sensor_centre = new VL53L1(dev_i2c, xshutdown_centre, A2);
+        sensor_centre = new VL53L1CB(dev_i2c, xshutdown_centre, A2);
 
         xshutdown_left = new Stmpe1600DigiOut((DevI2C*)dev_i2c, GPIO_14, (0x43 * 2));     // U21 on schematic
-        sensor_left = new VL53L1(dev_i2c, xshutdown_left, D8);
+        sensor_left = new VL53L1CB(dev_i2c, xshutdown_left, D8);
 
         xshutdown_right = new Stmpe1600DigiOut((DevI2C*)dev_i2c, GPIO_15, (0x43 * 2));     // U21 on schematic
-        sensor_right = new VL53L1(dev_i2c, xshutdown_right, D2);
+        sensor_right = new VL53L1CB(dev_i2c, xshutdown_right, D2);
     }  
     
     /** Constructor 2
@@ -112,13 +112,13 @@
  //       printf("ToF_DevI2C constructor %d %d %d %d\n",ext_i2c,gpio1_centre,gpio1_left,gpio1_right);
 
         xshutdown_centre = new Stmpe1600DigiOut((DevI2C*)dev_i2c, GPIO_15, (0x42 * 2));     // U19 on schematic
-        sensor_centre = new VL53L1(dev_i2c, xshutdown_centre, gpio1_centre);
+        sensor_centre = new VL53L1CB(dev_i2c, xshutdown_centre, gpio1_centre);
 
         xshutdown_left = new Stmpe1600DigiOut((DevI2C*)dev_i2c, GPIO_14, (0x43 * 2));     // U21 on schematic
-        sensor_left = new VL53L1(dev_i2c, xshutdown_left, gpio1_left);
+        sensor_left = new VL53L1CB(dev_i2c, xshutdown_left, gpio1_left);
 
         xshutdown_right = new Stmpe1600DigiOut((DevI2C*)dev_i2c, GPIO_15, (0x43 * 2));     // U21 on schematic
-        sensor_right = new VL53L1(dev_i2c, xshutdown_right, gpio1_right);
+        sensor_right = new VL53L1CB(dev_i2c, xshutdown_right, gpio1_right);
     }    
     
     
@@ -186,9 +186,9 @@
     
     ToF_DevI2C *dev_i2c;
     
-    VL53L1 *sensor_centre;
-    VL53L1 *sensor_left;
-    VL53L1 *sensor_right;
+    VL53L1CB *sensor_centre;
+    VL53L1CB *sensor_left;
+    VL53L1CB *sensor_right;
     
     Stmpe1600 *stmpe1600_exp0;
     Stmpe1600 *stmpe1600_exp1;