G.U.L.L.S. rebuilt to use PlatformIO

This commit is contained in:
2024-07-01 19:18:45 -04:00
commit f934849576
55 changed files with 4082 additions and 0 deletions

42
include/LogicalStrip.h Normal file
View File

@@ -0,0 +1,42 @@
#ifndef LOGICALSTRIP_H
#define LOGICALSTRIP_H
#include "LEDHAL.h"
#include "FastLED.h"
class LogicalStrip : public LEDHAL {
public:
LogicalStrip(char* _ledName, LEDHAL* _parent, int16_t _startPixel,
uint16_t _stopPixel) : LEDHAL(_ledName, false), parent(_parent),
startPixel(_startPixel), stopPixel(_stopPixel) {}
virtual ~LogicalStrip() {}
uint16_t getNumLEDs() { return stopPixel - startPixel; }
CRGB getColor(int16_t pixel) {
return parent->getColor(startPixel + pixel);
}
void setColor(uint16_t pixel, CRGB color) {
parent->setColor(startPixel + pixel, color);
}
void requestShow() {
parent->requestShow();
}
protected:
void updateLEDs() {
//This does nothing, because show should never be called on
//a logical strip
}
private:
LEDHAL*
parent;
int16_t
startPixel,
stopPixel;
};
#endif