mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Attempt to support GA502DU, GL753VE. Bump version
This commit is contained in:
@@ -4,17 +4,28 @@ use crate::error::AuraError;
|
||||
//use keycode::{KeyMap, KeyMappingId, KeyState, KeyboardState};
|
||||
use log::info;
|
||||
|
||||
mod gx502gw;
|
||||
use gx502gw::LaptopGX502GW;
|
||||
// GL753VE == 0x1854, 4 zone keyboard
|
||||
mod gl753;
|
||||
use gl753::LaptopGL753;
|
||||
|
||||
// 0x1866, per-key LEDs, media-keys split from vendor specific
|
||||
mod gx502;
|
||||
use gx502::LaptopGX502;
|
||||
|
||||
pub(crate) fn match_laptop() -> Box<dyn Laptop> {
|
||||
let dmi = sysfs_class::DmiId::default();
|
||||
let board_name = dmi.board_name().unwrap();
|
||||
match board_name.as_str() {
|
||||
// The hell does it have a \n for anyway?
|
||||
"GX502GW\n" => {
|
||||
info!("Found GX502GW");
|
||||
Box::new(LaptopGX502GW::new())
|
||||
match &board_name.as_str()[..5] {
|
||||
// TODO: FX503VD - 0x1869,
|
||||
// These two models seem to have the same characteristics
|
||||
"GX502" | "GA502" => {
|
||||
info!("Found GX502 or GA502 series");
|
||||
Box::new(LaptopGX502::new())
|
||||
}
|
||||
// LED should work for this, but unsure of keys
|
||||
"GL753" => {
|
||||
info!("Found GL753 series");
|
||||
Box::new(LaptopGL753::new())
|
||||
}
|
||||
_ => {
|
||||
panic!("could not match laptop");
|
||||
|
||||
Reference in New Issue
Block a user