From 2fa865a37f7b434323fb9dcf4878b3af35932f5e Mon Sep 17 00:00:00 2001 From: boerge1 Date: Sun, 8 Oct 2023 18:35:54 +0200 Subject: [PATCH 1/2] Issue_118: In modus pause_if_card_removed no shortcut is played --- README.md | 5 +++-- TonUINO-TNG.ino | 2 +- src/state_machine.cpp | 2 +- src/tonuino.hpp | 1 + 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 874ffde..7218f01 100644 --- a/README.md +++ b/README.md @@ -49,10 +49,11 @@ Die SD Karte (Ordner mp3 und advert) hat sich gegenüber der Version 3.1.2 geän # Change Log +## Version 3.1.4 (08.10.2023) +- [Issue 118](https://github.com/tonuino/TonUINO-TNG/issues/118): In modus pause_if_card_removed no shortcut is played + ## Version 3.1.4 (03.10.2023) - [Issue 115](https://github.com/tonuino/TonUINO-TNG/issues/115): Sometimes initial SetVolume does not come to an end - -## Version 3.1.4 (20.09.2023) - [Issue 103](https://github.com/tonuino/TonUINO-TNG/issues/103): Deploy pages for online upload - [Issue 111](https://github.com/tonuino/TonUINO-TNG/issues/111): TonUINO crashes if if the player gives a track count >255 - [Issue 108](https://github.com/tonuino/TonUINO-TNG/issues/108): Missing OnPlayFinished: the progress is not saved for Hoerbuch mode diff --git a/TonUINO-TNG.ino b/TonUINO-TNG.ino index 1d8f892..81df4ce 100644 --- a/TonUINO-TNG.ino +++ b/TonUINO-TNG.ino @@ -35,7 +35,7 @@ void setup() LOG(init_log, s_error, F("TonUINO Version 3.1 - refactored by Boerge1\n")); LOG(init_log, s_error, F("created by Thorsten Voß and licensed under GNU/GPL.")); LOG(init_log, s_error, F("Information and contribution at https://tonuino.de.\n")); - LOG(init_log, s_error, F("V3.1.4 03.10.23\n")); + LOG(init_log, s_error, F("V3.1.4 08.10.23\n")); Tonuino::getTonuino().setup(); } diff --git a/src/state_machine.cpp b/src/state_machine.cpp index df3733b..680c7c6 100644 --- a/src/state_machine.cpp +++ b/src/state_machine.cpp @@ -666,7 +666,7 @@ void StartPlay::react(command_e const &/*cmd_e*/) { if (timer.isActive()) { if (timer.isExpired()) { LOG(state_log, s_debug, str_StartPlay(), str_to(), str_Play()); - if (settings.pauseWhenCardRemoved && chip_card.isCardRemoved()) + if (settings.pauseWhenCardRemoved && chip_card.isCardRemoved() && tonuino.playingCard()) transit(); else transit(); diff --git a/src/tonuino.hpp b/src/tonuino.hpp index 7be6c6e..9f92fab 100644 --- a/src/tonuino.hpp +++ b/src/tonuino.hpp @@ -38,6 +38,7 @@ class Tonuino { const nfcTagObject& getCard() const { return myCard; } void setFolder(folderSettings *newFolder ) { myFolder = newFolder; } uint8_t getFolder() { return myFolder->folder; } + bool playingCard() { return myFolder == &myCard.nfcFolderSettings; } Mp3& getMp3 () { return mp3 ; } Commands& getCommands () { return commands ; } From ef8809129f2cedb36f0f0ee7c8c89907a57f294c Mon Sep 17 00:00:00 2001 From: boerge1 Date: Fri, 13 Oct 2023 14:02:08 +0200 Subject: [PATCH 2/2] Issue_120: Change to version 1.2.2 of the DFMiniMp3 library --- README.md | 5 ++++- TonUINO-TNG.ino | 2 +- platformio.ini | 2 +- src/tonuino.cpp | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 874ffde..df42919 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Allgemeine Anleitungen zum Einrichten der IDE findet man hier [www.tonuino.de/TN - Es müssen folgende Versionen der Libraries verwendet werden: - jchristensen/JC_Button: 2.1.2 - miguelbalboa/MFRC522: 1.4.10 - - makuna/DFPlayer Mini Mp3 by Makuna: 1.2.1 + - makuna/DFPlayer Mini Mp3 by Makuna: 1.2.2 - adafruit/Adafruit NeoPixel: 1.11.0 (optional, nur bei Feature NEO_RING notwendig) @@ -49,6 +49,9 @@ Die SD Karte (Ordner mp3 und advert) hat sich gegenüber der Version 3.1.2 geän # Change Log +## Version 3.1.4 (13.10.2023) +- [Issue 120](https://github.com/tonuino/TonUINO-TNG/issues/120): Change to version 1.2.2 of the DFMiniMp3 library + ## Version 3.1.4 (03.10.2023) - [Issue 115](https://github.com/tonuino/TonUINO-TNG/issues/115): Sometimes initial SetVolume does not come to an end diff --git a/TonUINO-TNG.ino b/TonUINO-TNG.ino index 1d8f892..836c526 100644 --- a/TonUINO-TNG.ino +++ b/TonUINO-TNG.ino @@ -35,7 +35,7 @@ void setup() LOG(init_log, s_error, F("TonUINO Version 3.1 - refactored by Boerge1\n")); LOG(init_log, s_error, F("created by Thorsten Voß and licensed under GNU/GPL.")); LOG(init_log, s_error, F("Information and contribution at https://tonuino.de.\n")); - LOG(init_log, s_error, F("V3.1.4 03.10.23\n")); + LOG(init_log, s_error, F("V3.1.4 13.10.23\n")); Tonuino::getTonuino().setup(); } diff --git a/platformio.ini b/platformio.ini index 07bbe12..32a858e 100644 --- a/platformio.ini +++ b/platformio.ini @@ -12,7 +12,7 @@ lib_deps = jchristensen/JC_Button@^2.1.2 miguelbalboa/MFRC522@^1.4.10 - makuna/DFPlayer Mini Mp3 by Makuna@1.2.1 + makuna/DFPlayer Mini Mp3 by Makuna@1.2.2 adafruit/Adafruit NeoPixel@^1.11.0 build_flags = diff --git a/src/tonuino.cpp b/src/tonuino.cpp index 557e7d7..50e5375 100644 --- a/src/tonuino.cpp +++ b/src/tonuino.cpp @@ -50,6 +50,7 @@ void Tonuino::setup() { // DFPlayer Mini initialisieren mp3.begin(); + delay(2000); mp3.setVolume(); mp3.setEq(static_cast(settings.eq - 1));