Merge pull request #19 from aspann/as/ga501_fixup

fixed build errors on rust - removed RGB support for GA502
This commit is contained in:
Luke Jones
2020-06-11 09:10:51 +12:00
committed by GitHub
3 changed files with 14 additions and 9 deletions

View File

@@ -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(())

View File

@@ -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};

View File

@@ -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");