-------------------------------------
[Sensor] Fixed the proximity sensor value
[model] Z3
[binary_type] AP
[customer] N/A
[issue#] N/A
[problem] Proximity sensor sends FAR status when any object is close to the sensor and NEAR status when nothing overlays it. The status is inverted.
[cause] Logic error in web device api plugin.
[solution] Fixed that the Proximity sensor sends NEAR status when any object is close to the sensor and FAR status when nothing overlays it.
[team] AdvancedWearable
[request] N/A
[horizontal_expansion] N/A
Change-Id: Ide485d61fe99ca87d1f81de572b5bb21963f3eab
break;
}
case SENSOR_PROXIMITY: {
- const int state = static_cast<int>(sensor_event->values[0]);
- (*out)["proximityState"] = picojson::value(state ? "NEAR" : "FAR");
+ (*out)["proximityState"] = picojson::value(SENSOR_PROXIMITY_NEAR == state ? "NEAR" : "FAR");
break;
}
case SENSOR_ULTRAVIOLET: {