This commit is contained in:
e2002
2025-01-17 14:44:21 +03:00
parent e4175e8a8e
commit 3f5562b4c7
7 changed files with 26 additions and 8 deletions

View File

@@ -234,6 +234,12 @@ Work is in progress...
--- ---
## Version history ## Version history
### 0.9.428
- fixed freezing after SD scanning during playback
- AsyncWebSocket queue increased to 128
- fixed VU meter overlapping the clock on displays
- fixed Guru Meditation error when loading in SD mode with SD card removed
### 0.9.420 ### 0.9.420
**!!! a [full update](#update-over-web-interface) with Sketch data upload is required. After updating please press CTRL+F5 in browser !!!** **!!! a [full update](#update-over-web-interface) with Sketch data upload is required. After updating please press CTRL+F5 in browser !!!**
- added screensaver mode during playback, configurable via the web interface, pull request[#129](https://github.com/e2002/yoradio/pull/129) - added screensaver mode during playback, configurable via the web interface, pull request[#129](https://github.com/e2002/yoradio/pull/129)

View File

@@ -19,11 +19,13 @@
*/ */
#ifndef ASYNCEVENTSOURCE_H_ #ifndef ASYNCEVENTSOURCE_H_
#define ASYNCEVENTSOURCE_H_ #define ASYNCEVENTSOURCE_H_
#include "../core/options.h"
#include <Arduino.h> #include <Arduino.h>
#ifdef ESP32 #ifdef ESP32
#include "AsyncTCP.h" #include "AsyncTCP.h"
#define SSE_MAX_QUEUED_MESSAGES 32 #ifndef SSE_MAX_QUEUED_MESSAGES
#define SSE_MAX_QUEUED_MESSAGES 32
#endif
#else #else
#include <ESPAsyncTCP.h> #include <ESPAsyncTCP.h>
#define SSE_MAX_QUEUED_MESSAGES 8 #define SSE_MAX_QUEUED_MESSAGES 8

View File

@@ -20,11 +20,13 @@
*/ */
#ifndef ASYNCWEBSOCKET_H_ #ifndef ASYNCWEBSOCKET_H_
#define ASYNCWEBSOCKET_H_ #define ASYNCWEBSOCKET_H_
#include "../core/options.h"
#include <Arduino.h> #include <Arduino.h>
#ifdef ESP32 #ifdef ESP32
#include "AsyncTCP.h" #include "AsyncTCP.h"
#define WS_MAX_QUEUED_MESSAGES 32 #ifndef WS_MAX_QUEUED_MESSAGES
#define WS_MAX_QUEUED_MESSAGES 128 //32
#endif
#else #else
#include <ESPAsyncTCP.h> #include <ESPAsyncTCP.h>
#define WS_MAX_QUEUED_MESSAGES 8 #define WS_MAX_QUEUED_MESSAGES 8

View File

@@ -114,6 +114,7 @@ void Config::_setupVersion(){
#ifdef USE_SD #ifdef USE_SD
void Config::changeMode(int newmode){ void Config::changeMode(int newmode){
bool pir = player.isRunning();
if(SDC_CS==255) return; if(SDC_CS==255) return;
if(getMode()==PM_SDCARD) { if(getMode()==PM_SDCARD) {
sdResumePos = player.getFilePos(); sdResumePos = player.getFilePos();
@@ -140,6 +141,7 @@ void Config::changeMode(int newmode){
saveValue(&store.play_mode, store.play_mode, true, true); saveValue(&store.play_mode, store.play_mode, true, true);
_SDplaylistFS = getMode()==PM_SDCARD?&sdman:(true?&SPIFFS:_SDplaylistFS); _SDplaylistFS = getMode()==PM_SDCARD?&sdman:(true?&SPIFFS:_SDplaylistFS);
if(getMode()==PM_SDCARD){ if(getMode()==PM_SDCARD){
if(pir) player.sendCommand({PR_STOP, 0});
display.putRequest(NEWMODE, SDCHANGE); display.putRequest(NEWMODE, SDCHANGE);
while(display.mode()!=SDCHANGE) while(display.mode()!=SDCHANGE)
delay(10); delay(10);
@@ -149,8 +151,9 @@ void Config::changeMode(int newmode){
if(network.status==SDREADY) ESP.restart(); if(network.status==SDREADY) ESP.restart();
sdman.stop(); sdman.stop();
} }
if(!_bootDone) return;
initPlaylistMode(); initPlaylistMode();
if (store.smartstart == 1) player.sendCommand({PR_PLAY, getMode()==PM_WEB?store.lastStation:store.lastSdStation}); if (pir) player.sendCommand({PR_PLAY, getMode()==PM_WEB?store.lastStation:store.lastSdStation});
netserver.resetQueue(); netserver.resetQueue();
netserver.requestOnChange(GETPLAYERMODE, 0); netserver.requestOnChange(GETPLAYERMODE, 0);
netserver.requestOnChange(GETMODE, 0); netserver.requestOnChange(GETMODE, 0);

View File

@@ -268,7 +268,10 @@ void Display::_swichMode(displayMode_e newmode) {
_mode = newmode; _mode = newmode;
dsp.setScrollId(NULL); dsp.setScrollId(NULL);
if (newmode == PLAYER) { if (newmode == PLAYER) {
_clock.moveBack(); if(player.isRunning())
_clock.moveTo(clockMove);
else
_clock.moveBack();
#ifdef DSP_LCD #ifdef DSP_LCD
dsp.clearDsp(); dsp.clearDsp();
#endif #endif

View File

@@ -1,7 +1,7 @@
#ifndef options_h #ifndef options_h
#define options_h #define options_h
#define YOVERSION "0.9.420" #define YOVERSION "0.9.428"
/******************************************************* /*******************************************************
DO NOT EDIT THIS FILE. DO NOT EDIT THIS FILE.

View File

@@ -3,6 +3,7 @@
#define USE_SD #define USE_SD
#include "sdmanager.h" #include "sdmanager.h"
#include "display.h" #include "display.h"
#include "player.h"
#if defined(SD_SPIPINS) || SD_HSPI #if defined(SD_SPIPINS) || SD_HSPI
SPIClass SDSPI(HOOPSENb); SPIClass SDSPI(HOOPSENb);
@@ -12,7 +13,7 @@ SPIClass SDSPI(HOOPSENb);
#endif #endif
#ifndef SDSPISPEED #ifndef SDSPISPEED
#define SDSPISPEED 4000000 #define SDSPISPEED 20000000
#endif #endif
SDManager sdman(FSImplPtr(new VFSImpl())); SDManager sdman(FSImplPtr(new VFSImpl()));
@@ -75,6 +76,7 @@ void SDManager::listSD(File &plSDfile, File &plSDindex, const char* dirname, uin
char* filePath; char* filePath;
while (true) { while (true) {
vTaskDelay(2); vTaskDelay(2);
player.loop();
bool isDir; bool isDir;
String fileName = root.getNextFileName(&isDir); String fileName = root.getNextFileName(&isDir);
if (fileName.isEmpty()) break; if (fileName.isEmpty()) break;