This commit is contained in:
e2002
2024-12-21 11:58:32 +03:00
parent 9ad82acc80
commit 27e33a1bc8
16 changed files with 149 additions and 60 deletions

View File

@@ -407,6 +407,7 @@ uint8_t Config::setLastSSID(uint8_t val) {
}
void Config::setTitle(const char* title) {
vuThreshold = 0;
memset(config.station.title, 0, BUFLEN);
strlcpy(config.station.title, title, BUFLEN);
u8fix(config.station.title);

View File

@@ -174,6 +174,7 @@ class Config {
uint16_t sleepfor;
uint32_t sdResumePos;
bool emptyFS;
uint16_t vuThreshold;
public:
Config() {};
//void save();

View File

@@ -452,6 +452,9 @@ void Display::loop() {
}
}
dsp.loop();
#if I2S_DOUT==255
player.computeVUlevel();
#endif
}
void Display::_setRSSI(int rssi) {

View File

@@ -287,11 +287,12 @@ void NetServer::processQueue(){
return;
break;
}
case GETSYSTEM: sprintf (wsbuf, "{\"sst\":%d,\"aif\":%d,\"vu\":%d,\"softr\":%d}",
case GETSYSTEM: sprintf (wsbuf, "{\"sst\":%d,\"aif\":%d,\"vu\":%d,\"softr\":%d,\"vut\":%d}",
config.store.smartstart != 2,
config.store.audioinfo,
config.store.vumeter,
config.store.softapdelay);
config.store.softapdelay,
config.vuThreshold);
break;
case GETSCREEN: sprintf (wsbuf, "{\"flip\":%d,\"inv\":%d,\"nump\":%d,\"tsf\":%d,\"tsd\":%d,\"dspon\":%d,\"br\":%d,\"con\":%d}",
config.store.flipscreen,

View File

@@ -72,6 +72,7 @@ void ticks() {
#ifdef USE_SD
if(display.mode()!=SDCHANGE) player.sendCommand({PR_CHECKSD, 0});
#endif
player.sendCommand({PR_VUTONUS, 0});
}
}

View File

@@ -1,7 +1,7 @@
#ifndef options_h
#define options_h
#define YOVERSION "0.9.380"
#define YOVERSION "0.9.390"
/*******************************************************
DO NOT EDIT THIS FILE.
@@ -467,12 +467,16 @@ The connection tables are located here https://github.com/e2002/yoradio#connecti
#define L10N_LANGUAGE EN
#endif
#ifndef VSPI
#define VSPI 3
#endif
#ifndef HSPI
#define HSPI 1
#ifdef VSPI
#define VOOPSENb VSPI
#else
#define VOOPSENb 3
#endif
#ifdef HSPI
#define HOOPSENb HSPI
#else
#define HOOPSENb 2
#endif
#endif

View File

@@ -157,6 +157,8 @@ void Player::loop() {
break;
}
#endif
case PR_VUTONUS:
if(config.vuThreshold>10) config.vuThreshold -=10;
default: break;
}
}
@@ -186,6 +188,7 @@ void Player::_play(uint16_t stationId) {
setError("");
remoteStationName = false;
config.setDspOn(1);
config.vuThreshold = 0;
//display.putRequest(PSTOP);
if(config.getMode()!=PM_SDCARD) {
display.putRequest(PSTOP);

View File

@@ -19,7 +19,7 @@
#define PLERR_LN 64
#define SET_PLAY_ERROR(...) {char buff[512 + 64]; sprintf(buff,__VA_ARGS__); setError(buff);}
enum playerRequestType_e : uint8_t { PR_PLAY = 1, PR_STOP = 2, PR_PREV = 3, PR_NEXT = 4, PR_VOL = 5, PR_CHECKSD = 6 };
enum playerRequestType_e : uint8_t { PR_PLAY = 1, PR_STOP = 2, PR_PREV = 3, PR_NEXT = 4, PR_VOL = 5, PR_CHECKSD = 6, PR_VUTONUS = 7 };
struct playerRequestParams_t
{
playerRequestType_e type;