Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Check_VL6180XA1_ToF
Fork of X_NUCLEO_6180XA1 by
Diff: Components/VL6180X/vl6180x_class.cpp
- Revision:
- 20:dd8390d615bf
- Parent:
- 19:39ea6bab0e5b
- Child:
- 23:dfb5ccc7b780
--- a/Components/VL6180X/vl6180x_class.cpp Wed Oct 28 09:28:52 2015 +0000
+++ b/Components/VL6180X/vl6180x_class.cpp Wed Oct 28 13:07:59 2015 +0000
@@ -65,7 +65,7 @@
*/
#define VL6180X_LOG_ENABLE 0
#endif
-
+
#ifdef MY_LOG
Serial pc(USBTX, USBRX);
#endif
@@ -2678,15 +2678,15 @@
}
-int VL6180X::InitSensor(uint8_t NewAddr) //FIXME printf da sostituire con VL6180x_ErrLog e poi specificare il contenuto di questa funzione
+int VL6180X::InitSensor(uint8_t NewAddr)
{
int status;
VL6180x_Off();
VL6180x_On();
- /*status=VL6180x_WaitDeviceBooted(Device);
- if(status)
- printf("WaitDeviceBooted fail\n\r");*/
+ status=VL6180x_WaitDeviceBooted(Device);
+ if(status)
+ printf("WaitDeviceBooted fail\n\r");
status=IsPresent();
if(!status)
{
@@ -2719,8 +2719,6 @@
}
Device->Ready=1;
}
- VL6180x_RangeSetMaxConvergenceTime(Device,10); //FIXME temporaneo, capire se devo fissare questi valori di default oppure impostarli solo quando faccio la hand gesture
- VL6180x_RangeSetInterMeasPeriod(Device,10); //FIXME
return status;
}
@@ -3155,7 +3153,7 @@
if(status)
{
VL6180x_ErrLog("Failed to write SYSALS_INTERMEASUREMENT_PERIOD!\n\r");
- return status;
+ return status;
}
return AlsStartContinuousMode();
}
