mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Fix needing to double-tap fan-mode to change mode
This commit is contained in:
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [0.9.6] - 2020-22-05
|
||||||
|
### Changed
|
||||||
|
- Fix needing to double-tap fan-mode to change mode
|
||||||
|
|
||||||
## [0.9.5] - 2020-22-05
|
## [0.9.5] - 2020-22-05
|
||||||
### Changed
|
### Changed
|
||||||
- Flip writing order of effect colour blocks every other block write to try
|
- Flip writing order of effect colour blocks every other block write to try
|
||||||
|
|||||||
4
Cargo.lock
generated
4
Cargo.lock
generated
@@ -667,7 +667,7 @@ checksum = "cabe4fa914dec5870285fa7f71f602645da47c486e68486d2b4ceb4a343e90ac"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rog-aura"
|
name = "rog-aura"
|
||||||
version = "0.9.1"
|
version = "0.9.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"dbus",
|
"dbus",
|
||||||
"gumdrop",
|
"gumdrop",
|
||||||
@@ -678,7 +678,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rog-daemon"
|
name = "rog-daemon"
|
||||||
version = "0.9.4"
|
version = "0.9.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"dbus",
|
"dbus",
|
||||||
"dbus-tokio",
|
"dbus-tokio",
|
||||||
|
|||||||
6
debian/changelog
vendored
6
debian/changelog
vendored
@@ -1,3 +1,9 @@
|
|||||||
|
rog-core (0.9.6) focal; urgency=medium
|
||||||
|
|
||||||
|
* Fix needing to double-tap fan-mode to change mode
|
||||||
|
|
||||||
|
-- Luke Jones <luke@ljones.dev> Fri, 22 May 2020 15:39:08 +1200
|
||||||
|
|
||||||
rog-core (0.9.5) focal; urgency=medium
|
rog-core (0.9.5) focal; urgency=medium
|
||||||
|
|
||||||
* Internal fixes to many small issues
|
* Internal fixes to many small issues
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "rog-daemon"
|
name = "rog-daemon"
|
||||||
version = "0.9.5"
|
version = "0.9.6"
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
authors = ["Luke <luke@ljones.dev>"]
|
authors = ["Luke <luke@ljones.dev>"]
|
||||||
|
|||||||
@@ -108,24 +108,22 @@ impl RogCore {
|
|||||||
let path = RogCore::get_fan_path()?;
|
let path = RogCore::get_fan_path()?;
|
||||||
let mut fan_ctrl = OpenOptions::new().read(true).write(true).open(path)?;
|
let mut fan_ctrl = OpenOptions::new().read(true).write(true).open(path)?;
|
||||||
|
|
||||||
let mut buf = String::new();
|
let mut n = config.fan_mode;
|
||||||
if let Ok(_) = fan_ctrl.read_to_string(&mut buf) {
|
info!("Current fan mode: {:?}", FanLevel::from(n));
|
||||||
let mut n = u8::from_str_radix(&buf.trim_end(), 10)?;
|
// wrap around the step number
|
||||||
info!("Current fan mode: {:#?}", FanLevel::from(n));
|
if n < 2 {
|
||||||
// wrap around the step number
|
n += 1;
|
||||||
if n < 2 {
|
} else {
|
||||||
n += 1;
|
n = 0;
|
||||||
} else {
|
|
||||||
n = 0;
|
|
||||||
}
|
|
||||||
info!("Fan mode stepped to: {:#?}", FanLevel::from(n));
|
|
||||||
fan_ctrl
|
|
||||||
.write_all(format!("{:?}\n", config.fan_mode).as_bytes())
|
|
||||||
.unwrap_or_else(|err| error!("Could not write to {}, {:?}", path, err));
|
|
||||||
self.set_pstate_for_fan_mode(FanLevel::from(n), config)?;
|
|
||||||
config.fan_mode = n;
|
|
||||||
config.write();
|
|
||||||
}
|
}
|
||||||
|
info!("Fan mode stepped to: {:?}", FanLevel::from(n));
|
||||||
|
fan_ctrl
|
||||||
|
.write_all(format!("{:?}", config.fan_mode).as_bytes())
|
||||||
|
.unwrap_or_else(|err| error!("Could not write to {}, {:?}", path, err));
|
||||||
|
self.set_pstate_for_fan_mode(FanLevel::from(n), config)?;
|
||||||
|
config.fan_mode = n;
|
||||||
|
config.write();
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ use rog_aura::{
|
|||||||
AuraDbusWriter, LED_MSG_LEN,
|
AuraDbusWriter, LED_MSG_LEN,
|
||||||
};
|
};
|
||||||
|
|
||||||
static VERSION: &'static str = "0.9.4";
|
static VERSION: &'static str = "0.9.6";
|
||||||
|
|
||||||
#[derive(Debug, Options)]
|
#[derive(Debug, Options)]
|
||||||
struct CLIStart {
|
struct CLIStart {
|
||||||
|
|||||||
Reference in New Issue
Block a user