diff --git a/src/controller.cpp b/src/controller.cpp index 1f44c61..da31ef9 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -59,7 +59,7 @@ void Controller::_check_rfid() { _player->play_album(s_uid); } else { if (_no_rfid_card_count >= 1) { - INFO("No more RFID card."); + INFO("No more RFID card.\n"); _player->stop(); } else { _no_rfid_card_count++; diff --git a/src/main.cpp b/src/main.cpp index f48a8f2..b9d5c2c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -18,8 +18,8 @@ void setup() { Serial.begin(74880); INFO("Starting.\n"); INFO("Initializing...\n"); - - + + DEBUG("Setting up SPI...\n"); SPI.begin(); @@ -36,15 +36,14 @@ void setup() { if (SD.begin(PIN_SD_CS)) { INFO("SD card initialized.\n"); } else { - ERROR("Could not initialize SD card. Halting.\n"); - while(1); + ERROR("Could not initialize SD card.\n"); } - + DEBUG("Initializing Player and Controller...\n"); player = new Player(mcp); controller = new Controller(player, mcp); INFO("Player and controller initialized.\n"); - + DEBUG("Setting up WiFi and web server...\n"); http_server = new HTTPServer(player, controller); diff --git a/src/player.cpp b/src/player.cpp index 994cc9f..2962731 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -525,7 +525,7 @@ bool Player::loop() { _refill(); return true; } - + if (_state == idle && _stopped_at < millis() - VS1053_SLEEP_DELAY) { _sleep(); }