mirror of
https://github.com/justcallmekoko/ESP32Marauder.git
synced 2025-12-22 15:16:43 -08:00
Add status LED for neopixel
This commit is contained in:
@@ -5,6 +5,9 @@ void flipperLED::RunSetup() {
|
||||
pinMode(G_PIN, OUTPUT);
|
||||
pinMode(R_PIN, OUTPUT);
|
||||
|
||||
if (!settings_obj.loadSetting<bool>("EnableLED"))
|
||||
return;
|
||||
|
||||
delay(50);
|
||||
|
||||
digitalWrite(B_PIN, LOW);
|
||||
@@ -19,14 +22,20 @@ void flipperLED::RunSetup() {
|
||||
}
|
||||
|
||||
void flipperLED::attackLED() {
|
||||
if (!settings_obj.loadSetting<bool>("EnableLED"))
|
||||
return;
|
||||
|
||||
digitalWrite(B_PIN, HIGH);
|
||||
digitalWrite(G_PIN, HIGH);
|
||||
digitalWrite(R_PIN, HIGH);
|
||||
digitalWrite(R_PIN, HIGH);
|
||||
delay(10);
|
||||
digitalWrite(R_PIN, LOW);
|
||||
}
|
||||
|
||||
void flipperLED::sniffLED() {
|
||||
if (!settings_obj.loadSetting<bool>("EnableLED"))
|
||||
return;
|
||||
|
||||
digitalWrite(B_PIN, HIGH);
|
||||
digitalWrite(G_PIN, HIGH);
|
||||
digitalWrite(R_PIN, HIGH);
|
||||
@@ -35,6 +44,9 @@ void flipperLED::sniffLED() {
|
||||
}
|
||||
|
||||
void flipperLED::offLED() {
|
||||
if (!settings_obj.loadSetting<bool>("EnableLED"))
|
||||
return;
|
||||
|
||||
digitalWrite(B_PIN, HIGH);
|
||||
digitalWrite(G_PIN, HIGH);
|
||||
digitalWrite(R_PIN, HIGH);
|
||||
|
||||
Reference in New Issue
Block a user