mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Small fixxes to functionality
- Fixed return of rog-core in client mode - Fixed writing of customised builtin LED modes
This commit is contained in:
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.9.3] - 2020-05-04
|
||||
### Changed
|
||||
- Fixed return of rog-core in client mode
|
||||
- Fixed writing of customised builtin LED modes
|
||||
|
||||
## [0.9.2] - 2020-05-04
|
||||
### Added
|
||||
- Begin keeping a Changelog
|
||||
|
||||
16
Cargo.lock
generated
16
Cargo.lock
generated
@@ -489,9 +489,9 @@ checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400"
|
||||
|
||||
[[package]]
|
||||
name = "mio"
|
||||
version = "0.6.21"
|
||||
version = "0.6.22"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f"
|
||||
checksum = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"fuchsia-zircon",
|
||||
@@ -520,9 +520,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "net2"
|
||||
version = "0.2.33"
|
||||
version = "0.2.34"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88"
|
||||
checksum = "2ba7c918ac76704fb42afcbbb43891e72731f3dcca3bef2a19786297baf14af7"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"libc",
|
||||
@@ -613,9 +613,9 @@ checksum = "8e946095f9d3ed29ec38de908c22f95d9ac008e424c7bcae54c75a79c527c694"
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.10"
|
||||
version = "1.0.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "df246d292ff63439fea9bc8c0a270bed0e390d5ebd4db4ba15aba81111b5abe3"
|
||||
checksum = "8872cf6f48eee44265156c111456a700ab3483686b3f96df4cf5481c89157319"
|
||||
dependencies = [
|
||||
"unicode-xid",
|
||||
]
|
||||
@@ -667,7 +667,7 @@ checksum = "cabe4fa914dec5870285fa7f71f602645da47c486e68486d2b4ceb4a343e90ac"
|
||||
|
||||
[[package]]
|
||||
name = "rog-aura"
|
||||
version = "0.9.0"
|
||||
version = "0.9.1"
|
||||
dependencies = [
|
||||
"dbus",
|
||||
"gumdrop",
|
||||
@@ -678,7 +678,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rog-daemon"
|
||||
version = "0.9.2"
|
||||
version = "0.9.3"
|
||||
dependencies = [
|
||||
"dbus",
|
||||
"dbus-tokio",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "rog-aura"
|
||||
version = "0.9.0"
|
||||
version = "0.9.1"
|
||||
license = "MPL-2.0"
|
||||
readme = "README.md"
|
||||
authors = ["Luke <luke@ljones.dev>"]
|
||||
|
||||
@@ -36,7 +36,6 @@ impl AuraDbusWriter {
|
||||
if let Ok(stop) = msg.read1::<bool>() {
|
||||
if stop {
|
||||
if let Ok(mut lock) = stopper.lock() {
|
||||
println!("SHOULD STOP");
|
||||
*lock = true;
|
||||
}
|
||||
}
|
||||
@@ -77,7 +76,7 @@ impl AuraDbusWriter {
|
||||
thread::sleep(Duration::from_millis(self.block_time));
|
||||
if let Ok(lock) = self.stop.try_lock() {
|
||||
if *lock {
|
||||
panic!("Stopping!");
|
||||
panic!("Go signal to stop!");
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
|
||||
2
debian/changelog
vendored
2
debian/changelog
vendored
@@ -1,4 +1,4 @@
|
||||
rog-core (0.9.2) UNRELEASED; urgency=medium
|
||||
rog-core (0.9.2) focal; urgency=medium
|
||||
|
||||
* Internal fixes to prevent deadlocks on mutexes
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "rog-daemon"
|
||||
version = "0.9.2"
|
||||
version = "0.9.3"
|
||||
license = "MPL-2.0"
|
||||
readme = "README.md"
|
||||
authors = ["Luke <luke@ljones.dev>"]
|
||||
|
||||
@@ -414,7 +414,7 @@ where
|
||||
};
|
||||
self.set_builtin(config, idx_next).await?;
|
||||
}
|
||||
AuraCommand::WriteBytes(bytes) => self.write_bytes(&bytes).await?,
|
||||
AuraCommand::WriteBytes(bytes) => self.set_and_save(&bytes, config).await?,
|
||||
AuraCommand::WriteEffect(effect) => self.write_effect(effect).await?,
|
||||
AuraCommand::ReloadLast => self.reload_last_builtin(&config).await?,
|
||||
}
|
||||
@@ -426,7 +426,7 @@ where
|
||||
match unsafe { self.handle.as_ref() }.write_interrupt(
|
||||
self.led_endpoint,
|
||||
message,
|
||||
Duration::from_millis(2),
|
||||
Duration::from_millis(5),
|
||||
) {
|
||||
Ok(_) => {}
|
||||
Err(err) => match err {
|
||||
|
||||
@@ -128,7 +128,7 @@ pub async fn start_daemon() -> Result<(), Box<dyn Error>> {
|
||||
} else {
|
||||
if let Ok(mut lock) = input.try_lock() {
|
||||
if let Some(bytes) = lock.take() {
|
||||
if bytes.len() > 8 {
|
||||
if bytes.len() > 0 {
|
||||
let mut config = config.lock().await;
|
||||
led_writer
|
||||
.do_command(AuraCommand::WriteBytes(bytes), &mut config)
|
||||
@@ -148,11 +148,11 @@ pub async fn start_daemon() -> Result<(), Box<dyn Error>> {
|
||||
// Write a colour block
|
||||
if let Ok(mut effect_lock) = effect.try_lock() {
|
||||
// Spawn a writer
|
||||
if let Some(stuff) = effect_lock.take() {
|
||||
if stuff.len() == 10 {
|
||||
if let Some(effect) = effect_lock.take() {
|
||||
if effect.len() == 10 {
|
||||
let mut config = config.lock().await;
|
||||
led_writer
|
||||
.do_command(AuraCommand::WriteEffect(stuff), &mut config)
|
||||
.do_command(AuraCommand::WriteEffect(effect), &mut config)
|
||||
.await
|
||||
.map_err(|err| warn!("{:?}", err))
|
||||
.unwrap();
|
||||
|
||||
@@ -7,7 +7,7 @@ use rog_aura::{
|
||||
AuraDbusWriter, LED_MSG_LEN,
|
||||
};
|
||||
|
||||
static VERSION: &'static str = "0.9.2";
|
||||
static VERSION: &'static str = "0.9.3";
|
||||
|
||||
#[derive(Debug, Options)]
|
||||
struct CLIStart {
|
||||
@@ -64,17 +64,24 @@ pub async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
SetAuraBuiltin::MultiStatic(_) => {
|
||||
let byte_arr = <[[u8; LED_MSG_LEN]; 4]>::from(command);
|
||||
for arr in byte_arr.iter() {
|
||||
writer.write_bytes(arr)?;
|
||||
match writer.write_bytes(arr) {
|
||||
Ok(msg) => println!("Response: {}", msg),
|
||||
Err(err) => println!("Error: {}", err),
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
writer.write_builtin_mode(&command)?;
|
||||
}
|
||||
_ => match writer.write_builtin_mode(&command) {
|
||||
Ok(msg) => println!("Response: {}", msg),
|
||||
Err(err) => println!("Error: {}", err),
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
if let Some(brightness) = parsed.bright {
|
||||
writer.write_brightness(brightness.level())?;
|
||||
match writer.write_brightness(brightness.level()) {
|
||||
Ok(msg) => println!("Response: {}", msg),
|
||||
Err(err) => println!("Error: {}", err),
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user