mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Merge pull request #19 from aspann/as/ga501_fixup
fixed build errors on rust - removed RGB support for GA502
This commit is contained in:
@@ -83,12 +83,13 @@ impl AuraDbusWriter {
|
||||
pub fn write_multizone(
|
||||
&mut self,
|
||||
group: &[[u8; LED_MSG_LEN]; 4],
|
||||
) -> Result<String, Box<dyn std::error::Error>> {
|
||||
let msg = Message::new_method_call(DBUS_NAME, DBUS_PATH, DBUS_IFACE, "LedWriteMultizone")?
|
||||
.append1(&group[0].to_vec())
|
||||
.append1(&group[1].to_vec())
|
||||
.append1(&group[2].to_vec())
|
||||
.append1(&group[3].to_vec());
|
||||
) -> Result<(), Box<dyn std::error::Error>> {
|
||||
let mut msg =
|
||||
Message::new_method_call(DBUS_NAME, DBUS_PATH, DBUS_IFACE, "LedWriteMultizone")?
|
||||
.append1(&group[0].to_vec())
|
||||
.append1(&group[1].to_vec())
|
||||
.append1(&group[2].to_vec())
|
||||
.append1(&group[3].to_vec());
|
||||
msg.set_no_reply(true);
|
||||
self.connection.send(msg).unwrap();
|
||||
Ok(())
|
||||
|
||||
@@ -11,7 +11,7 @@ use dbus::{channel::Sender, nonblock::Process};
|
||||
|
||||
use dbus_tokio::connection;
|
||||
use log::{error, info, warn};
|
||||
use rog_aura::{DBUS_IFACE, DBUS_NAME, DBUS_PATH};
|
||||
use rog_client::{DBUS_IFACE, DBUS_NAME, DBUS_PATH};
|
||||
use std::error::Error;
|
||||
use std::sync::{mpsc, Arc};
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
@@ -56,8 +56,8 @@ fn choose_1866_device(prod: u16) -> LaptopBase {
|
||||
//backlight: Backlight::new("intel_backlight").unwrap(),
|
||||
};
|
||||
match &board_name.as_str()[..5] {
|
||||
"GX502" | "GA502" => {
|
||||
info!("Found GX502 or GA502 series");
|
||||
"GX502" => {
|
||||
info!("Found GX502 series");
|
||||
laptop.supported_modes = vec![
|
||||
BuiltInModeByte::Single,
|
||||
BuiltInModeByte::Breathing,
|
||||
@@ -82,6 +82,10 @@ fn choose_1866_device(prod: u16) -> LaptopBase {
|
||||
BuiltInModeByte::Rainbow,
|
||||
];
|
||||
}
|
||||
"GA502" => {
|
||||
// Has no RGB control
|
||||
info!("Found GA502 series");
|
||||
}
|
||||
"GA401" => {
|
||||
// Has no RGB control
|
||||
info!("Found GA401 series");
|
||||
|
||||
Reference in New Issue
Block a user