From 77bdebc998b9273d0c1634934a63fc2ae8f2a5a6 Mon Sep 17 00:00:00 2001 From: MatMoul Date: Sun, 7 Aug 2016 20:22:27 +0200 Subject: [PATCH] Make var generic for other models --- src/main.cpp | 101 ++++++++++++++++++++++++++------------------------- 1 file changed, 51 insertions(+), 50 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index d77eabf..83f7d0f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -9,11 +9,12 @@ using namespace std; -int lg_pid = 0xc331; +int lg_pid = 0xc331; // g810 by default void usage() { - if (lg_pid == 0xc330) cout << "g410-led Usages :\n"; - else cout<<"g810-led Usages :\n"; + string appname = "g810-led"; + if (lg_pid == 0xc330) appname = "g410-led"; + cout< var; vector keys; - g810.attach(lg_pid); + lg_kbd.attach(lg_pid); while (!file.eof()) { getline(file, line); @@ -149,43 +150,43 @@ int loadProfile(string profileFile) { ind = line.find(" "); line = var[line.substr(1, ind - 1)]; } else line = line.substr(0, 6); - if (g810.parseColor(line, colors) == true) { + if (lg_kbd.parseColor(line, colors) == true) { keys.clear(); - g810.setAllKeys(colors); + lg_kbd.setAllKeys(colors); } else cout<<"Error on line "<