From 18a7dc72ce25581bca73da3cff914a892650ab8d Mon Sep 17 00:00:00 2001 From: Eliz Date: Wed, 21 Jan 2026 22:24:44 +0000 Subject: [PATCH] update user guide --- USER_GUIDE.md | 4 ++++ src/CrossPointSettings.h | 2 +- src/activities/boot_sleep/SleepActivity.cpp | 14 +++----------- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/USER_GUIDE.md b/USER_GUIDE.md index d670abb7..75976574 100644 --- a/USER_GUIDE.md +++ b/USER_GUIDE.md @@ -93,6 +93,10 @@ The Settings screen allows you to configure the device's behavior. There are a f - **Sleep Screen Cover Mode**: How to display the book cover when "Cover" sleep screen is selected: - "Fit" (default) - Scale the image down to fit centered on the screen, padding with white borders as necessary - "Crop" - Scale the image down and crop as necessary to try to to fill the screen (Note: this is experimental and may not work as expected) +- **Sleep Screen Cover Filter**: What filter will be applied to the book cover when "Cover" sleep screen is selected + - "No filter" (default) - The cover image will be converted to a grayscale image and displayed as it is + - "B&W" - The image will be displayed as a black & white image without grayscale conversion + - "Inverted B&W" - The image will be inverted as in white&black and will be displayed without grayscale conversion - **Status Bar**: Configure the status bar displayed while reading: - "None" - No status bar - "No Progress" - Show status bar without reading progress diff --git a/src/CrossPointSettings.h b/src/CrossPointSettings.h index ed6a7c0b..33b59e5c 100644 --- a/src/CrossPointSettings.h +++ b/src/CrossPointSettings.h @@ -18,7 +18,7 @@ class CrossPointSettings { // Should match with SettingsActivity text enum SLEEP_SCREEN_MODE { DARK = 0, LIGHT = 1, CUSTOM = 2, COVER = 3, BLANK = 4 }; enum SLEEP_SCREEN_COVER_MODE { FIT = 0, CROP = 1 }; - enum SLEEP_SCREEN_COVER_FILTER { NO_FILTER = 0, INVERTED = 1, BLACK_AND_WHITE = 2, INVERTED_BLACK_AND_WHITE = 3 }; + enum SLEEP_SCREEN_COVER_FILTER { NO_FILTER = 0, BLACK_AND_WHITE = 2, INVERTED_BLACK_AND_WHITE = 3 }; // Status bar display type enum enum STATUS_BAR_MODE { NONE = 0, NO_PROGRESS = 1, FULL = 2 }; diff --git a/src/activities/boot_sleep/SleepActivity.cpp b/src/activities/boot_sleep/SleepActivity.cpp index 72c71064..2fae23ce 100644 --- a/src/activities/boot_sleep/SleepActivity.cpp +++ b/src/activities/boot_sleep/SleepActivity.cpp @@ -180,16 +180,12 @@ void SleepActivity::renderBitmapSleepScreen(const Bitmap& bitmap) const { Serial.printf("[%lu] [SLP] drawing to %d x %d\n", millis(), x, y); renderer.clearScreen(); - const bool hasGreyscale = - bitmap.hasGreyscale() && - SETTINGS.sleepScreenCoverFilter != CrossPointSettings::SLEEP_SCREEN_COVER_FILTER::BLACK_AND_WHITE && - SETTINGS.sleepScreenCoverFilter != CrossPointSettings::SLEEP_SCREEN_COVER_FILTER::INVERTED_BLACK_AND_WHITE; + const bool hasGreyscale = bitmap.hasGreyscale() && + SETTINGS.sleepScreenCoverFilter == CrossPointSettings::SLEEP_SCREEN_COVER_FILTER::NO_FILTER; renderer.drawBitmap(bitmap, x, y, pageWidth, pageHeight, cropX, cropY); - if (SETTINGS.sleepScreenCoverFilter == CrossPointSettings::SLEEP_SCREEN_COVER_FILTER::INVERTED || - SETTINGS.sleepScreenCoverFilter == - CrossPointSettings::SLEEP_SCREEN_COVER_FILTER::INVERTED_BLACK_AND_WHITE) { + if (SETTINGS.sleepScreenCoverFilter == CrossPointSettings::SLEEP_SCREEN_COVER_FILTER::INVERTED_BLACK_AND_WHITE) { renderer.invertScreen(); } @@ -208,10 +204,6 @@ void SleepActivity::renderBitmapSleepScreen(const Bitmap& bitmap) const { renderer.drawBitmap(bitmap, x, y, pageWidth, pageHeight, cropX, cropY); renderer.copyGrayscaleMsbBuffers(); - if (SETTINGS.sleepScreenCoverFilter == CrossPointSettings::SLEEP_SCREEN_COVER_FILTER::INVERTED) { - renderer.grayscaleRevert(); - } - renderer.displayGrayBuffer(); renderer.setRenderMode(GfxRenderer::BW); }