get_sample_sync


Description:

[ 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.

Parameters:

this

a Sensor instance.

cap

The device capability, e.g. cd_sensor_cap_ambient.

cancellable

a Cancellable or null

Returns:

the XYZ reading, with ambient levels in Lux encoded in X, or null for error.




2022 vala-language.org