Add support for GU502

This commit is contained in:
Luke
2020-07-04 10:13:46 +12:00
parent f870f0adf0
commit 202fbe6800
7 changed files with 28 additions and 7 deletions

View File

@@ -5,6 +5,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased] ## [Unreleased]
## [0.14.1] - 2020-04-07
### Added
- Support for G512 series
- Support for GU502 (variant of GA15)
## [0.14.0] - 2020-01-07 ## [0.14.0] - 2020-01-07
### Changed ### Changed
- Further refine the way setting LED modes works so it is more universal, this - Further refine the way setting LED modes works so it is more universal, this

View File

@@ -20,18 +20,20 @@ kernel level support.
## SUPPORTED LAPTOPS ## SUPPORTED LAPTOPS
- GM501 (multizone needs testing, if you have this laptop please create an issue in the repo) - GM501
- GX502 - GX502
- GX531 - GX531
- G512
- G712 - G712
- GX531
- G531 - G531
- GA14/GA401 *is* supported, including the AniMe display. You will need kernel [patches](https://lab.retarded.farm/zappel/asus-rog-zephyrus-g14/-/tree/master/kernel_patches). - GA14/GA401 *is* supported, including the AniMe display. You will need kernel [patches](https://lab.retarded.farm/zappel/asus-rog-zephyrus-g14/-/tree/master/kernel_patches).
- GA15/GA502 appears to have most things working - GA15/GA502/GU502 appears to have most things working
**Please help test or provide info for:** **Please help test or provide info for:**
- GL703(0x1869) - GL703(0x1869)
- GL553(0x1854) GL753 (attempted support from researching 2nd-hand info, multizone may work) - GL553/GL753 (device = 0x1854) (attempted support from researching 2nd-hand info, multizone may work)
**Laptop support is added on a per-case basis** as the EC for the keyboard varies **Laptop support is added on a per-case basis** as the EC for the keyboard varies
a little between models, e.g, some RGB modes are missing, or it's a single colour. a little between models, e.g, some RGB modes are missing, or it's a single colour.

7
debian/changelog vendored
View File

@@ -1,3 +1,10 @@
rog-core (0.14.1) focal; urgency=medium
- Support for G512 series
- Support for GU502 (variant of GA15)
-- Luke Jones <luke@ljones.dev> Sat, 04 Jul 2020 10:18:08 +1200
rog-core (0.14.0) focal; urgency=medium rog-core (0.14.0) focal; urgency=medium
- Further refine the way setting LED modes works so it is more universal, this - Further refine the way setting LED modes works so it is more universal, this

View File

@@ -28,7 +28,7 @@ pub(super) type DbusU8Type = Arc<Mutex<Option<u8>>>;
// //
// DBUS processing takes 6ms if not tokiod // DBUS processing takes 6ms if not tokiod
pub async fn start_daemon() -> Result<(), Box<dyn Error>> { 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()); let mut config = Config::default().load(laptop.supported_modes());
info!("Config loaded"); info!("Config loaded");
@@ -113,6 +113,7 @@ pub async fn start_daemon() -> Result<(), Box<dyn Error>> {
.unwrap_or_else(|err| warn!("{}", err)); .unwrap_or_else(|err| warn!("{}", err));
} }
}); });
laptop.set_support_animatrix(false);
} }
} }

View File

@@ -68,9 +68,10 @@ fn choose_1866_device(prod: u16) -> LaptopBase {
// GA401 // GA401
if board_name.starts_with("GA401") { if board_name.starts_with("GA401") {
info!("No RGB control available"); info!("No RGB control available");
// TODO: actual check for the AniMe device here
laptop.support_animatrix = true; laptop.support_animatrix = true;
// GA502 // 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"); info!("No RGB control available");
// GX502, G712 // GX502, G712
} else if board_name.starts_with("GX502") { } else if board_name.starts_with("GX502") {
@@ -246,6 +247,9 @@ impl LaptopBase {
pub(super) fn support_animatrix(&self) -> bool { pub(super) fn support_animatrix(&self) -> bool {
self.support_animatrix self.support_animatrix
} }
pub(super) fn set_support_animatrix(&mut self, supported: bool) {
self.support_animatrix = supported;
}
} }
pub enum FnKeys { pub enum FnKeys {

View File

@@ -1,6 +1,7 @@
use daemon::daemon::start_daemon; use daemon::daemon::start_daemon;
use daemon::rogcore::FanLevel; use daemon::rogcore::FanLevel;
use gumdrop::Options; use gumdrop::Options;
use log::info;
use log::LevelFilter; use log::LevelFilter;
use rog_client::{ use rog_client::{
cli_options::{LedBrightness, SetAuraBuiltin}, cli_options::{LedBrightness, SetAuraBuiltin},
@@ -8,7 +9,7 @@ use rog_client::{
}; };
use std::io::Write; use std::io::Write;
static VERSION: &str = "0.14.0"; static VERSION: &str = "0.14.1";
#[derive(Options)] #[derive(Options)]
struct CLIStart { struct CLIStart {
@@ -53,6 +54,7 @@ pub async fn main() -> Result<(), Box<dyn std::error::Error>> {
let parsed = CLIStart::parse_args_default_or_exit(); let parsed = CLIStart::parse_args_default_or_exit();
if parsed.daemon { if parsed.daemon {
info!("Version: {}", VERSION);
start_daemon().await?; start_daemon().await?;
} }
if parsed.version { if parsed.version {

View File

@@ -219,7 +219,7 @@ pub(super) fn dbus_create_tree(
.add_m(get_fan_mode(config.clone())) .add_m(get_fan_mode(config.clone()))
.add_m(get_charge_limit(config.clone())) .add_m(get_charge_limit(config.clone()))
.add_m(get_keyboard_backlight(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(key_backlight_changed.clone())
.add_s(fanmode_changed.clone()) .add_s(fanmode_changed.clone())
.add_s(chrg_limit_changed.clone()), .add_s(chrg_limit_changed.clone()),