Document dbus a bit better

This commit is contained in:
Luke
2020-06-30 21:42:49 +12:00
parent 898276494c
commit a731361278
6 changed files with 116 additions and 163 deletions

View File

@@ -125,7 +125,7 @@ pub async fn start_daemon() -> Result<(), Box<dyn Error>> {
if let Some(n) = lock.take() {
let mut config = config1.lock().await;
rogcore
.fan_mode_set(n, &mut config)
.set_fan_mode(n, &mut config)
.unwrap_or_else(|err| warn!("{:?}", err));
}
}

View File

@@ -139,7 +139,7 @@ impl RogCore {
Ok(())
}
pub fn fan_mode_set(&mut self, n: u8, config: &mut Config) -> Result<(), Box<dyn Error>> {
pub fn set_fan_mode(&mut self, n: u8, config: &mut Config) -> Result<(), Box<dyn Error>> {
let path = RogCore::get_fan_path()?;
let mut fan_ctrl = OpenOptions::new().read(true).write(true).open(path)?;
@@ -164,7 +164,7 @@ impl RogCore {
} else {
n = 0;
}
self.fan_mode_set(n, config)
self.set_fan_mode(n, config)
}
fn set_pstate_for_fan_mode(