Files
planar-EL512.256-H/components/el512/trek.h
T
mangavalkandClaude Opus 5.5 13a499fd97 Add four Star Trek / Lower Decks pages with a 3D printer red alert
LCARS ship status, the Cerritos duty roster from the agenda, a warp core
driven by solar power with Rutherford's advice, and a captain's log under
a viewscreen. Original pixel art in tools/trek_sprites.py.

When the 3D printer (Moonraker current_print_state, `printer`
substitution) is paused or in error, the panel jumps to LCARS Status in
red alert and holds the rotation until it carries on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 16:29:29 +02:00

39 lines
1.5 KiB
C++

// Star Trek / Lower Decks-themed animated pages for the ESPHome display: an
// LCARS ship status screen (with red alert when the 3D printer pauses), the
// Cerritos duty roster from the agenda, a warp core driven by solar power,
// and a captain's log under a viewscreen. Fan art: the pixel art
// (trek_sprites.h, from tools/trek_sprites.py), layouts and 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 trek {
struct Fonts {
display::BaseFont *small{nullptr}; // LCARS labels (Antonio 16)
display::BaseFont *medium{nullptr}; // LCARS headers (Antonio 26)
display::BaseFont *large{nullptr}; // LCARS big numbers (Antonio 60)
display::BaseFont *text{nullptr}; // log and roster text (Nunito 16)
display::BaseFont *pixel{nullptr}; // tiny data (Press Start 2P 8)
};
// Red alert: the 3D printer is paused or in error and needs a look.
bool red_alert(const HomeData &d);
void lcars_status(EL512Display &it, const Fonts &f, const HomeData &d, ESPTime now);
void duty_roster(EL512Display &it, const Fonts &f, const HomeData &d, ESPTime now);
void warp_core(EL512Display &it, const Fonts &f, const HomeData &d);
void captains_log(EL512Display &it, const Fonts &f, const HomeData &d, ESPTime now);
} // namespace trek
} // namespace esphome::el512