proxy: Update AmbientLightSensor1 definition

This commit is contained in:
Vicki Pfau 2024-08-21 22:43:06 -07:00
parent eb7a136834
commit a54e3d0c55
2 changed files with 3 additions and 5 deletions

View file

@ -220,7 +220,8 @@ async fn main() -> Result<()> {
Commands::GetAlsCalibrationGain => {
let proxy = AmbientLightSensor1Proxy::new(&conn).await?;
let gain = proxy.als_calibration_gain().await?;
println!("ALS calibration gain: {gain}");
let gains = gain.into_iter().map(|g| g.to_string()).join(", ");
println!("ALS calibration gain: {gains}");
}
Commands::GetHardwareCurrentlySupported => {
let proxy = Manager2Proxy::new(&conn).await?;

View file

@ -19,10 +19,7 @@ use zbus::proxy;
assume_defaults = true
)]
trait AmbientLightSensor1 {
/// GetAlsIntegrationTimeFileDescriptor method
fn get_als_integration_time_file_descriptor(&self) -> zbus::Result<zbus::zvariant::OwnedFd>;
/// AlsCalibrationGain property
#[zbus(property)]
fn als_calibration_gain(&self) -> zbus::Result<f64>;
fn als_calibration_gain(&self) -> zbus::Result<Vec<f64>>;
}