mirror of
https://gitlab.steamos.cloud/holo/steamos-manager.git
synced 2025-07-07 15:10:29 -04:00
manager: Expand AmbientLightSensor1 to allow for querying systems with multiple sensors
This commit is contained in:
parent
064207ed76
commit
84a44a879f
3 changed files with 62 additions and 25 deletions
|
@ -214,14 +214,14 @@ impl SteamOSManager {
|
|||
#[interface(name = "com.steampowered.SteamOSManager1.AmbientLightSensor1")]
|
||||
impl AmbientLightSensor1 {
|
||||
#[zbus(property(emits_changed_signal = "false"))]
|
||||
async fn als_calibration_gain(&self) -> fdo::Result<f64> {
|
||||
async fn als_calibration_gain(&self) -> fdo::Result<Vec<f64>> {
|
||||
getter!(self, "AlsCalibrationGain")
|
||||
}
|
||||
|
||||
async fn get_als_integration_time_file_descriptor(&self) -> fdo::Result<Fd> {
|
||||
async fn get_als_integration_time_file_descriptor(&self, index: u32) -> fdo::Result<Fd> {
|
||||
let m = self
|
||||
.proxy
|
||||
.call_method::<&str, ()>("GetAlsIntegrationTimeFileDescriptor", &())
|
||||
.call_method("GetAlsIntegrationTimeFileDescriptor", &(index))
|
||||
.await
|
||||
.map_err(zbus_to_zbus_fdo)?;
|
||||
match m.body().deserialize::<Fd>() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue