2026-08-03 10:56:55 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <Arduino.h>
|
|
|
|
|
#include <M5GFX.h>
|
2026-08-03 11:25:41 -04:00
|
|
|
#include <qrcode.h>
|
2026-08-03 10:56:55 -04:00
|
|
|
#include "config.h"
|
|
|
|
|
#include "image_pipeline.h"
|
|
|
|
|
#include "immich_client.h"
|
|
|
|
|
#include "settings.h"
|
|
|
|
|
|
|
|
|
|
class PowerManager;
|
|
|
|
|
|
|
|
|
|
class DisplayManager {
|
|
|
|
|
public:
|
|
|
|
|
void begin(PowerManager& power);
|
2026-08-03 11:25:41 -04:00
|
|
|
void showSetupScreen();
|
2026-08-03 10:56:55 -04:00
|
|
|
void showImage(const ProcessedImage& img);
|
|
|
|
|
void showMessage(const char* title, const char* body);
|
feat: blurred letterbox, portrait pairs, overlay metadata, button fixes
- Letterbox: extend edge pixels outward with blur + fade to solid color
- Portrait: detect and pair portraits side-by-side, fallback to solo
- Metadata: add overlay mode (corner badge), time field, custom date/time
format strings (strftime), font size 1.5x, region-aware for pairs
- Buttons: swap G9/G10 to match physical layout, double-press random
button for deep sleep, SLP indicator drawn before sleep
- Boot: remove redundant 'Loading photos' screen (saves 17s refresh)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 15:53:06 -04:00
|
|
|
void showMetadata(const AssetInfo& info, uint8_t metaFlags, MetaPosition pos,
|
|
|
|
|
const String& dateFmt = "%Y-%m-%d", const String& timeFmt = "%H:%M:%S");
|
|
|
|
|
void showMetadataInRegion(const AssetInfo& info, uint8_t metaFlags, MetaPosition pos,
|
|
|
|
|
uint16_t regionX, uint16_t regionY, uint16_t regionW, uint16_t regionH,
|
|
|
|
|
const String& dateFmt = "%Y-%m-%d", const String& timeFmt = "%H:%M:%S");
|
|
|
|
|
void showSleepIndicator(MetaPosition metaPos);
|
|
|
|
|
void refresh();
|
2026-08-03 10:56:55 -04:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
PowerManager* _power = nullptr;
|
|
|
|
|
M5GFX* _display = nullptr;
|
|
|
|
|
|
|
|
|
|
void triggerRefresh();
|
|
|
|
|
uint16_t paletteToColor565(uint8_t index);
|
|
|
|
|
};
|