Removed LED setting
This commit is contained in:
parent
7116b86db5
commit
bd0cbef63c
|
@ -290,6 +290,7 @@ namespace duckparser {
|
|||
|
||||
ignore_delay = true;
|
||||
}
|
||||
/*
|
||||
// LED
|
||||
else if (compare(cmd->str, cmd->len, "LED", CASE_SENSETIVE)) {
|
||||
// i.e. LED R SOLID
|
||||
|
@ -302,7 +303,7 @@ namespace duckparser {
|
|||
color = led::Color::RED;
|
||||
} else if (compare(w->str, w->len, "G", CASE_SENSETIVE)) {
|
||||
color = led::Color::GREEN;
|
||||
} else { /* if (compare(w->str, w->len, "B", CASE_SENSETIVE)) */
|
||||
} else { // if (compare(w->str, w->len, "B", CASE_SENSETIVE))
|
||||
color = led::Color::BLUE;
|
||||
}
|
||||
|
||||
|
@ -314,7 +315,7 @@ namespace duckparser {
|
|||
mode = led::Mode::SLOW;
|
||||
} else if (compare(w->str, w->len, "FAST", CASE_SENSETIVE)) {
|
||||
mode = led::Mode::FAST;
|
||||
} else { /* if (compare(w->str, w->len, "OFF", CASE_SENSETIVE)) */
|
||||
} else { // if (compare(w->str, w->len, "OFF", CASE_SENSETIVE))
|
||||
mode = led::Mode::OFF;
|
||||
}
|
||||
|
||||
|
@ -340,6 +341,7 @@ namespace duckparser {
|
|||
|
||||
ignore_delay = true;
|
||||
}
|
||||
*/
|
||||
// KEYCODE
|
||||
else if (compare(cmd->str, cmd->len, "KEYCODE", CASE_SENSETIVE)) {
|
||||
word_node* w = cmd->next;
|
||||
|
|
|
@ -69,7 +69,7 @@ namespace preferences {
|
|||
|
||||
void toJson(JsonDocument& root) {
|
||||
root["enable_msc"] = enable_msc;
|
||||
root["enable_led"] = enable_led;
|
||||
//root["enable_led"] = enable_led;
|
||||
root["enable_hid"] = enable_hid;
|
||||
|
||||
root["hid_vid"] = hid_vid;
|
||||
|
@ -121,7 +121,7 @@ namespace preferences {
|
|||
|
||||
// === Add missing values === //
|
||||
if (!config_doc.containsKey("enable_msc")) config_doc["enable_msc"] = enable_msc;
|
||||
if (!config_doc.containsKey("enable_led")) config_doc["enable_led"] = enable_led;
|
||||
//if (!config_doc.containsKey("enable_led")) config_doc["enable_led"] = enable_led;
|
||||
if (!config_doc.containsKey("enable_hid")) config_doc["enable_hid"] = enable_hid;
|
||||
|
||||
if (!config_doc.containsKey("hid_vid")) config_doc["hid_vid"] = hid_vid;
|
||||
|
@ -149,7 +149,7 @@ namespace preferences {
|
|||
|
||||
// === Fetch values === //
|
||||
enable_msc = config_doc["enable_msc"].as<bool>();
|
||||
enable_led = config_doc["enable_led"].as<bool>();
|
||||
//enable_led = config_doc["enable_led"].as<bool>();
|
||||
enable_hid = config_doc["enable_hid"].as<bool>();
|
||||
|
||||
hid_vid = config_doc["hid_vid"].as<std::string>();
|
||||
|
@ -205,7 +205,7 @@ namespace preferences {
|
|||
|
||||
void reset() {
|
||||
enable_msc = false;
|
||||
enable_led = true;
|
||||
//enable_led = true;
|
||||
enable_hid = true;
|
||||
|
||||
hid_vid = "16D0";
|
||||
|
|
Loading…
Reference in New Issue