Root cause: Panel_ED2208's epd_quality mode applies _dither_row_rgb_pair (diagonal bias pattern with dither=140) during _exec_transfer(). Since our ImagePipeline already does proper Floyd-Steinberg dithering, the driver's additional dithering was creating visible diagonal artifacts. Fix: setEpdMode(epd_fastest) selects _dither_row_none (clean nearest-color lookup, no spatial bias). On Panel_ED2208 this only affects the dither function — NOT refresh quality or waveform. Also: default dither_noise setting to OFF since error scatter was targeting the wrong layer (it made gradient areas fuzzier without fixing the real problem in the display driver). Co-authored-by: Cursor <cursoragent@cursor.com>
43 lines
1.2 KiB
C++
43 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include <Arduino.h>
|
|
#include <vector>
|
|
#include "settings.h"
|
|
|
|
class ImmichClient;
|
|
|
|
class PhotoQueue {
|
|
public:
|
|
void begin(ImmichClient& client, SettingsManager& settings);
|
|
bool sync();
|
|
String next();
|
|
String random();
|
|
String current();
|
|
size_t size();
|
|
bool needsResync();
|
|
String findNextPortrait();
|
|
|
|
private:
|
|
ImmichClient* _client = nullptr;
|
|
SettingsManager* _settings = nullptr;
|
|
|
|
std::vector<String> _queue;
|
|
std::vector<String> _shown; // Recently shown IDs for dedup on refill
|
|
size_t _cursor = 0;
|
|
unsigned long _lastSyncTime = 0;
|
|
unsigned long _lastSyncAttempt = 0;
|
|
unsigned long _syncRetryDelay = 10000;
|
|
|
|
static constexpr unsigned long SYNC_RETRY_MIN = 10000; // 10 seconds
|
|
static constexpr unsigned long SYNC_RETRY_MAX = 300000; // 5 minutes
|
|
static constexpr size_t TARGET_QUEUE_SIZE = 50;
|
|
static constexpr int MAX_FETCH_ROUNDS = 5;
|
|
static constexpr size_t MAX_SHOWN_HISTORY = 200;
|
|
|
|
void shuffle();
|
|
void sortChronological(const std::vector<String>& dates, bool reverse);
|
|
void applyRecencyWeighting(const std::vector<String>& dates, bool favorRecent);
|
|
void applyFavoritesWeighting();
|
|
std::vector<String> getSelectedAlbumIds();
|
|
};
|