logging
This commit is contained in:
parent
4333e35037
commit
f421b77700
@ -48,7 +48,7 @@ void audioStop() {
|
||||
bool audioPlayInit(const Entry &entry) {
|
||||
audioStop();
|
||||
|
||||
Serial.printf("[%s] %s", entry.type.c_str(), entry.url.c_str());
|
||||
Serial.printf("[%s] %s\n", entry.type.c_str(), entry.url.c_str());
|
||||
running = true;
|
||||
|
||||
if (entry.type == "ICY" || entry.type == "SNAP") {
|
||||
@ -182,6 +182,8 @@ bool audioPlay(const Entry &entry) {
|
||||
}
|
||||
|
||||
void audioSetup() {
|
||||
AudioToolsLogger.setLogLevel(AudioToolsLogLevel::Error);
|
||||
Serial.println("Initializing board...");
|
||||
board.begin();
|
||||
}
|
||||
|
||||
|
||||
@ -7,6 +7,8 @@
|
||||
void setup() {
|
||||
delay(500);
|
||||
Serial.begin(115200);
|
||||
Serial.println("\n\n\nStartup!");
|
||||
|
||||
playerSetup();
|
||||
playlistClear();
|
||||
playlistAdd("ICY|http://liveradio.sr.de/sr/sr1/mp3/128/stream.mp3|SR1");
|
||||
|
||||
@ -18,6 +18,7 @@ size_t playlistIndex = 0;
|
||||
std::vector<Entry> playlistEntries;
|
||||
|
||||
void playlistClear() {
|
||||
Serial.println("[PLAYLIST] clear");
|
||||
playlistTitle = "";
|
||||
playlistIndex = 0;
|
||||
playlistEntries.clear();
|
||||
@ -26,6 +27,7 @@ void playlistClear() {
|
||||
|
||||
void playlistAdd(String entry) {
|
||||
entry.trim();
|
||||
Serial.println("[PLAYLIST] add: " + entry);
|
||||
|
||||
const auto index_type_url = entry.indexOf('|');
|
||||
if (index_type_url < 0) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user