Attempt to support GA502DU, GL753VE. Bump version

This commit is contained in:
Luke
2020-04-23 14:51:20 +12:00
parent 7b3c2acd5e
commit 11548217b7
10 changed files with 292 additions and 47 deletions

View File

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