This commit is contained in:
e2002
2023-06-03 13:40:10 +03:00
parent 942bc1cf74
commit 2f71c1859c
5 changed files with 21 additions and 9 deletions

View File

@@ -226,6 +226,11 @@ Work is in progress...
---
## Version history
#### v0.9.242
- fixed a hang bug when scrolling through an SD playlist with an encoder in configurations with VS1053B
- fixed a hang bug when quickly switching SD / WEB modes from the WEB interface in configurations with VS1053B
- fixes in the logic of work
#### v0.9.236
- fix compilation error 'class NetServer' has no member named 'resetQueue'

View File

@@ -425,7 +425,9 @@ void Audio::stopSong()
{
uint16_t modereg; // Read from mode register
int i; // Loop control
if(audiofile){
cardLock(true);audiofile.close();cardLock(false);
}
m_f_localfile = false;
m_f_webfile = false;
m_f_webstream = false;

View File

@@ -64,7 +64,8 @@ void Config::init() {
ssidsCount = 0;
_cardStatus = CS_NONE;
_SDplaylistFS = getMode()==PM_SDCARD?&SD:(true?&SPIFFS:_SDplaylistFS);
if(SDC_CS!=255) randomSeed(analogRead(SDC_CS));
//if(SDC_CS!=255) randomSeed(analogRead(SDC_CS));
randomSeed(esp_random());
backupSDStation = 0;
//checkSD();
_bootDone=false;
@@ -162,6 +163,7 @@ void Config::changeMode(int newmode){
delay(10);
delay(50);
}
if(getMode()==PM_WEB) player.setResumeFilePos(0);
initPlaylistMode();
if (store.smartstart == 1) player.sendCommand({PR_PLAY, store.lastStation});
//else
@@ -661,23 +663,25 @@ uint8_t Config::fillPlMenu(int from, uint8_t count, bool fromNextion) {
playlist.seek(pos, SeekSet);
sdog.giveMutex();
}
while (playlist.available()) {
bool pla = true;
while (pla) {
sdog.takeMutex();
pla = playlist.available();
String stationName = playlist.readStringUntil('\n');
sdog.giveMutex();
stationName = stationName.substring(0, stationName.indexOf('\t'));
if(config.store.numplaylist) stationName = String(from+c)+" "+stationName;
if(config.store.numplaylist && stationName.length()>0) stationName = String(from+c)+" "+stationName;
if(!fromNextion) display.printPLitem(c, stationName.c_str());
#ifdef USE_NEXTION
if(fromNextion) nextion.printPLitem(c, stationName.c_str());
#endif
#ifdef USE_NEXTION
if(fromNextion) nextion.printPLitem(c, stationName.c_str());
#endif
c++;
if (c >= count) break;
}
break;
}
return c;
sdog.takeMutex();playlist.close();sdog.giveMutex();
return c;
}
bool Config::parseCSV(const char* line, char* name, char* url, int &ovol) {

View File

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

View File

@@ -36,6 +36,7 @@ QueueHandle_t playerQueue;
void Player::init() {
Serial.print("##[BOOT]#\tplayer.init\t");
playerQueue=NULL;
_resumeFilePos = 0;
playerQueue = xQueueCreate( 5, sizeof( playerRequestParams_t ) );
setOutputPins(false);
delay(50);