From 7246acbb663a083da11c67e0804588ed63838ab3 Mon Sep 17 00:00:00 2001 From: Luke Date: Wed, 17 Jun 2020 22:11:38 +1200 Subject: [PATCH] Add GX531 LED modes --- CHANGELOG.md | 3 +++ data/rogcore.conf | 32 ++++++++++++++++++++++++++++++++ rog-core/src/laptops.rs | 10 ++++++++++ 3 files changed, 45 insertions(+) create mode 100644 data/rogcore.conf diff --git a/CHANGELOG.md b/CHANGELOG.md index bd35b50b..5a955181 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ 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] +### Changed +- Add modes for FX531 LEDs +- Change where USB reset is called ## [0.11.1] - 2020-11-06 ### Changed diff --git a/data/rogcore.conf b/data/rogcore.conf new file mode 100644 index 00000000..9594c1b6 --- /dev/null +++ b/data/rogcore.conf @@ -0,0 +1,32 @@ +fan_mode = 0 +brightness = 1 +current_mode = [93, 179, 0, 0] + +[builtin_modes] +stable = [93, 179, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] +breathe = [93, 179, 0, 1, 255, 0, 0, 235, 0, 0, 255, 0, 0, 0, 0, 0, 0] +strobe = [93, 179, 0, 2, 0, 0, 0, 235, 0, 0, 0, 0, 0, 0, 0, 0, 0] +rainbow = [93, 179, 0, 3, 0, 0, 0, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0] +star = [93, 179, 0, 4, 255, 255, 255, 225, 0, 255, 0, 0, 0, 0, 0, 0, 0] +rain = [93, 179, 0, 5, 0, 0, 0, 235, 0, 0, 0, 0, 0, 0, 0, 0, 0] +highlight = [93, 179, 0, 6, 255, 0, 0, 235, 0, 0, 0, 0, 0, 0, 0, 0, 0] +laser = [93, 179, 0, 7, 255, 0, 0, 235, 0, 0, 0, 0, 0, 0, 0, 0, 0] +ripple = [93, 179, 0, 8, 255, 0, 0, 235, 0, 0, 0, 0, 0, 0, 0, 0, 0] +pulse = [93, 179, 0, 10, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] +comet = [93, 179, 0, 11, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] +flash = [93, 179, 0, 12, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] +multi_static = [[93, 179, 1, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [93, 179, 2, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [93, 179, 3, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [93, 179, 4, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]] +[mode_performance.normal] +min_percentage = 0 +max_percentage = 100 +no_turbo = false + +[mode_performance.boost] +min_percentage = 0 +max_percentage = 100 +no_turbo = false + +[mode_performance.silent] +min_percentage = 0 +max_percentage = 100 +no_turbo = true diff --git a/rog-core/src/laptops.rs b/rog-core/src/laptops.rs index 81678ee1..143f1249 100644 --- a/rog-core/src/laptops.rs +++ b/rog-core/src/laptops.rs @@ -91,6 +91,16 @@ fn choose_1866_device(prod: u16) -> LaptopBase { BuiltInModeByte::Rainbow, ]; } + "GX531" => { + info!("Found GX531 series"); + laptop.supported_modes = vec![ + BuiltInModeByte::Single, + BuiltInModeByte::Breathing, + BuiltInModeByte::Strobe, + BuiltInModeByte::Rainbow, + BuiltInModeByte::Pulse, + ]; + } _ => panic!("Unsupported laptop: {}, please request support at\nhttps://github.com/flukejones/rog-core", board_name), } laptop