2026-10-13 00:56:32 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "BROSE9323.h"
|
2026-10-13 01:52:34 +02:00
|
|
|
#include "logic/bitmap_format.h"
|
2026-10-13 00:56:32 +02:00
|
|
|
#include "logic/display_controller.h"
|
2026-10-15 19:43:59 +02:00
|
|
|
#include "logic/page_render.h"
|
2026-10-13 00:56:32 +02:00
|
|
|
|
|
|
|
|
// Draws the screens on the flipdot display. Each method sends one complete frame.
|
|
|
|
|
class FlipdotFrames : public Frames
|
|
|
|
|
{
|
|
|
|
|
public:
|
2026-10-15 19:43:59 +02:00
|
|
|
FlipdotFrames(BROSE9323 &display, PageResources &resources);
|
2026-10-13 00:56:32 +02:00
|
|
|
|
2026-10-15 19:43:59 +02:00
|
|
|
// The page set with setDynamicPage(), drawn for this time
|
|
|
|
|
void dynamicPage(const LocalTime &time) override;
|
2026-10-13 01:34:04 +02:00
|
|
|
// "No WiFi" with the time below it
|
|
|
|
|
void noWifi(int hour, int minute) override;
|
2026-10-13 01:52:34 +02:00
|
|
|
// The bitmap set with setPageBitmap()
|
|
|
|
|
void page() override;
|
|
|
|
|
// The image set with setLiveBitmap()
|
|
|
|
|
void live() override;
|
2026-10-15 01:29:01 +02:00
|
|
|
// Blank, or the bitmap set with setOffBitmap()
|
|
|
|
|
void off() override;
|
2026-10-13 00:56:32 +02:00
|
|
|
|
2026-10-15 19:43:59 +02:00
|
|
|
void setDynamicPage(const DynamicPage &page);
|
2026-10-13 01:52:34 +02:00
|
|
|
void setPageBitmap(const uint8_t *bitmap);
|
|
|
|
|
void setLiveBitmap(const uint8_t *bitmap);
|
2026-10-15 01:29:01 +02:00
|
|
|
// nullptr: blank
|
|
|
|
|
void setOffBitmap(const uint8_t *bitmap);
|
2026-10-13 01:52:34 +02:00
|
|
|
|
2026-10-13 00:56:32 +02:00
|
|
|
private:
|
|
|
|
|
BROSE9323 &_display;
|
2026-10-15 19:43:59 +02:00
|
|
|
PageResources &_resources;
|
|
|
|
|
DynamicPage _dynamic;
|
2026-10-13 01:52:34 +02:00
|
|
|
uint8_t _page[BITMAP_BYTES] = {};
|
|
|
|
|
uint8_t _live[BITMAP_BYTES] = {};
|
2026-10-15 01:29:01 +02:00
|
|
|
uint8_t _off[BITMAP_BYTES] = {}; // all zero: blank
|
2026-10-13 01:52:34 +02:00
|
|
|
|
|
|
|
|
void _drawFullScreen(const uint8_t *bitmap);
|
2026-10-13 00:56:32 +02:00
|
|
|
};
|