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