Keyboard backlight fix for G14/G15 (#20)

* fixed mode and brightness combination if mmode is empty
* corrected order in laptops
This commit is contained in:
Armas Spann
2020-06-12 21:52:13 +02:00
committed by GitHub
parent 7e9c78605b
commit 271a206598
2 changed files with 23 additions and 18 deletions

View File

@@ -56,6 +56,15 @@ fn choose_1866_device(prod: u16) -> LaptopBase {
//backlight: Backlight::new("intel_backlight").unwrap(),
};
match &board_name.as_str()[..5] {
"GA401" => {
// Has no RGB control
info!("Found GA401 series");
laptop.support_animatrix = true;
}
"GA502" => {
// Has no RGB control
info!("Found GA502 series");
}
"GX502" => {
info!("Found GX502 series");
laptop.supported_modes = vec![
@@ -82,15 +91,6 @@ fn choose_1866_device(prod: u16) -> LaptopBase {
BuiltInModeByte::Rainbow,
];
}
"GA502" => {
// Has no RGB control
info!("Found GA502 series");
}
"GA401" => {
// Has no RGB control
info!("Found GA401 series");
laptop.support_animatrix = true;
}
_ => panic!("Unsupported laptop: {}, please request support at\nhttps://github.com/flukejones/rog-core", board_name),
}
laptop