Files

36 lines
1.5 KiB
C++
Raw Permalink Normal View History

// Steins;Gate-themed animated pages for the ESPHome display: a Nixie-tube
// divergence meter, a D-mail sent from a flip phone through the Phone
// Microwave, the Future Gadget Lab inventory with live sensors, and a world
// line chart of today's solar power. Fan art: the pixel art
// (steins_sprites.h, from tools/steins_sprites.py) and all texts are original.
//
// Each function draws a whole page. Call it from a page lambda and list that
// page under animated_pages; the animation clock is the display's page_age_ms().
#pragma once
#include "el512_pages.h"
#include "esphome/components/display/display.h"
#include "esphome/core/time.h"
namespace esphome::el512 {
class EL512Display;
namespace steins {
struct Fonts {
display::BaseFont *nixie{nullptr}; // Nixie tube digits (Nixie One)
display::BaseFont *title{nullptr}; // typewriter headers (Special Elite)
display::BaseFont *mono{nullptr}; // small monospace (Share Tech Mono 14)
display::BaseFont *code{nullptr}; // larger monospace (Share Tech Mono 22)
display::BaseFont *pixel{nullptr}; // phone LCD (Press Start 2P 8)
display::BaseFont *jp{nullptr}; // a few Japanese words (Noto Sans JP)
};
void divergence_meter(EL512Display &it, const Fonts &f, ESPTime now);
void d_mail(EL512Display &it, const Fonts &f, const HomeData &d);
void gadget_lab(EL512Display &it, const Fonts &f, const HomeData &d);
void world_lines(EL512Display &it, const Fonts &f, const HomeData &d, ESPTime now);
} // namespace steins
} // namespace esphome::el512