16#include <goodisplay/gdey029T94.h>
25 if (ble && !ble->isEnabled()) ble->enable();
28 lastConnected_ = ble && ble->isConnected();
43 if (nowMs - lastUpdate_ >= 1000) {
46 bool connected = ble && ble->isConnected();
47 if (connected != lastConnected_) {
48 lastConnected_ = connected;
62 auto* gfx =
static_cast<Gdey029T94*
>(
display->getNativeHandle());
65 const uint16_t width =
display->getWidth();
66 const uint16_t height =
display->getHeight();
68 if (!partial) gfx->fillScreen(EPD_WHITE);
70 gfx->setFont(
nullptr);
71 gfx->setTextColor(EPD_BLACK);
77 const char*
name = (ble && ble->getDeviceName()) ? ble->getDeviceName() :
"";
78 const bool connected = ble && ble->isConnected();
81 gfx->setCursor(8, 34);
86 gfx->setCursor(8, 50);
91 gfx->setCursor(8, 82);
93 :
ui::tr(
"core.ble_pairing_waiting"));
96 ui::tr(
"core.ble_pairing_exit"),
false);
static constexpr const char * kSleepInhibitor
Internationalization with English fallbacks in code and overlay translations loaded at runtime from a...
char name[cdc::hal::ISecureElement::RMEM_NAME_LEN]
void onEnter(void *context) override
void render(bool partial) override
void onTick(uint32_t nowMs) override
InputResult onKey(char key) override
bool addSleepInhibitor(const char *reason)
Sleep inhibitor API implementation.
static SleepManager & instance()
Returns singleton sleep manager instance.
bool removeSleepInhibitor(const char *reason)
Removes a sleep inhibitor reason.
void clearDirty() override
void markDirty() override
static ViewStack & instance()
Returns singleton view-stack instance.
void resetInactivityTimer()
IKeyboardProvider * getKeyboard()
IDisplay * getDisplayInstance()
Returns lazily created singleton display instance.
IBluetoothController * getBluetoothControllerInstance()
Returns singleton Bluetooth stub when NimBLE is unavailable.
void drawFooterBar(Gdey029T94 *gfx, uint16_t width, uint16_t height, const char *prefix, const char *hint, bool force=false)
Draws footer bar with optional prefix and hint text.
void drawHeaderCentered(Gdey029T94 *gfx, const char *title, int y, uint16_t width)
Draws a centered header title.
void printTruncated(Gdey029T94 *gfx, const char *text, int maxWidthPx)
Print text at the current cursor, truncated with an ellipsis to fit maxWidthPx. Caller must have alre...
void printText(Gdey029T94 *gfx, const char *text)
Draws CP437 text with the built-in 6x8 glyph font, byte-for-byte.
Centralized key-code constants for cdc_views.
const char * tr(const char *key)
Look up a translation by string key.
static constexpr char KEY_NO
Cancel / Back / Backspace.