From 7c49d194f9f6b3333db47894e5610e8a907a9127 Mon Sep 17 00:00:00 2001 From: e2002 Date: Wed, 27 Aug 2025 09:49:05 +0300 Subject: [PATCH] v0.9.686 --- README.md | 4 ++++ yoRadio/src/core/netserver.cpp | 3 +++ yoRadio/src/core/options.h | 15 ++++----------- yoRadio/src/core/sdmanager.cpp | 2 +- yoRadio/src/core/timekeeper.cpp | 10 ++-------- yoRadio/src/main.cpp | 2 +- 6 files changed, 15 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 6bc1db8..fa6bf84 100644 --- a/README.md +++ b/README.md @@ -235,6 +235,10 @@ Work is in progress... --- ## Version history +#### v0.9.686 +- fixed SD card connection bug in configurations with `SD_SPIPINS` defined +- time synchronization setting + #### v0.9.682 - fixed bug with redundant epoch time being added to the tag in SD mode https://t.me/yoradiochat/66688 diff --git a/yoRadio/src/core/netserver.cpp b/yoRadio/src/core/netserver.cpp index 375967f..1f54090 100644 --- a/yoRadio/src/core/netserver.cpp +++ b/yoRadio/src/core/netserver.cpp @@ -111,6 +111,9 @@ size_t NetServer::chunkedHtmlPageCallback(uint8_t* buffer, size_t maxLen, size_t display.unlock(); return 0; } + #ifdef MAX_PL_READ_BYTES + if(maxLen>MAX_PL_READ_BYTES) maxLen=MAX_PL_READ_BYTES; + #endif size_t canread = (needread > maxLen) ? maxLen : needread; DBGVB("[%s] seek to %d in %s and read %d bytes with maxLen=%d", __func__, index, netserver.chunkedPathBuffer, canread, maxLen); //netserver.loop(); diff --git a/yoRadio/src/core/options.h b/yoRadio/src/core/options.h index 5037126..4d0a8d7 100644 --- a/yoRadio/src/core/options.h +++ b/yoRadio/src/core/options.h @@ -2,7 +2,7 @@ #define options_h #pragma once -#define YOVERSION "0.9.682" +#define YOVERSION "0.9.686" /******************************************************* DO NOT EDIT THIS FILE. @@ -481,16 +481,9 @@ The connection tables are located here https://github.com/e2002/yoradio#connecti #define L10N_LANGUAGE EN #endif -#ifdef VSPI -#define VOOPSENb VSPI -#else -#define VOOPSENb 3 -#endif - -#ifdef HSPI -#define HOOPSENb HSPI -#else -#define HOOPSENb 2 +#include +#if !defined(CONFIG_IDF_TARGET_ESP32) +#define VSPI FSPI #endif #ifndef SCREENSAVERSTARTUPDELAY diff --git a/yoRadio/src/core/sdmanager.cpp b/yoRadio/src/core/sdmanager.cpp index b561a93..faa1322 100644 --- a/yoRadio/src/core/sdmanager.cpp +++ b/yoRadio/src/core/sdmanager.cpp @@ -12,7 +12,7 @@ #include "player.h" #if defined(SD_SPIPINS) || SD_HSPI -SPIClass SDSPI(HOOPSENb); +SPIClass SDSPI(HSPI); #define SDREALSPI SDSPI #else #define SDREALSPI SPI diff --git a/yoRadio/src/core/timekeeper.cpp b/yoRadio/src/core/timekeeper.cpp index f9f7d93..f6d04da 100644 --- a/yoRadio/src/core/timekeeper.cpp +++ b/yoRadio/src/core/timekeeper.cpp @@ -177,20 +177,14 @@ void TimeKeeper::_doAfterWait(){ void TimeKeeper::_upClock(){ #if RTCSUPPORTED - if(config.isRTCFound()){ - rtc.getTime(&network.timeinfo); - if(network.timeinfo.tm_year>100){ - mktime(&network.timeinfo); - if(display.ready()) display.putRequest(CLOCK); - } - } + if(config.isRTCFound()) rtc.getTime(&network.timeinfo); #else if(network.timeinfo.tm_year>100 || network.status == SDREADY) { network.timeinfo.tm_sec++; mktime(&network.timeinfo); - if(display.ready()) display.putRequest(CLOCK); } #endif + if(display.ready()) display.putRequest(CLOCK); } void TimeKeeper::_upScreensaver(){ diff --git a/yoRadio/src/main.cpp b/yoRadio/src/main.cpp index 87dfbd8..73f09e3 100644 --- a/yoRadio/src/main.cpp +++ b/yoRadio/src/main.cpp @@ -25,7 +25,7 @@ #endif #if DSP_HSPI || TS_HSPI || VS_HSPI -SPIClass SPI2(HOOPSENb); +SPIClass SPI2(HSPI); #endif extern __attribute__((weak)) void yoradio_on_setup();