This commit is contained in:
e2002
2022-08-22 11:50:48 +03:00
parent 8fa32f1587
commit 223bae1923
39 changed files with 644 additions and 380 deletions

View File

@@ -362,6 +362,7 @@ void NetServer::onWsMessage(void *arg, uint8_t *data, size_t len, uint8_t client
}
if (strcmp(cmd, "brightness") == 0) {
byte valb=atoi(val);
if(!config.store.dspon) requestOnChange(DSPON, 0);
config.store.brightness=valb;
//display.setContrast();
config.setBrightness(true);
@@ -369,8 +370,9 @@ void NetServer::onWsMessage(void *arg, uint8_t *data, size_t len, uint8_t client
}
if (strcmp(cmd, "screenon") == 0) {
byte valb=atoi(val);
config.store.dspon=valb==1;
config.setBrightness(true);
//config.store.dspon=valb==1;
//config.setBrightness(true);
config.setDspOn(valb==1);
return;
}
if (strcmp(cmd, "contrast") == 0) {
@@ -732,6 +734,9 @@ void NetServer::requestOnChange(requestType_e request, uint8_t clientId) {
if (WEATHER_READY==0 || dbgact){
act+="\"group_weather\",";
}
#endif
#if defined(LCD_I2C) || DSP_OLED
act+="\"group_oled\",";
#endif
if(VU_READY==1 || dbgact){
act+="\"group_vu\",";
@@ -803,6 +808,10 @@ void NetServer::requestOnChange(requestType_e request, uint8_t clientId) {
sprintf (buf, "{\"vols\":%d,\"enca\":%d,\"irtl\":%d}", config.store.volsteps, config.store.encacc, config.store.irtlp);
break;
}
case DSPON: {
sprintf (buf, "{\"dspontrue\":%d}", 1);
break;
}
case STATION: {
sprintf (buf, "{\"nameset\": \"%s\"}", config.station.name);
requestOnChange(ITEM, clientId);