Skip to content

Commit

Permalink
Fix case of no led
Browse files Browse the repository at this point in the history
  • Loading branch information
Francis Duvivier committed Aug 25, 2024
1 parent 5a973ee commit fcdfbf6
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions esp32_marauder/LedInterface.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
#include "LedInterface.h"

#ifndef HAS_NEOPIXEL_LED

LedInterface::LedInterface(){}
void LedInterface::RunSetup(){}
void LedInterface::main(uint32_t currentTime){}
void LedInterface::setMode(uint8_t new_mode){}
uint8_t LedInterface::getMode(){}
void LedInterface::setColor(int r, int g, int b){}
void LedInterface::sniffLed(){}
void LedInterface::attackLed(){}
void LedInterface::ledOff(){}
void LedInterface::rainbow(){}
uint32_t LedInterface::Wheel(byte WheelPos){}

#else

LedInterface::LedInterface() {

}
Expand Down Expand Up @@ -51,7 +67,7 @@ uint8_t LedInterface::getMode() {

void LedInterface::setColor(int r, int g, int b) {
strip.setPixelColor(0, strip.Color(r, g, b));
strip.show();
strip.show();
}

void LedInterface::sniffLed() {
Expand Down Expand Up @@ -88,4 +104,5 @@ uint32_t LedInterface::Wheel(byte WheelPos) {
}
WheelPos -= 170;
return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
}
}
#endif

0 comments on commit fcdfbf6

Please sign in to comment.