#ifndef CAROUSEL_H #define CAROUSEL_H #include #include struct Screen { void (*draw)(U8G2 &u8g2); }; class Carousel { public: Carousel(Screen *screens, size_t screenCount); void draw(U8G2 &u8g2); bool consumeDirty(); void nextScreen(); void update(unsigned long now); private: Screen *screens_; size_t screenCount_; size_t currentIndex_; unsigned long nextUpdate_; bool dirty_; }; #endif