Skip to content

Commit b574b4a

Browse files
committed
v0.7.490
1 parent de97530 commit b574b4a

File tree

15 files changed

+432
-677
lines changed

15 files changed

+432
-677
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,24 @@ Work is in progress...
317317

318318
---
319319
## Version history
320+
#### v0.7.490
321+
**!!! a [full update](#update-over-web-interface) with Sketch data upload is required. After updating please press CTRL+F5 in browser !!!** \
322+
**Please backup playlist.csv and wifi.csv before updating.**
323+
- fixed playlist break down when saving it
324+
- fixed bug with cropped song titles on single line displays (GC9106, ST7735mini, N5110 etc.)
325+
- netserver - optimization and refactoring
326+
- web interface optimization
327+
- the AUDIOBUFFER_MULTIPLIER parameter is deprecated. New parameter AUDIOBUFFER_MULTIPLIER2. If everything works fine, then it is better not to touch it.
328+
- new setting VS_PATCH_ENABLE (see PS)
329+
- fixing other bugs
330+
331+
_**PS:** A bug was found with the lack of sound on some (not all) green VS1053 boards.
332+
If there is no sound, you need to assign in myoptions_
333+
```
334+
#define VS_PATCH_ENABLE false
335+
```
336+
_On red boards and normally working green boards, nothing else needs to be done._
337+
320338
#### v0.7.414
321339
- fixed non latin long titles of songs error
322340

yoRadio/audiohandlers.ino

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ void audio_info(const char *info) {
1515
player.mode = STOPPED;
1616
player.stopInfo();
1717
}
18-
if (strstr(info, "not supported") != NULL){
18+
if (strstr(info, "not supported") != NULL || strstr(info, "Account already in use") != NULL){
1919
config.setTitle(info);
2020
netserver.requestOnChange(TITLE, 0);
2121
player.setOutputPins(false);
@@ -47,20 +47,32 @@ bool printable(const char *info) {
4747
}
4848

4949
void audio_showstation(const char *info) {
50+
DBGVB("[%s] info = %s", __func__, info);
5051
if (strlen(info) > 0) {
5152
bool p = printable(info);
52-
config.setTitle(p?info:"*****");
53+
config.setTitle(p?info:config.station.name);
5354
netserver.requestOnChange(TITLE, 0);
5455
}
5556
}
5657

5758
void audio_showstreamtitle(const char *info) {
59+
DBGVB("[%s] info = %s", __func__, info);
60+
if (strstr(info, "Account already in use") != NULL){
61+
config.setTitle(info);
62+
netserver.requestOnChange(TITLE, 0);
63+
player.setOutputPins(false);
64+
player.setDefaults();
65+
if (player_on_stop_play) player_on_stop_play();
66+
player.mode = STOPPED;
67+
player.stopInfo();
68+
return;
69+
}
5870
if (strlen(info) > 0) {
5971
bool p = printable(info);
6072
#ifdef DEBUG_TITLES
6173
config.setTitle(DEBUG_TITLES);
6274
#else
63-
config.setTitle(p?info:"*****");
75+
config.setTitle(p?info:config.station.name);
6476
#endif
6577
netserver.requestOnChange(TITLE, 0);
6678
}

yoRadio/config.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ bool Config::parseSsid(const char* line, char* ssid, char* pass) {
443443
return true;
444444
}
445445

446-
bool Config::saveWifi(const char* post) {
446+
bool Config::saveWifiFromNextion(const char* post){
447447
File file = SPIFFS.open(SSIDS_PATH, "w");
448448
if (!file) {
449449
return false;
@@ -455,6 +455,14 @@ bool Config::saveWifi(const char* post) {
455455
}
456456
}
457457

458+
bool Config::saveWifi() {
459+
if (!SPIFFS.exists(TMP_PATH)) return false;
460+
SPIFFS.remove(SSIDS_PATH);
461+
SPIFFS.rename(TMP_PATH, SSIDS_PATH);
462+
ESP.restart();
463+
return true;
464+
}
465+
458466
bool Config::initNetwork() {
459467
File file = SPIFFS.open(SSIDS_PATH, "r");
460468
if (!file || file.isDirectory()) {

yoRadio/config.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ class Config {
147147
bool parseSsid(const char* line, char* ssid, char* pass);
148148
void loadStation(uint16_t station);
149149
bool initNetwork();
150-
bool saveWifi(const char* post);
150+
bool saveWifi();
151+
bool saveWifiFromNextion(const char* post);
151152
void setSmartStart(byte ss);
152153
void initPlaylist();
153154
void indexPlaylist();

yoRadio/data/www/script.js.gz

126 Bytes
Binary file not shown.

yoRadio/data/www/settings.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ <h2 class="pagetitle">SёTTINGS</h2>
177177
</div>
178178
</div>
179179
<div class="flex-row last">
180+
<input id="file-upload" type="file" accept=".txt, .csv" hidden/>
180181
<div class="button group group_system hidden" data-name="wifiexport">Export</div>
181182
<div class="button hlbutton" data-name="wifiupload">Save &amp; Reboot</div>
182183
</div>

yoRadio/display.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ char *split(char *str, const char *delim) {
580580
}
581581

582582
void Display::title() {
583-
DBGVB("call of %s(), config.station.title=%s", __func__, config.station.title);
583+
DBGVB("[%s] config.station.title = %s", __func__, config.station.title);
584584
if (strlen(config.station.title) > 0) {
585585
char tmpbuf[strlen(config.station.title)+1];
586586
strlcpy(tmpbuf, config.station.title, strlen(config.station.title)+1);
@@ -589,7 +589,7 @@ void Display::title() {
589589
title1.setText(dsp.utf8Rus(tmpbuf, true));
590590
title2.setText(dsp.utf8Rus(stitle, true));
591591
}else{
592-
title1.setText(dsp.utf8Rus(tmpbuf, true));
592+
title1.setText(dsp.utf8Rus(config.station.title, true));
593593
title2.setText(dsp.utf8Rus("", true));
594594
}
595595
#ifdef USE_NEXTION

0 commit comments

Comments
 (0)