This commit is contained in:
e2002
2023-02-22 09:57:58 +03:00
parent fe95774f14
commit 6bef9ca9d7
4 changed files with 17 additions and 11 deletions

View File

@@ -109,15 +109,17 @@ void onMqttMessage(char* topic, char* payload, AsyncMqttClientMessageProperties
}
if (strcmp(buf, "turnoff") == 0) {
uint8_t sst = config.store.smartstart;
player.stop();
config.setDspOn(0);
player.mode = STOPPED;
telnet.info();
delay(100);
config.store.smartstart = sst;
config.save();
config.setDspOn(0);
return;
}
if (strcmp(buf, "turnon") == 0) {
config.setDspOn(1);
if (config.store.smartstart == 1) player.play(config.store.lastStation);
if (config.store.smartstart == 1) player.request.station = config.store.lastStation;
return;
}
int volume;