Skip to content

Commit 3f5562b

Browse files
committed
v0.9.428
1 parent e4175e8 commit 3f5562b

File tree

7 files changed

+26
-8
lines changed

7 files changed

+26
-8
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,12 @@ Work is in progress...
234234

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

yoRadio/src/AsyncWebServer/AsyncEventSource.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@
1919
*/
2020
#ifndef ASYNCEVENTSOURCE_H_
2121
#define ASYNCEVENTSOURCE_H_
22-
22+
#include "../core/options.h"
2323
#include <Arduino.h>
2424
#ifdef ESP32
2525
#include "AsyncTCP.h"
26-
#define SSE_MAX_QUEUED_MESSAGES 32
26+
#ifndef SSE_MAX_QUEUED_MESSAGES
27+
#define SSE_MAX_QUEUED_MESSAGES 32
28+
#endif
2729
#else
2830
#include <ESPAsyncTCP.h>
2931
#define SSE_MAX_QUEUED_MESSAGES 8

yoRadio/src/AsyncWebServer/AsyncWebSocket.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@
2020
*/
2121
#ifndef ASYNCWEBSOCKET_H_
2222
#define ASYNCWEBSOCKET_H_
23-
23+
#include "../core/options.h"
2424
#include <Arduino.h>
2525
#ifdef ESP32
2626
#include "AsyncTCP.h"
27-
#define WS_MAX_QUEUED_MESSAGES 32
27+
#ifndef WS_MAX_QUEUED_MESSAGES
28+
#define WS_MAX_QUEUED_MESSAGES 128 //32
29+
#endif
2830
#else
2931
#include <ESPAsyncTCP.h>
3032
#define WS_MAX_QUEUED_MESSAGES 8

yoRadio/src/core/config.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ void Config::_setupVersion(){
114114
#ifdef USE_SD
115115

116116
void Config::changeMode(int newmode){
117+
bool pir = player.isRunning();
117118
if(SDC_CS==255) return;
118119
if(getMode()==PM_SDCARD) {
119120
sdResumePos = player.getFilePos();
@@ -140,6 +141,7 @@ void Config::changeMode(int newmode){
140141
saveValue(&store.play_mode, store.play_mode, true, true);
141142
_SDplaylistFS = getMode()==PM_SDCARD?&sdman:(true?&SPIFFS:_SDplaylistFS);
142143
if(getMode()==PM_SDCARD){
144+
if(pir) player.sendCommand({PR_STOP, 0});
143145
display.putRequest(NEWMODE, SDCHANGE);
144146
while(display.mode()!=SDCHANGE)
145147
delay(10);
@@ -149,8 +151,9 @@ void Config::changeMode(int newmode){
149151
if(network.status==SDREADY) ESP.restart();
150152
sdman.stop();
151153
}
154+
if(!_bootDone) return;
152155
initPlaylistMode();
153-
if (store.smartstart == 1) player.sendCommand({PR_PLAY, getMode()==PM_WEB?store.lastStation:store.lastSdStation});
156+
if (pir) player.sendCommand({PR_PLAY, getMode()==PM_WEB?store.lastStation:store.lastSdStation});
154157
netserver.resetQueue();
155158
netserver.requestOnChange(GETPLAYERMODE, 0);
156159
netserver.requestOnChange(GETMODE, 0);

yoRadio/src/core/display.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,10 @@ void Display::_swichMode(displayMode_e newmode) {
268268
_mode = newmode;
269269
dsp.setScrollId(NULL);
270270
if (newmode == PLAYER) {
271-
_clock.moveBack();
271+
if(player.isRunning())
272+
_clock.moveTo(clockMove);
273+
else
274+
_clock.moveBack();
272275
#ifdef DSP_LCD
273276
dsp.clearDsp();
274277
#endif

yoRadio/src/core/options.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef options_h
22
#define options_h
33

4-
#define YOVERSION "0.9.420"
4+
#define YOVERSION "0.9.428"
55

66
/*******************************************************
77
DO NOT EDIT THIS FILE.

yoRadio/src/core/sdmanager.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#define USE_SD
44
#include "sdmanager.h"
55
#include "display.h"
6+
#include "player.h"
67

78
#if defined(SD_SPIPINS) || SD_HSPI
89
SPIClass SDSPI(HOOPSENb);
@@ -12,7 +13,7 @@ SPIClass SDSPI(HOOPSENb);
1213
#endif
1314

1415
#ifndef SDSPISPEED
15-
#define SDSPISPEED 4000000
16+
#define SDSPISPEED 20000000
1617
#endif
1718

1819
SDManager sdman(FSImplPtr(new VFSImpl()));
@@ -75,6 +76,7 @@ void SDManager::listSD(File &plSDfile, File &plSDindex, const char* dirname, uin
7576
char* filePath;
7677
while (true) {
7778
vTaskDelay(2);
79+
player.loop();
7880
bool isDir;
7981
String fileName = root.getNextFileName(&isDir);
8082
if (fileName.isEmpty()) break;

0 commit comments

Comments
 (0)