This commit is contained in:
e2002
2022-04-20 13:00:13 +03:00
parent 1895043ba4
commit e8ed958f4d
14 changed files with 119 additions and 8 deletions

View File

@@ -88,7 +88,8 @@ void onMqttMessage(char* topic, char* payload, AsyncMqttClientMessageProperties
return;
}
if (strcmp(buf, "start") == 0 || strcmp(buf, "play") == 0) {
player.play(config.store.lastStation);
//player.play(config.store.lastStation);
player.request.station = config.store.lastStation;
return;
}
if (strcmp(buf, "boot") == 0 || strcmp(buf, "reboot") == 0) {
@@ -114,7 +115,9 @@ void onMqttMessage(char* topic, char* payload, AsyncMqttClientMessageProperties
if (sscanf(buf, "play %d", &sb) == 1 ) {
if (sb < 1) sb = 1;
if (sb >= config.store.countStation) sb = config.store.countStation;
player.play(sb);
//player.play(sb);
player.request.station = sb;
player.request.doSave = true;
return;
}
}