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.
Dependencies: VL6180_Board
Diff: inc/vl6180_class.h
- Revision:
- 3:b01812cb5250
- Parent:
- 2:bc1d979ae392
--- a/inc/vl6180_class.h Tue Nov 10 10:15:46 2020 +0000 +++ b/inc/vl6180_class.h Tue Nov 10 16:09:01 2020 +0000 @@ -228,7 +228,12 @@ *_expgpio0 = 1; } } - wait_ms(10); +#if (MBED_VERSION > 60300) + thread_sleep_for(10); +#else + wait_ms(10); // NEEDS A DELAY BETWEEN SENSORS +#endif + } /** @@ -246,7 +251,12 @@ *_expgpio0 = 0; } } - wait_ms(10); +#if (MBED_VERSION > 60300) + thread_sleep_for(10); +#else + wait_ms(10); // NEEDS A DELAY BETWEEN SENSORS +#endif + } int is_present() @@ -273,7 +283,12 @@ status = vl6180_SetI2CAddress(address); printf("vl6180_SetI2CAddress %d %d \n",address,status); - wait_ms(20); // cgm todo fix +#if (MBED_VERSION > 60300) + thread_sleep_for(20); +#else + wait_ms(20); // NEEDS A DELAY BETWEEN SENSORS +#endif + return status; }