get_spectrum_sync


Description:

[ Version ( since = "1.3.1" ) ]
public Spectrum get_spectrum_sync (SensorCap cap, Cancellable? cancellable = null) throws Error

Gets a spectrum 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.