pl_text_size_017

This commit is contained in:
e2002
2023-03-08 19:26:25 +03:00
parent a50dd1a353
commit ebd6acd3fe
22 changed files with 203 additions and 170 deletions

View File

@@ -437,7 +437,7 @@ char * Config::stationByNum(uint16_t num){
return _stationBuf;
}
uint8_t Config::fillPlMenu(int from, uint8_t count) {
uint8_t Config::fillPlMenu(int from, uint8_t count, bool fromNextion) {
int ls = from;
uint8_t c = 0;
bool finded = false;
@@ -449,7 +449,10 @@ uint8_t Config::fillPlMenu(int from, uint8_t count) {
while (true) {
if (ls < 1) {
ls++;
display.printPLitem(c, "");
if(!fromNextion) display.printPLitem(c, "");
#ifdef USE_NEXTION
if(fromNextion) nextion.printPLitem(c, "");
#endif
c++;
continue;
}
@@ -465,7 +468,10 @@ uint8_t Config::fillPlMenu(int from, uint8_t count) {
String stationName = playlist.readStringUntil('\n');
stationName = stationName.substring(0, stationName.indexOf('\t'));
if(config.store.numplaylist) stationName = String(from+c)+" "+stationName;
display.printPLitem(c, stationName.c_str());
if(!fromNextion) display.printPLitem(c, stationName.c_str());
#ifdef USE_NEXTION
if(fromNextion) nextion.printPLitem(c, stationName.c_str());
#endif
c++;
if (c >= count) break;
}

View File

@@ -186,7 +186,7 @@ class Config {
void setSmartStart(byte ss);
void initPlaylist();
void indexPlaylist();
uint8_t fillPlMenu(int from, uint8_t count);
uint8_t fillPlMenu(int from, uint8_t count, bool fromNextion=false);
char * stationByNum(uint16_t num);
void setTimezone(int8_t tzh, int8_t tzm);
void setTimezoneOffset(uint16_t tzo);

View File

@@ -211,7 +211,7 @@ void Display::_start() {
return;
}
#ifdef USE_NEXTION
nextion.putcmd("page player");
//nextion.putcmd("page player");
nextion.start();
#endif
_buildPager();
@@ -539,6 +539,7 @@ void Display::init(){
}
void Display::_start(){
#ifdef USE_NEXTION
//nextion.putcmd("page player");
nextion.start();
#endif
}

View File

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