mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Add support for GU502
This commit is contained in:
@@ -28,7 +28,7 @@ pub(super) type DbusU8Type = Arc<Mutex<Option<u8>>>;
|
||||
//
|
||||
// DBUS processing takes 6ms if not tokiod
|
||||
pub async fn start_daemon() -> Result<(), Box<dyn Error>> {
|
||||
let laptop = match_laptop();
|
||||
let mut laptop = match_laptop();
|
||||
let mut config = Config::default().load(laptop.supported_modes());
|
||||
|
||||
info!("Config loaded");
|
||||
@@ -113,6 +113,7 @@ pub async fn start_daemon() -> Result<(), Box<dyn Error>> {
|
||||
.unwrap_or_else(|err| warn!("{}", err));
|
||||
}
|
||||
});
|
||||
laptop.set_support_animatrix(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -68,9 +68,10 @@ fn choose_1866_device(prod: u16) -> LaptopBase {
|
||||
// GA401
|
||||
if board_name.starts_with("GA401") {
|
||||
info!("No RGB control available");
|
||||
// TODO: actual check for the AniMe device here
|
||||
laptop.support_animatrix = true;
|
||||
// GA502
|
||||
} else if board_name.starts_with("GA502") {
|
||||
} else if board_name.starts_with("GA502") || board_name.starts_with("GU502") {
|
||||
info!("No RGB control available");
|
||||
// GX502, G712
|
||||
} else if board_name.starts_with("GX502") {
|
||||
@@ -246,6 +247,9 @@ impl LaptopBase {
|
||||
pub(super) fn support_animatrix(&self) -> bool {
|
||||
self.support_animatrix
|
||||
}
|
||||
pub(super) fn set_support_animatrix(&mut self, supported: bool) {
|
||||
self.support_animatrix = supported;
|
||||
}
|
||||
}
|
||||
|
||||
pub enum FnKeys {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
use daemon::daemon::start_daemon;
|
||||
use daemon::rogcore::FanLevel;
|
||||
use gumdrop::Options;
|
||||
use log::info;
|
||||
use log::LevelFilter;
|
||||
use rog_client::{
|
||||
cli_options::{LedBrightness, SetAuraBuiltin},
|
||||
@@ -8,7 +9,7 @@ use rog_client::{
|
||||
};
|
||||
use std::io::Write;
|
||||
|
||||
static VERSION: &str = "0.14.0";
|
||||
static VERSION: &str = "0.14.1";
|
||||
|
||||
#[derive(Options)]
|
||||
struct CLIStart {
|
||||
@@ -53,6 +54,7 @@ pub async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
|
||||
let parsed = CLIStart::parse_args_default_or_exit();
|
||||
if parsed.daemon {
|
||||
info!("Version: {}", VERSION);
|
||||
start_daemon().await?;
|
||||
}
|
||||
if parsed.version {
|
||||
|
||||
@@ -219,7 +219,7 @@ pub(super) fn dbus_create_tree(
|
||||
.add_m(get_fan_mode(config.clone()))
|
||||
.add_m(get_charge_limit(config.clone()))
|
||||
.add_m(get_keyboard_backlight(config.clone()))
|
||||
.add_m(get_keyboard_backlight_modes(config.clone()))
|
||||
.add_m(get_keyboard_backlight_modes(config))
|
||||
.add_s(key_backlight_changed.clone())
|
||||
.add_s(fanmode_changed.clone())
|
||||
.add_s(chrg_limit_changed.clone()),
|
||||
|
||||
Reference in New Issue
Block a user