Initial Commit

This commit is contained in:
2026-03-31 10:19:59 -04:00
commit a1af89eef1
15 changed files with 444 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
#ifndef SLIDINGSQUAREPACKEDBITMAP_H
#define SLIDINGSQUAREPACKEDBITMAP_H
#include <Arduino.h>
#include <FastLED.h>
#include "GlobalSettings.h"
#include "Animation.h"
#include "Utilities.h"
class SlidingSquarePackedBitmap : public Animation {
public:
SlidingSquarePackedBitmap(long _updateTime, const uint8_t* _bitmap, CRGB _color) :
Animation(_updateTime, (WIDTH - 8) * 2 * 5), bitmap(_bitmap), color(_color),
currentX(0), currentDirection(1) {}
void initialize(CRGB* leds) {
currentX = 0;
currentDirection = 1;
resetTimer();
Utilities::setAll(leds, MODE, CRGB::Black);
}
void execute(CRGB* leds);
private:
const uint8_t*
bitmap;
uint16_t
currentX;
int8_t
currentDirection;
CRGB
color;
};
#endif