esp32-sk6812/include/Animation/ImageScrollerAnimation.h
Thomas Kolb d5357b2021 Show IP address on startup
To accomplish this, the following changes were made:

- Added an image-scrolling animation
- Implemented a bitmap font engine to generate an image from text
- On startup, an image-scrolling animation is set up with an image
  generated from the local IP address
2019-12-23 19:56:33 +01:00

32 lines
533 B
C++

#pragma once
#include <random>
#include <vector>
#include "Animation.h"
#include "Bitmap.h"
class ImageScrollerAnimation : public Animation
{
public:
ImageScrollerAnimation(Fader *fader, Bitmap *image, uint32_t interval = 3);
void loop(uint64_t frame) override;
void stop(void) override
{
m_stopping = true;
}
void reset(void) override;
private:
Bitmap m_image;
int32_t m_startIdx;
uint32_t m_interval;
bool m_stopping;
};