Merge remote-tracking branch 'origin/master' into feat-sdfonts-ui
# Conflicts: # assets/sd-fonts/sd-fonts.yaml # assets/sd-fonts/sd-fonts.yaml~HEAD
This commit is contained in:
@@ -278,6 +278,7 @@ class CrossPointSettings {
|
||||
BTN_GO_HOME,
|
||||
BTN_SLEEP,
|
||||
BTN_FORCE_REFRESH,
|
||||
BTN_FORCE_FAST_REFRESH,
|
||||
BTN_OPEN_TOC,
|
||||
BTN_OPEN_BOOKMARKS,
|
||||
BTN_STAR_PAGE,
|
||||
|
||||
+7
-16
@@ -140,13 +140,13 @@ inline const std::vector<SettingInfo> list = {
|
||||
// All entries share the same ordered action-label list; the submenu groups them behind
|
||||
// a single placeholder row in the device UI.
|
||||
// Shared action options (everything except the first "default" entry).
|
||||
#define BTN_ACT_OPTIONS \
|
||||
StrId::STR_BTN_ACT_PAGE_FORWARD, StrId::STR_BTN_ACT_PAGE_BACK, StrId::STR_BTN_ACT_PAGE_FORWARD_10, \
|
||||
StrId::STR_BTN_ACT_PAGE_BACK_10, StrId::STR_BTN_ACT_GO_HOME, StrId::STR_BTN_ACT_SLEEP, \
|
||||
StrId::STR_BTN_ACT_FORCE_REFRESH, StrId::STR_BTN_ACT_OPEN_TOC, StrId::STR_BTN_ACT_OPEN_BOOKMARKS, \
|
||||
StrId::STR_BTN_ACT_STAR_PAGE, StrId::STR_BTN_ACT_FOOTNOTES, StrId::STR_BTN_ACT_NEXT_SECTION, \
|
||||
StrId::STR_BTN_ACT_PREV_SECTION, StrId::STR_BTN_ACT_EXIT_READER, StrId::STR_BTN_ACT_READER_MENU, \
|
||||
StrId::STR_BTN_ACT_TOGGLE_BIONIC_READING, StrId::STR_BTN_ACT_KOREADER_SYNC
|
||||
#define BTN_ACT_OPTIONS \
|
||||
StrId::STR_BTN_ACT_PAGE_FORWARD, StrId::STR_BTN_ACT_PAGE_BACK, StrId::STR_BTN_ACT_PAGE_FORWARD_10, \
|
||||
StrId::STR_BTN_ACT_PAGE_BACK_10, StrId::STR_BTN_ACT_GO_HOME, StrId::STR_BTN_ACT_SLEEP, \
|
||||
StrId::STR_BTN_ACT_FORCE_REFRESH, StrId::STR_BTN_ACT_FORCE_FAST_REFRESH, StrId::STR_BTN_ACT_OPEN_TOC, \
|
||||
StrId::STR_BTN_ACT_OPEN_BOOKMARKS, StrId::STR_BTN_ACT_STAR_PAGE, StrId::STR_BTN_ACT_FOOTNOTES, \
|
||||
StrId::STR_BTN_ACT_NEXT_SECTION, StrId::STR_BTN_ACT_PREV_SECTION, StrId::STR_BTN_ACT_EXIT_READER, \
|
||||
StrId::STR_BTN_ACT_READER_MENU, StrId::STR_BTN_ACT_TOGGLE_BIONIC_READING, StrId::STR_BTN_ACT_KOREADER_SYNC
|
||||
|
||||
// Back button: short=exit reader, double=ignore, long=go home
|
||||
SettingInfo::Enum(StrId::STR_BTN_SHORT_PRESS, &CrossPointSettings::btnShortBack, {StrId::STR_BTN_DEF_EXIT_READER},
|
||||
@@ -276,15 +276,6 @@ inline const std::vector<SettingInfo> list = {
|
||||
SettingInfo::Toggle(StrId::STR_KO_SYNC_ON_BOOK_CLOSE, &CrossPointSettings::koSyncOnBookClose, "koSyncOnBookClose",
|
||||
StrId::STR_KOREADER_SYNC),
|
||||
|
||||
// --- OPDS Browser (web-only, uses CrossPointSettings char arrays) ---
|
||||
SettingInfo::String(StrId::STR_OPDS_SERVER_URL, SETTINGS.opdsServerUrl, sizeof(SETTINGS.opdsServerUrl),
|
||||
"opdsServerUrl", StrId::STR_OPDS_BROWSER),
|
||||
SettingInfo::String(StrId::STR_USERNAME, SETTINGS.opdsUsername, sizeof(SETTINGS.opdsUsername), "opdsUsername",
|
||||
StrId::STR_OPDS_BROWSER),
|
||||
SettingInfo::String(StrId::STR_PASSWORD, SETTINGS.opdsPassword, sizeof(SETTINGS.opdsPassword), "opdsPassword",
|
||||
StrId::STR_OPDS_BROWSER)
|
||||
.withObfuscated(),
|
||||
|
||||
// --- Status Bar Settings (web-only, uses StatusBarSettingsActivity) ---
|
||||
SettingInfo::Toggle(StrId::STR_CHAPTER_PAGE_COUNT, &CrossPointSettings::statusBarChapterPageCount,
|
||||
"statusBarChapterPageCount", StrId::STR_CUSTOMISE_STATUS_BAR),
|
||||
|
||||
@@ -398,7 +398,7 @@ void OpdsBookBrowserActivity::chooseBookFormat(const OpdsEntry& book) {
|
||||
|
||||
selectedBookIndex = selectorIndex;
|
||||
formatSelectorIndex = 0;
|
||||
formatSelectionLabels = buildOpdsFormatSelectionLabels(book.acquisitionLinks, SETTINGS.opdsServerUrl);
|
||||
formatSelectionLabels = buildOpdsFormatSelectionLabels(book.acquisitionLinks, server.url);
|
||||
state = BrowserState::FORMAT_SELECTION;
|
||||
requestUpdate();
|
||||
}
|
||||
@@ -411,9 +411,8 @@ void OpdsBookBrowserActivity::downloadBook(const OpdsEntry& book, const OpdsAcqu
|
||||
downloadTotal = 0;
|
||||
requestUpdate(true);
|
||||
|
||||
std::string downloadUrl = (acquisition.href.rfind("http", 0) == 0)
|
||||
? acquisition.href
|
||||
: UrlUtils::buildUrl(SETTINGS.opdsServerUrl, acquisition.href);
|
||||
std::string downloadUrl =
|
||||
(acquisition.href.rfind("http", 0) == 0) ? acquisition.href : UrlUtils::buildUrl(server.url, acquisition.href);
|
||||
std::string filename = "/" +
|
||||
StringUtils::sanitizeFilename((book.author.empty() ? "" : book.author + " - ") + book.title) +
|
||||
acquisition.fileExtension;
|
||||
|
||||
+14
-1
@@ -323,6 +323,11 @@ void loop() {
|
||||
powerManager.setPowerSaving(false); // Restore normal CPU frequency on user activity
|
||||
}
|
||||
|
||||
// Power-hold timer for sleep. Hoisted above the screenshot block so the
|
||||
// screenshot path can clear it and avoid a stale POWER press triggering sleep
|
||||
// after the screenshot completes.
|
||||
static unsigned long powerHoldStart = 0;
|
||||
|
||||
static bool screenshotButtonsReleased = true;
|
||||
if (gpio.isPressed(HalGPIO::BTN_POWER) && gpio.isPressed(HalGPIO::BTN_DOWN)) {
|
||||
if (screenshotButtonsReleased) {
|
||||
@@ -331,6 +336,10 @@ void loop() {
|
||||
RenderLock lock;
|
||||
ScreenshotUtil::takeScreenshot(renderer);
|
||||
}
|
||||
// Discard the POWER+DOWN presses so they don't fire Short/Long events
|
||||
// (e.g. page turn, sleep) once the user releases the combo.
|
||||
buttonEventManager.drain();
|
||||
powerHoldStart = 0;
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
@@ -350,7 +359,6 @@ void loop() {
|
||||
// (wake-up press) is never misinterpreted as a "go to sleep" press.
|
||||
// The power button long-press is not user-remappable, so this path always owns it.
|
||||
// Sleep mapped to other buttons is handled by the dispatcher's BTN_SLEEP case below.
|
||||
static unsigned long powerHoldStart = 0;
|
||||
if (gpio.wasPressed(HalGPIO::BTN_POWER)) {
|
||||
powerHoldStart = millis();
|
||||
LOG_DBG("MAIN", "loop: power button press detected (fresh edge)");
|
||||
@@ -499,6 +507,11 @@ void loop() {
|
||||
renderer.displayBuffer(HalDisplay::HALF_REFRESH);
|
||||
break;
|
||||
}
|
||||
case BA::BTN_FORCE_FAST_REFRESH: {
|
||||
RenderLock lock;
|
||||
renderer.displayBuffer(HalDisplay::FAST_REFRESH);
|
||||
break;
|
||||
}
|
||||
case BA::BTN_OPEN_TOC:
|
||||
activityManager.dispatchButtonAction(BA::BTN_OPEN_TOC);
|
||||
break;
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
// Override the prebuilt libbootloader_support.a implementation.
|
||||
// The X3's validation code misreads the new image's esp_app_desc_t through a
|
||||
// misaligned bootloader_mmap pointer, producing garbage eFuse block revision
|
||||
// values that fail the check. Safe to skip: the eFuse block revision gate is
|
||||
// a manufacturing concern, not a runtime safety issue.
|
||||
#include <esp_err.h>
|
||||
esp_err_t __wrap_bootloader_common_check_efuse_blk_validity(uint32_t min_rev_full, uint32_t max_rev_full) {
|
||||
(void)min_rev_full;
|
||||
(void)max_rev_full;
|
||||
return ESP_OK;
|
||||
}
|
||||
Reference in New Issue
Block a user