From 2cc502d6ced2fd8991cd831d62e02ec61acd851a Mon Sep 17 00:00:00 2001 From: Hendrik Langer Date: Fri, 6 Apr 2018 17:31:02 +0200 Subject: [PATCH] add radio station --- src/main.cpp | 2 ++ src/screen.cpp | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index be28973..4e6ed16 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -269,6 +269,8 @@ void transmitStatus() { float internal_temp = temperatureRead(); int internal_hall = hallRead(); + if (!bme280.valid) return; // TODO + for (int retry=0; retry<3 && !bme280.valid; retry++) { bme280.reinit(); delay(250); diff --git a/src/screen.cpp b/src/screen.cpp index 18ac8b9..00479e4 100644 --- a/src/screen.cpp +++ b/src/screen.cpp @@ -130,6 +130,7 @@ StationMenu::StationMenu() { "Antenne Bayern Oldies", "Der Barde", "DeclicRadio", + "SomaFM Covers", "xd0.de MPD", "\xAB Return"}; } @@ -213,11 +214,16 @@ uint8_t StationMenu::select() { led.changeAnimation(2, 0); break; case 15: - mp3.start("http://172.16.75.17:8000/mopidy"); + mp3.start("http://ice1.somafm.com/covers-128-mp3"); strcpy(titleStr, string_list[15].c_str()); led.changeAnimation(2, 0); break; case 16: + mp3.start("http://172.16.75.17:8000/mopidy"); + strcpy(titleStr, string_list[16].c_str()); + led.changeAnimation(2, 0); + break; + case 17: menuChange = eMainMenu; return current_pos; break;