updates volume

This commit is contained in:
Marcel 2024-06-05 10:37:38 +02:00
parent 47df29c8d8
commit b858f8a773
3 changed files with 9 additions and 12 deletions

BIN
assets/0015End.mp3 (Stored with Git LFS)

Binary file not shown.

View file

@ -182,5 +182,5 @@ void setup(void)
}
}
dfPlayer.volume(15);
dfPlayer.volume(20);
}

View file

@ -99,7 +99,7 @@ String StartInstructions::updateDisplay(const Context& context)
void StartInstructions::activated(const Context context)
{
context.dfPlayer->play(START_INSTRUCTIONS);
timer = Timer(10000, false); // todo set correct time
timer = Timer(39000, false); // todo set correct time
timer.start();
}
@ -235,7 +235,6 @@ State* Hacking::pickedUp(const Context context)
State* Hacking::update(const Context context)
{
Serial.println(String(context.delta));
const bool done = timer.update(context.delta);
if (done)
@ -276,22 +275,22 @@ void Hacking::activated(const Context context)
auto currentStationIndex = context.getStationIndex(this->currentStation);
if (currentStationIndex == 1)
{
timer = Timer(5000, false);
timer = Timer(25000, false);
context.dfPlayer->play(HACKING_STATION_MUHVELLA);
}
if (currentStationIndex == 2)
{
timer = Timer(5000, false);
timer = Timer(29000, false);
context.dfPlayer->play(HACKING_STATION_MAGIE);
}
if (currentStationIndex == 3)
{
timer = Timer(5000, false);
timer = Timer(30000, false);
context.dfPlayer->play(HACKING_STATION_BICOLA);
}
if (currentStationIndex == 4)
{
timer = Timer(5000, false);
timer = Timer(37000, false);
context.dfPlayer->play(HACKING_STATION_TOBIONE);
}
timer.start();
@ -431,7 +430,7 @@ String End::updateDisplay(const Context& context)
void End::activated(const Context context)
{
context.dfPlayer->play(END);
timer = Timer(38000, false);
timer = Timer(45000, false);
timer.start();
}
@ -463,10 +462,8 @@ String Restarting::updateDisplay(const Context& context)
String animLine = "";
const String full = ".-`-._.-`-._. :)";
const float percent = static_cast<float>(timer.getCurrentTime()) / static_cast<float>(timer.getDuration());
Serial.println(String("updating display ") + percent);
for (int i = 0; i < full.length() * percent; i++)
{
Serial.println(String("i: ") + i + "len " + (full.length() * percent));
animLine = animLine + full[i];
}
return "RESTARTING " + animLine;