ソースを参照

Disabled getting time during syncing (reverted from commit 2a5dbd1c531ecf3b5b32be4aa01f9a2f3e8ba6cd): With this the time and date won't be displayed anymore.

Janco Kock 9 年 前
コミット
6b928bd4d2
1 ファイル変更28 行追加31 行削除
  1. 28 31
      main.c

+ 28 - 31
main.c

@@ -269,37 +269,34 @@ int main(void)
 
     for (;;)
     {
-            //Check if a button is pressed
-            if (checkOffPressed() == 1){
-                start = time(0);
-                running = 1;
-                LcdBacklightKnipperen(startLCD);
-            }
-
-            //Check if background LED is on, and compare to timer
-            if (running == 1){
-                if (timer(start) >= 10){
-                    running = 0;
-                    LcdBackLight(LCD_BACKLIGHT_OFF);
-                }
-            }
-
-
-            if(!isAlarmSyncing)
-            {
-                if(X12RtcGetStatus(5) > 0) {
-                    displayAlarm(0, 1);
-                    if (KbScan() < -1 || checkTime() == 1) {
-                        handleAlarm();
-                        LcdBackLight(LCD_BACKLIGHT_OFF);
-                    }
-                }
-            }
-            else {
-                displayTime(0);
-                displayDate(1);
-            }
-            WatchDogRestart();
+		//Check if a button is pressed
+		if (checkOffPressed() == 1){
+			start = time(0);
+			running = 1;
+            LcdBacklightKnipperen(startLCD);
+		}
+
+		//Check if background LED is on, and compare to timer
+		if (running == 1){
+			if (timer(start) >= 10){
+				running = 0;
+				LcdBackLight(LCD_BACKLIGHT_OFF);
+			}
+		}
+
+        if(!isAlarmSyncing && X12RtcGetStatus(5) > 0)
+        {
+			displayAlarm(0,1);
+			if (KbScan() < -1 || checkTime() == 1){
+				handleAlarm();
+				LcdBackLight(LCD_BACKLIGHT_OFF);
+			}
+        }
+        else {
+            displayTime(0);
+            displayDate(1);
+        }
+        WatchDogRestart();
     }
 
     return(0);