Skip to content
This repository has been archived by the owner on Aug 25, 2020. It is now read-only.

Commit

Permalink
Add support for GU502
Browse files Browse the repository at this point in the history
  • Loading branch information
flukejones committed Jul 3, 2020
1 parent f870f0a commit 1cbc4c9
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

## [Unreleased]
## [0.14.1] - 2020-04-07
### Added
- Support for G512 series
- Support for GU502 (variant of GA15)

## [0.14.0] - 2020-01-07
### Changed
- Further refine the way setting LED modes works so it is more universal, this
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,20 @@ kernel level support.

## SUPPORTED LAPTOPS

- GM501 (multizone needs testing, if you have this laptop please create an issue in the repo)
- GM501
- GX502
- GX531
- G512
- G712
- GX531
- 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).
- GA15/GA502 appears to have most things working
- GA15/GA502/GU502 appears to have most things working

**Please help test or provide info for:**

- 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
a little between models, e.g, some RGB modes are missing, or it's a single colour.
Expand Down
7 changes: 7 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -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

- Further refine the way setting LED modes works so it is more universal, this
Expand Down
3 changes: 2 additions & 1 deletion rog-core/src/daemon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -113,6 +113,7 @@ pub async fn start_daemon() -> Result<(), Box<dyn Error>> {
.unwrap_or_else(|err| warn!("{}", err));
}
});
laptop.set_support_animatrix(false);
}
}

Expand Down
6 changes: 5 additions & 1 deletion rog-core/src/laptops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 3 additions & 1 deletion rog-core/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
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},
core_dbus::AuraDbusWriter,
};
use std::io::Write;

static VERSION: &str = "0.14.0";
static VERSION: &str = "0.14.1";

#[derive(Options)]
struct CLIStart {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 1cbc4c9

Please sign in to comment.