From b23e48069b4b5cd4e54155c96cfbebda6a916350 Mon Sep 17 00:00:00 2001 From: MatMoul Date: Fri, 18 Nov 2016 21:48:50 +0100 Subject: [PATCH] Add G610 support --- README.md | 2 +- src/classes/Keyboard.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 30e2d06..2fb372c 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Linux LED controller for the Logitech G810 Keyboard -Compatible with the Logitech G410 Keyboard (look at the wiki : https://github.com/MatMoul/g810-led/wiki) +Compatible with the Logitech G410 and G610 Keyboard (look at the wiki : https://github.com/MatMoul/g810-led/wiki) ![jj](https://raw.githubusercontent.com/MatMoul/g810-led/master/pictures/logitech_g810-2.jpg) diff --git a/src/classes/Keyboard.cpp b/src/classes/Keyboard.cpp index 91a7f60..b87734b 100644 --- a/src/classes/Keyboard.cpp +++ b/src/classes/Keyboard.cpp @@ -394,6 +394,7 @@ bool Keyboard::parseKeyGroup(std::string key, KeyGroup &keyGroup) { } bool Keyboard::parseColor(std::string color, KeyColors &colors) { + if (color.length() == 2) color = color + "0000"; // For G610 if (color.length() != 6) return false; colors.red = std::stoul("0x"+color.substr(0,2), nullptr, 16); colors.green = std::stoul("0x"+color.substr(2,2), nullptr, 16);