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:
19:1727c86ac63b
Parent:
18:2413acea538f
diff -r 2413acea538f -r 1727c86ac63b XNucleo53L0A1.cpp
--- a/XNucleo53L0A1.cpp	Fri Oct 13 15:32:03 2017 +0000
+++ b/XNucleo53L0A1.cpp	Fri Oct 13 22:04:16 2017 +0000
@@ -45,10 +45,11 @@
 
 XNucleo53L0A1 *XNucleo53L0A1::instance(DevI2C *ext_i2c)
 {
-    if (_instance == NULL)
+    if (_instance == NULL) {
         _instance = new XNucleo53L0A1(ext_i2c);
-    else
+    } else {
         VL53L0X_ErrLog("Failed to create XNucleo53L0A1 instance\n\r");
+    }
     return _instance;
 }
 
@@ -56,10 +57,11 @@
                                        PinName gpio1_centre,
                                        PinName gpio1_left, PinName gpio1_right)
 {
-    if (_instance == NULL)
+    if (_instance == NULL) {
         _instance = new XNucleo53L0A1(ext_i2c, gpio1_centre, gpio1_left, gpio1_right);
-    else
+    } else {
         VL53L0X_ErrLog("Failed to create XNucleo53L0A1 instance\n\r");
+    }
     return _instance;
 }