Public Access
The hardcoded clock is now the built-in dynamic page "Clock". A dynamic page has a background bitmap per time of day and up to 8 elements (clock, date, Home Assistant value, text), each with position, alignment, font and overlay. Pages are drawn on the ESP32, also for the web previews. - Pages tab in the web UI: page editor with drag and drop, font upload (TTF/OTF converted in the browser to the FDF1 dot font format) - Built-in fonts Small, Normal, Large and Full height (generated by tools/make_builtin_fonts.py), built-in bitmaps Pikachu and Pikachu yawning - Home Assistant values over the REST API (URL and token in the HA tab) - Settings version 4: evening settings removed (now time slots of the Clock page), old records are converted - HA Mode dropdown lists the dynamic pages and bitmaps Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
41 lines
1.1 KiB
C++
41 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include "BROSE9323.h"
|
|
#include "logic/bitmap_format.h"
|
|
#include "logic/display_controller.h"
|
|
#include "logic/page_render.h"
|
|
|
|
// Draws the screens on the flipdot display. Each method sends one complete frame.
|
|
class FlipdotFrames : public Frames
|
|
{
|
|
public:
|
|
FlipdotFrames(BROSE9323 &display, PageResources &resources);
|
|
|
|
// The page set with setDynamicPage(), drawn for this time
|
|
void dynamicPage(const LocalTime &time) override;
|
|
// "No WiFi" with the time below it
|
|
void noWifi(int hour, int minute) override;
|
|
// The bitmap set with setPageBitmap()
|
|
void page() override;
|
|
// The image set with setLiveBitmap()
|
|
void live() override;
|
|
// Blank, or the bitmap set with setOffBitmap()
|
|
void off() override;
|
|
|
|
void setDynamicPage(const DynamicPage &page);
|
|
void setPageBitmap(const uint8_t *bitmap);
|
|
void setLiveBitmap(const uint8_t *bitmap);
|
|
// nullptr: blank
|
|
void setOffBitmap(const uint8_t *bitmap);
|
|
|
|
private:
|
|
BROSE9323 &_display;
|
|
PageResources &_resources;
|
|
DynamicPage _dynamic;
|
|
uint8_t _page[BITMAP_BYTES] = {};
|
|
uint8_t _live[BITMAP_BYTES] = {};
|
|
uint8_t _off[BITMAP_BYTES] = {}; // all zero: blank
|
|
|
|
void _drawFullScreen(const uint8_t *bitmap);
|
|
};
|