VL53L3 Shield specific functions.

Dependents:   53L3A2_Ranging X_NUCLEO_53L3CX

Revision:
2:81763ffd2222
Parent:
1:8afec488fa83
--- a/XNucleo53LX.h	Fri Oct 16 15:43:08 2020 +0000
+++ b/XNucleo53LX.h	Wed Jul 14 15:07:09 2021 +0000
@@ -42,7 +42,7 @@
 /* Includes ------------------------------------------------------------------*/
 #include "mbed.h"
 #include "PinNames.h"
-#include <vl53lx_class.h>
+#include "vl53l3cx_class.h"
 #include "Stmpe1600.h"
 //#include "DevI2C.h"
 #include "vl53L3_I2c.h"
@@ -75,19 +75,19 @@
     XNucleo53LX(vl53L3_DevI2C *ext_i2c) : dev_i2c(ext_i2c)
     {
         
-                printf("XNucleo53LX %d z\n",ext_i2c);
+                printf("XNucleo53LX %d z\n",(int)ext_i2c);
         stmpe1600_exp0 = new Stmpe1600((DevI2C*)ext_i2c, (0x43 * 2));     // U21
 
         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 VL53LX(ext_i2c, xshutdown_centre, A2);
+        sensor_centre = new VL53L3CX(ext_i2c, xshutdown_centre, A2);
 
         xshutdown_left = new Stmpe1600DigiOut((DevI2C*)dev_i2c, GPIO_14, (0x43 * 2));     // U21 on schematic
-        sensor_left = new VL53LX(dev_i2c, xshutdown_left, D8);
+        sensor_left = new VL53L3CX(dev_i2c, xshutdown_left, D8);
 
         xshutdown_right = new Stmpe1600DigiOut((DevI2C*)dev_i2c, GPIO_15, (0x43 * 2));     // U21 on schematic
-        sensor_right = new VL53LX(dev_i2c, xshutdown_right, D2);
+        sensor_right = new VL53L3CX(dev_i2c, xshutdown_right, D2);
     }  
     
     /** Constructor 2
@@ -103,16 +103,16 @@
         stmpe1600_exp0 = new Stmpe1600((DevI2C*)ext_i2c, (0x43 * 2));     // U21
 
         stmpe1600_exp1 = new Stmpe1600((DevI2C*)ext_i2c, (0x42 * 2));     // U19
-        printf("vl53L1X_DevI2C constructor %d %d %d %d\n",ext_i2c,gpio1_centre,gpio1_left,gpio1_right);
+        printf("vl53L1X_DevI2C constructor %d %d %d %d\n",(int)ext_i2c,(int)gpio1_centre,(int)gpio1_left,(int)gpio1_right);
 
         xshutdown_centre = new Stmpe1600DigiOut((DevI2C*)dev_i2c, GPIO_15, (0x42 * 2));     // U19 on schematic
-        sensor_centre = new VL53LX(dev_i2c, xshutdown_centre, gpio1_centre);
+        sensor_centre = new VL53L3CX(dev_i2c, xshutdown_centre, gpio1_centre);
 
         xshutdown_left = new Stmpe1600DigiOut((DevI2C*)dev_i2c, GPIO_14, (0x43 * 2));     // U21 on schematic
-        sensor_left = new VL53LX(dev_i2c, xshutdown_left, gpio1_left);
+        sensor_left = new VL53L3CX(dev_i2c, xshutdown_left, gpio1_left);
 
         xshutdown_right = new Stmpe1600DigiOut((DevI2C*)dev_i2c, GPIO_15, (0x43 * 2));     // U21 on schematic
-        sensor_right = new VL53LX(dev_i2c, xshutdown_right, gpio1_right);
+        sensor_right = new VL53L3CX(dev_i2c, xshutdown_right, gpio1_right);
     }    
     
     
@@ -179,9 +179,9 @@
     int init_board();
     
     vl53L3_DevI2C *dev_i2c;
-    VL53LX *sensor_centre;
-    VL53LX *sensor_left;
-    VL53LX *sensor_right;
+    VL53L3CX *sensor_centre;
+    VL53L3CX *sensor_left;
+    VL53L3CX *sensor_right;
     Stmpe1600 *stmpe1600_exp0;
     Stmpe1600 *stmpe1600_exp1;
     Stmpe1600DigiOut *xshutdown_centre;