Skip to content

Commit 3e49414

Browse files
committed
add files via upload
1 parent 1d74946 commit 3e49414

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

platformio.ini

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@
99
; https://docs.platformio.org/en/latest/platforms/espressif32.html
1010

1111
[env:esp32dev]
12-
;lib_ldf_mode = chain+
13-
;platform = espressif32
14-
platform = https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream
12+
;platform = https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream
13+
platform = https://github.com/platformio/platform-espressif32.git#v4.2.0
1514
board = esp32dev
1615
board_build.f_cpu = 240000000L
1716
board_build.flash_size=4MB

src/main.cpp

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -971,6 +971,7 @@ void stopSong(){
971971
***********************************************************************************************************************/
972972
void setup(){
973973
Serial.begin(115200);
974+
Serial.print("\n\n");
974975
SPI.begin(SPI_SCK, SPI_MISO, SPI_MOSI); // VSPI
975976
mutex_rtc = xSemaphoreCreateMutex();
976977
mutex_display = xSemaphoreCreateMutex();
@@ -1395,7 +1396,7 @@ void processPlaylist(boolean first){
13951396
_playlistTime = millis();
13961397
while(playlistFile.available() > 0){
13971398
f = playlistFile.readStringUntil('\n');
1398-
if(f.startsWith("#")) SerialPrintfln("Playlist: .. " ANSI_ESC_GREEN "%s", f.c_str());
1399+
if(f.startsWith("#")) SerialPrintfln("Playlist: " ANSI_ESC_GREEN "%s", f.c_str());
13991400
f.trim();
14001401
if(f.length() < 5) continue;
14011402
if(first){
@@ -1405,7 +1406,7 @@ void processPlaylist(boolean first){
14051406
continue;
14061407
}
14071408
else{
1408-
SerialPrintfln("Playlist: .. " ANSI_ESC_RED "%s is not a valid, #EXTM3U not found", _afn);
1409+
SerialPrintfln("Playlist: " ANSI_ESC_RED "%s is not a valid, #EXTM3U not found", _afn);
14091410
return;
14101411
}
14111412
}
@@ -1419,7 +1420,7 @@ void processPlaylist(boolean first){
14191420
}
14201421
if(!f.startsWith("#")){
14211422
if(f.startsWith("http")){
1422-
SerialPrintflnCut("Playlist: .. ", ANSI_ESC_YELLOW, f.c_str());
1423+
SerialPrintflnCut("Playlist: ", ANSI_ESC_YELLOW, f.c_str());
14231424
clearFName();
14241425
showVolumeBar();
14251426
if(t.length() > 0){
@@ -1434,7 +1435,7 @@ void processPlaylist(boolean first){
14341435
audioConnecttohost(f.c_str());
14351436
}
14361437
else{
1437-
SerialPrintfln("Playlist: .. " ANSI_ESC_YELLOW "%s", f.c_str());
1438+
SerialPrintfln("Playlist: " ANSI_ESC_YELLOW "%s", f.c_str());
14381439
webSrv.send("audiotrack=" + f);
14391440
audiotrack(f.c_str());
14401441
}
@@ -1767,14 +1768,16 @@ void vs1053_info(const char *info){
17671768
if(startsWith(info, "FLAC")) {SerialPrintfln("AUDIO_info: " ANSI_ESC_GREEN "%s", info); return;}
17681769
if(endsWith(info, "Stream lost")) {SerialPrintfln("AUDIO_info: " ANSI_ESC_RED "%s", info); return;}
17691770
if(startsWith(info, "authent")) {SerialPrintfln("AUDIO_info: " ANSI_ESC_GREEN "%s", info); return;}
1770-
if(CORE_DEBUG_LEVEL >= 2) {SerialPrintfln("AUDIO_info: " ANSI_ESC_GREEN "%s", info); return;} // all other
1771+
if(CORE_DEBUG_LEVEL >= ARDUHAL_LOG_LEVEL_WARN)
1772+
{SerialPrintfln("AUDIO_info: " ANSI_ESC_GREEN "%s", info); return;} // all other
17711773
}
17721774
void audio_info(const char *info){
17731775
if(startsWith(info, "Request")) {SerialPrintfln("AUDIO_info: " ANSI_ESC_RED "%s", info); return;}
17741776
if(startsWith(info, "FLAC")) {SerialPrintfln("AUDIO_info: " ANSI_ESC_GREEN "%s", info); return;}
17751777
if(endsWith(info, "Stream lost")) {SerialPrintfln("AUDIO_info: " ANSI_ESC_RED "%s", info); return;}
17761778
if(startsWith(info, "authent")) {SerialPrintfln("AUDIO_info: " ANSI_ESC_GREEN "%s", info); return;}
1777-
if(CORE_DEBUG_LEVEL >= 2) {SerialPrintfln("AUDIO_info: " ANSI_ESC_GREEN "%s", info); return;} // all other
1779+
if(CORE_DEBUG_LEVEL >= ARDUHAL_LOG_LEVEL_WARN)
1780+
{SerialPrintfln("AUDIO_info: " ANSI_ESC_GREEN "%s", info); return;} // all other
17781781
}
17791782
//----------------------------------------------------------------------------------------
17801783
void vs1053_showstation(const char *info){
@@ -2181,7 +2184,7 @@ void tp_released(){
21812184
//Events from websrv
21822185
void WEBSRV_onCommand(const String cmd, const String param, const String arg){ // called from html
21832186

2184-
if(CORE_DEBUG_LEVEL >= 2){
2187+
if(CORE_DEBUG_LEVEL >= ARDUHAL_LOG_LEVEL_WARN){
21852188
SerialPrintfln("WS_onCmd: " ANSI_ESC_YELLOW "cmd=\"%s\", params=\"%s\", arg=\"%s\"",
21862189
cmd.c_str(),param.c_str(), arg.c_str());
21872190
}
@@ -2307,7 +2310,7 @@ void WEBSRV_onCommand(const String cmd, const String param, const String arg){
23072310
}
23082311
void WEBSRV_onRequest(const String request, uint32_t contentLength){
23092312

2310-
if(CORE_DEBUG_LEVEL >= 2){
2313+
if(CORE_DEBUG_LEVEL >= ARDUHAL_LOG_LEVEL_WARN){
23112314
SerialPrintfln("WS_onReq: " ANSI_ESC_YELLOW "%s contentLength %d", request.c_str(), contentLength);
23122315
}
23132316

@@ -2322,7 +2325,7 @@ void WEBSRV_onInfo(const char* info){
23222325
if(!strcmp("to_listen", info)) return; // suppress to_isten
23232326
if(startsWith(info, "Command client"))return; // suppress Command client available
23242327

2325-
if(CORE_DEBUG_LEVEL >= 2) {
2328+
if(CORE_DEBUG_LEVEL >= ARDUHAL_LOG_LEVEL_WARN) {
23262329
SerialPrintfln("HTML_info: " ANSI_ESC_YELLOW "%s", info); // infos for debug
23272330
}
23282331
}

0 commit comments

Comments
 (0)