Browse Source

add radio station

main
Hendrik Langer 7 years ago
parent
commit
2cc502d6ce
  1. 2
      src/main.cpp
  2. 8
      src/screen.cpp

2
src/main.cpp

@ -269,6 +269,8 @@ void transmitStatus() {
float internal_temp = temperatureRead(); float internal_temp = temperatureRead();
int internal_hall = hallRead(); int internal_hall = hallRead();
if (!bme280.valid) return; // TODO
for (int retry=0; retry<3 && !bme280.valid; retry++) { for (int retry=0; retry<3 && !bme280.valid; retry++) {
bme280.reinit(); bme280.reinit();
delay(250); delay(250);

8
src/screen.cpp

@ -130,6 +130,7 @@ StationMenu::StationMenu() {
"Antenne Bayern Oldies", "Antenne Bayern Oldies",
"Der Barde", "Der Barde",
"DeclicRadio", "DeclicRadio",
"SomaFM Covers",
"xd0.de MPD", "xd0.de MPD",
"\xAB Return"}; "\xAB Return"};
} }
@ -213,11 +214,16 @@ uint8_t StationMenu::select() {
led.changeAnimation(2, 0); led.changeAnimation(2, 0);
break; break;
case 15: 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()); strcpy(titleStr, string_list[15].c_str());
led.changeAnimation(2, 0); led.changeAnimation(2, 0);
break; break;
case 16: 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; menuChange = eMainMenu;
return current_pos; return current_pos;
break; break;

Loading…
Cancel
Save