Add support for GV604 LEDs

This commit is contained in:
Luke D. Jones
2023-04-25 12:13:20 +12:00
parent ca1c67e803
commit 45a354880a
5 changed files with 151 additions and 58 deletions

View File

@@ -440,6 +440,13 @@
basic_zones: [],
advanced_type: None,
),
(
board_name: "GV604V",
layout_name: "ga401q",
basic_modes: [Static, Breathe, Strobe, Pulse],
basic_zones: [],
advanced_type: None,
),
(
board_name: "GX502",
layout_name: "gx502",

View File

@@ -280,7 +280,13 @@ impl KeyLayout {
/// Find a layout matching the name in `LaptopLedData` in the provided dir
pub fn find_layout(led_data: LaptopLedData, mut data_path: PathBuf) -> Result<Self, Error> {
// TODO: locales
let layout_file = format!("{}_US.ron", led_data.layout_name);
let layout_name = if led_data.layout_name.is_empty() {
"ga401q".to_owned() // Need some sort of default here due to ROGCC
// expecting it
} else {
led_data.layout_name
};
let layout_file = format!("{layout_name}_US.ron");
data_path.push("layouts");
data_path.push(layout_file);
let path = data_path.as_path();