From 2b53f120984cee99c21c1906cdc9fc083557f336 Mon Sep 17 00:00:00 2001 From: Konstantin Vukolov Date: Thu, 22 Jan 2026 18:06:44 +0300 Subject: [PATCH] Update guide --- USER_GUIDE.md | 2 +- src/CrossPointSettings.cpp | 1 - .../settings/CategorySettingsActivity.cpp | 2 +- .../RemoteLibrarySettingsActivity.cpp | 36 +++++++++---------- .../settings/RemoteLibrarySettingsActivity.h | 2 +- 5 files changed, 21 insertions(+), 22 deletions(-) diff --git a/USER_GUIDE.md b/USER_GUIDE.md index d670abb7..f4bbed5c 100644 --- a/USER_GUIDE.md +++ b/USER_GUIDE.md @@ -131,7 +131,7 @@ The Settings screen allows you to configure the device's behavior. There are a f - **Reader Paragraph Alignment**: Set the alignment of paragraphs; options are "Justified" (default), "Left", "Center", or "Right". - **Time to Sleep**: Set the duration of inactivity before the device automatically goes to sleep. - **Refresh Frequency**: Set how often the screen does a full refresh while reading to reduce ghosting. -- **Calibre Settings**: Set up integration for accessing a Calibre web library or connecting to Calibre as a wireless device. +- **Remote Library**: Set up integration for accessing an OPDS Library (like Calibre web library) or connecting to Calibre as a wireless device. - **Check for updates**: Check for firmware updates over WiFi. ### 3.6 Sleep Screen diff --git a/src/CrossPointSettings.cpp b/src/CrossPointSettings.cpp index 38bc09bf..c58eb572 100644 --- a/src/CrossPointSettings.cpp +++ b/src/CrossPointSettings.cpp @@ -118,7 +118,6 @@ bool CrossPointSettings::loadFromFile() { serialization::readString(inputFile, urlPath); strncpy(opdsPath, urlPath.c_str(), sizeof(opdsPath) - 1); opdsPath[sizeof(opdsPath) - 1] = '\0'; - } if (++settingsRead >= fileSettingsCount) break; serialization::readPod(inputFile, textAntiAliasing); diff --git a/src/activities/settings/CategorySettingsActivity.cpp b/src/activities/settings/CategorySettingsActivity.cpp index bffc191c..acc5f45a 100644 --- a/src/activities/settings/CategorySettingsActivity.cpp +++ b/src/activities/settings/CategorySettingsActivity.cpp @@ -5,12 +5,12 @@ #include -#include "RemoteLibrarySettingsActivity.h" #include "ClearCacheActivity.h" #include "CrossPointSettings.h" #include "KOReaderSettingsActivity.h" #include "MappedInputManager.h" #include "OtaUpdateActivity.h" +#include "RemoteLibrarySettingsActivity.h" #include "fontIds.h" void CategorySettingsActivity::taskTrampoline(void* param) { diff --git a/src/activities/settings/RemoteLibrarySettingsActivity.cpp b/src/activities/settings/RemoteLibrarySettingsActivity.cpp index 5a07d7f2..10c5c942 100644 --- a/src/activities/settings/RemoteLibrarySettingsActivity.cpp +++ b/src/activities/settings/RemoteLibrarySettingsActivity.cpp @@ -97,24 +97,24 @@ void RemoteLibrarySettingsActivity::handleSelection() { exitActivity(); updateRequired = true; })); - } else if (selectedIndex == 1) { - // OPDS Path - exitActivity(); - enterNewActivity(new KeyboardEntryActivity( - renderer, mappedInput, "OPDS Path", SETTINGS.opdsPath, 10, - 127, // maxLength - false, // not password - [this](const std::string& url) { - strncpy(SETTINGS.opdsPath, url.c_str(), sizeof(SETTINGS.opdsServerUrl) - 1); - SETTINGS.opdsPath[sizeof(SETTINGS.opdsPath) - 1] = '\0'; - SETTINGS.saveToFile(); - exitActivity(); - updateRequired = true; - }, - [this]() { - exitActivity(); - updateRequired = true; - })); + } else if (selectedIndex == 1) { + // OPDS Path + exitActivity(); + enterNewActivity(new KeyboardEntryActivity( + renderer, mappedInput, "OPDS Path", SETTINGS.opdsPath, 10, + 127, // maxLength + false, // not password + [this](const std::string& url) { + strncpy(SETTINGS.opdsPath, url.c_str(), sizeof(SETTINGS.opdsServerUrl) - 1); + SETTINGS.opdsPath[sizeof(SETTINGS.opdsPath) - 1] = '\0'; + SETTINGS.saveToFile(); + exitActivity(); + updateRequired = true; + }, + [this]() { + exitActivity(); + updateRequired = true; + })); } else if (selectedIndex == 2) { // Wireless Device - launch the activity (handles WiFi connection internally) diff --git a/src/activities/settings/RemoteLibrarySettingsActivity.h b/src/activities/settings/RemoteLibrarySettingsActivity.h index d8d9854f..623927c8 100644 --- a/src/activities/settings/RemoteLibrarySettingsActivity.h +++ b/src/activities/settings/RemoteLibrarySettingsActivity.h @@ -14,7 +14,7 @@ class RemoteLibrarySettingsActivity final : public ActivityWithSubactivity { public: explicit RemoteLibrarySettingsActivity(GfxRenderer& renderer, MappedInputManager& mappedInput, - const std::function& onBack) + const std::function& onBack) : ActivityWithSubactivity("RemoteLibrarySettings", renderer, mappedInput), onBack(onBack) {} void onEnter() override;