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
### 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
**!!! 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)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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