GSMA version
Dependencies: FXOS8700CQ mbed sfh7779
Fork of StarterKit by
Diff: sensors.cpp
- Revision:
- 29:e6c8bd41caa6
- Parent:
- 11:e6602513730f
- Child:
- 30:48b43538e98b
--- a/sensors.cpp Fri Jul 15 13:17:26 2016 +0000 +++ b/sensors.cpp Sat Jul 16 17:35:15 2016 +0000 @@ -267,25 +267,29 @@ //printf("PS2_Data = %d\n", PS2); //printf("PS3_Data = %d\n", PS3); //OBJECT PRESENT? +#if (0) if(PS1 < 22000){ //printf("Object Far\n"); - sprintf(SENSOR_DATA.Proximity, "Object Far"); + sprintf(SENSOR_DATA.Proximity, "Object Far\0"); } else if(PS1 < 24000) { //printf("Object in Vicinity\n"); - sprintf(SENSOR_DATA.Proximity, "Object in Vicinity"); + sprintf(SENSOR_DATA.Proximity, "Object in Vicinity\0"); } else if (PS1 < 30000) { //printf("Object Near\n"); - sprintf(SENSOR_DATA.Proximity, "Object Near"); + sprintf(SENSOR_DATA.Proximity, "Object Near\0"); } else { //printf("Object Very Near\n"); - sprintf(SENSOR_DATA.Proximity, "Object Very Near"); + sprintf(SENSOR_DATA.Proximity, "Object Very Near\0"); } +#else + sprintf(SENSOR_DATA.Proximity, "%d\0", PS1); +#endif //Force ALS read: //WriteTo_Si1145_Register(REG_COMMAND, 0x06);