[ Version ( since = "0.1.8" ) ]
public ColorXYZ get_sample_sync (SensorCap cap, Cancellable? cancellable = null) throws Error
Gets a sample from the sensor.
WARNING: This function is synchronous, and may block. Do not use it in GUI applications.
this |
a Sensor instance. |
cap |
The device capability, e.g. cd_sensor_cap_ambient. |
cancellable |
a Cancellable or null |
the XYZ reading, with ambient levels in Lux encoded in X, or null for error. |