pitrix/include/effect_clock.h
Fabian Schlenz 382631d7d7 Effect#loop now gets the time since the last run of the loop in ms. This enables
the effects to show animations that stay fluid independent of the current frame rate.
2019-10-01 06:29:32 +02:00

25 lines
560 B
C++

#pragma once
#include "Effect.h"
#include "prototypes.h"
#include "my_fastled.h"
#include "Window.h"
class ClockEffect : public Effect {
protected:
Window* window = new Window(0, LED_HEIGHT - 6, LED_WIDTH, 6);
public:
~ClockEffect();
virtual void loop(uint16_t ms);
String get_name() override { return "clock"; }
void loop_with_invert(bool invert);
void loop(boolean invert, CRGB fg_color, CRGB bg_color, uint8_t y);
};
class NightClockEffect : public ClockEffect {
public:
NightClockEffect();
void loop(uint16_t ms) override;
};