mirror of
https://gitlab.steamos.cloud/holo/steamos-manager.git
synced 2025-07-16 11:16:45 -04:00
steamosctl: Add HdmiCecState commands
This commit is contained in:
parent
265d82a300
commit
7cd1e7814c
2 changed files with 21 additions and 0 deletions
|
@ -99,6 +99,14 @@ enum Commands {
|
||||||
|
|
||||||
GetWifiPowerManagementState {},
|
GetWifiPowerManagementState {},
|
||||||
|
|
||||||
|
GetHdmiCecState {},
|
||||||
|
SetHdmiCecState {
|
||||||
|
// Set the state of HDMI-CEC support
|
||||||
|
// 0 - disabled, 1 - only controls, 2 - TV waking
|
||||||
|
#[arg(short, long)]
|
||||||
|
value: u32,
|
||||||
|
},
|
||||||
|
|
||||||
UpdateBios {},
|
UpdateBios {},
|
||||||
UpdateDock {},
|
UpdateDock {},
|
||||||
TrimDevices {},
|
TrimDevices {},
|
||||||
|
@ -219,6 +227,13 @@ async fn main() -> Result<()> {
|
||||||
let state = proxy.wifi_power_management_state().await?;
|
let state = proxy.wifi_power_management_state().await?;
|
||||||
println!("Wifi power management state: {state}");
|
println!("Wifi power management state: {state}");
|
||||||
}
|
}
|
||||||
|
Some(Commands::SetHdmiCecState { value }) => {
|
||||||
|
proxy.set_hdmi_cec_state(*value).await?;
|
||||||
|
}
|
||||||
|
Some(Commands::GetHdmiCecState {}) => {
|
||||||
|
let state = proxy.hdmi_cec_state().await?;
|
||||||
|
println!("HDMI-CEC state: {state}");
|
||||||
|
}
|
||||||
Some(Commands::UpdateBios {}) => {
|
Some(Commands::UpdateBios {}) => {
|
||||||
let _ = proxy.update_bios().await?;
|
let _ = proxy.update_bios().await?;
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,6 +113,12 @@ trait Manager {
|
||||||
fn wifi_power_management_state(&self) -> zbus::Result<u32>;
|
fn wifi_power_management_state(&self) -> zbus::Result<u32>;
|
||||||
#[zbus(property)]
|
#[zbus(property)]
|
||||||
fn set_wifi_power_management_state(&self, value: u32) -> zbus::Result<()>;
|
fn set_wifi_power_management_state(&self, value: u32) -> zbus::Result<()>;
|
||||||
|
|
||||||
|
/// HdmiCecState property
|
||||||
|
#[zbus(property)]
|
||||||
|
fn hdmi_cec_state(&self) -> zbus::Result<u32>;
|
||||||
|
#[zbus(property)]
|
||||||
|
fn set_hdmi_cec_state(&self, value: u32) -> zbus::Result<()>;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[proxy(
|
#[proxy(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue