Quellcode durchsuchen

Fixed stop stream at snooze. Removed test code

jancoow vor 9 Jahren
Ursprung
Commit
e03fa20250
2 geänderte Dateien mit 3 neuen und 8 gelöschten Zeilen
  1. 2 0
      alarm.c
  2. 1 8
      main.c

+ 2 - 0
alarm.c

@@ -9,6 +9,7 @@
 #include "rtc.h"
 #include "alarm.h"
 #include "display.h"
+#include "httpstream.h"
 
 #define n 5
 
@@ -70,6 +71,7 @@ void setSnooze(int idx){
 	alarm[idx].state = 2;
 	snooze[idx].snoozeTime = ct;
 	snooze[idx].snoozeTime.tm_min += alarm[idx].snooze;
+	stopStream();
 }
 
 int daysInMonth(int m, int y) {

+ 1 - 8
main.c

@@ -300,7 +300,7 @@ int main(void)
     NtpInit();
 
     NutThreadCreate("BackgroundThread", StartupInit, NULL, 1024);
-    //NutThreadCreate("BackgroundThread", AlarmSync, NULL, 2500);
+    NutThreadCreate("BackgroundThread", AlarmSync, NULL, 2500);
     NutThreadCreate("BackgroundThread", NTPSync, NULL, 700);
     /** Quick fix for turning off the display after 10 seconds boot */
 
@@ -318,14 +318,7 @@ int main(void)
 	/* Enable global interrupts */
 	sei();
 
-    struct _tm tm;
-	tm = GetRTCTime();
-	tm.tm_sec += 10;
-    setAlarm(tm,"test1234", "0.0.0.0","", 8001,1,0,0);
 
-/*    if(hasNetworkConnection() == true){
-        playStream("145.58.53.152", 80, "/3fm-bb-mp3");
-    }*/
     unsigned char VOL = 64;
 	
 	LcdBackLight(LCD_BACKLIGHT_OFF);