Remove run_on_msc feature
This commit is contained in:
parent
7d63bf2846
commit
abf045f96c
|
@ -100,7 +100,7 @@ void setup() {
|
|||
selector::changed();
|
||||
|
||||
// Start attack
|
||||
if (selector::mode() == ATTACK && !preferences::getRunOnIndicator() && !preferences::getRunOnMSC()) {
|
||||
if (selector::mode() == ATTACK && !preferences::getRunOnIndicator()) {
|
||||
delay(preferences::getInitialDelay()); // Wait to give computer time to init keyboard
|
||||
attack::start(); // Start keystroke injection attack
|
||||
led::setColor(preferences::getIdleColor()); // Set LED to green
|
||||
|
@ -113,13 +113,13 @@ void setup() {
|
|||
}
|
||||
|
||||
void loop() {
|
||||
tasks::update();
|
||||
taks:update();
|
||||
cli::update();
|
||||
|
||||
if(selector::read() != ATTACK) return;
|
||||
|
||||
// Only start the attack if run-on-indicator is disabled, or indicator actually changed
|
||||
if((preferences::getRunOnIndicator() && hid::indicatorChanged()) || (preferences::getRunOnMSC() && msc::changed())) {
|
||||
if(preferences::getRunOnIndicator() && hid::indicatorChanged()) {
|
||||
attack::start(); // Run script
|
||||
led::setColor(preferences::getIdleColor()); // Set LED to green
|
||||
// Don't run again
|
||||
|
|
|
@ -49,7 +49,6 @@ namespace preferences {
|
|||
|
||||
bool disable_capslock { true };
|
||||
bool run_on_indicator { false };
|
||||
bool run_on_msc { false };
|
||||
|
||||
int initial_delay { 1000 };
|
||||
|
||||
|
@ -94,8 +93,7 @@ namespace preferences {
|
|||
add_array(root, "idle_color", idle_color, 4);
|
||||
*/
|
||||
root["disable_capslock"] = disable_capslock;
|
||||
root["run_on_indicator"] = run_on_indicator;
|
||||
root["run_on_msc"] = run_on_msc;
|
||||
root["run_on_indicator"] = run_on_indicator;
|
||||
|
||||
root["initial_delay"] = initial_delay;
|
||||
}
|
||||
|
@ -149,7 +147,6 @@ namespace preferences {
|
|||
*/
|
||||
if (!config_doc.containsKey("disable_capslock")) config_doc["disable_capslock"] = disable_capslock;
|
||||
if (!config_doc.containsKey("run_on_indicator")) config_doc["run_on_indicator"] = run_on_indicator;
|
||||
if (!config_doc.containsKey("run_on_msc")) config_doc["run_on_msc"] = run_on_msc;
|
||||
|
||||
if (!config_doc.containsKey("initial_delay")) config_doc["initial_delay"] = initial_delay;
|
||||
|
||||
|
@ -185,7 +182,6 @@ namespace preferences {
|
|||
|
||||
disable_capslock = config_doc["disable_capslock"].as<bool>();
|
||||
run_on_indicator = config_doc["run_on_indicator"].as<bool>();
|
||||
run_on_msc = config_doc["run_on_msc"].as<bool>();
|
||||
|
||||
initial_delay = config_doc["initial_delay"].as<int>();
|
||||
}
|
||||
|
@ -251,7 +247,6 @@ namespace preferences {
|
|||
|
||||
disable_capslock = true;
|
||||
run_on_indicator = false;
|
||||
run_on_msc = false;
|
||||
|
||||
initial_delay = 1000;
|
||||
}
|
||||
|
@ -356,10 +351,6 @@ namespace preferences {
|
|||
bool getRunOnIndicator() {
|
||||
return run_on_indicator;
|
||||
}
|
||||
|
||||
bool getRunOnMSC() {
|
||||
return run_on_msc;
|
||||
}
|
||||
|
||||
int getInitialDelay() {
|
||||
return initial_delay;
|
||||
|
|
|
@ -38,7 +38,6 @@ namespace preferences {
|
|||
|
||||
bool getDisableCapslock();
|
||||
bool getRunOnIndicator();
|
||||
bool getRunOnMSC();
|
||||
|
||||
int getInitialDelay();
|
||||
}
|
Loading…
Reference in New Issue