Sfoglia il codice sorgente

Replace <tab> by spaces.

Vladimir N. Shilov 2 anni fa
parent
commit
0b4be29ac1
1 ha cambiato i file con 47 aggiunte e 47 eliminazioni
  1. 47 47
      Src/clock.c

+ 47 - 47
Src/clock.c

@@ -130,7 +130,7 @@ void new_Second(void) {
   if (dispWDT != 0) {
     dispWDT--;
     if (dispWDT == 0) {
-			Blink_Stop();
+      Blink_Stop();
       ES_PlaceEvent(evDisplayWDT);
     }
   }
@@ -284,23 +284,23 @@ static void IN15_FadeIn(void) {
   static uint8_t off = FADE_STOP;
   static uint8_t st = 0;
 
-	if (symToFade != 0) {
-		if (st == 0) {
-			st = 1;
-			GPIOA->BSRR = symToFade;
-			on += FADE_STEP;
-			if (on < FADE_STOP) {
-				RTOS_SetTask(IN15_FadeIn, on, 0);
-			} else {
-				on = FADE_START; off = FADE_STOP; st = 0; symToFade = 0;
-			}
-		} else {
-			st = 0;
-			IN15_OFF;
-			off -= FADE_STEP;
-			RTOS_SetTask(IN15_FadeIn, off, 0);
-		}
-	}
+  if (symToFade != 0) {
+    if (st == 0) {
+      st = 1;
+      GPIOA->BSRR = symToFade;
+      on += FADE_STEP;
+      if (on < FADE_STOP) {
+        RTOS_SetTask(IN15_FadeIn, on, 0);
+      } else {
+        on = FADE_START; off = FADE_STOP; st = 0; symToFade = 0;
+      }
+    } else {
+      st = 0;
+      IN15_OFF;
+      off -= FADE_STEP;
+      RTOS_SetTask(IN15_FadeIn, off, 0);
+    }
+  }
 }
 
 static void IN15_FadeOut(void) {
@@ -308,23 +308,23 @@ static void IN15_FadeOut(void) {
   static uint8_t on = FADE_STOP;
   static uint8_t st = 0;
 
-	if (symToFade != 0) {
-		if (st == 0) {
-			st = 1;
-			IN15_OFF;
-			off += FADE_STEP;
-			if (off < FADE_STOP) {
-				RTOS_SetTask(IN15_FadeOut, off, 0);
-			} else {
-				off = FADE_START; on = FADE_STOP; st = 0; symToFade = 0;
-			}
-		} else {
-			st = 0;
-			GPIOA->BSRR = symToFade;
-			on -= FADE_STEP;
-			RTOS_SetTask(IN15_FadeOut, on, 0);
-		}
-	}
+  if (symToFade != 0) {
+    if (st == 0) {
+      st = 1;
+      IN15_OFF;
+      off += FADE_STEP;
+      if (off < FADE_STOP) {
+        RTOS_SetTask(IN15_FadeOut, off, 0);
+      } else {
+        off = FADE_START; on = FADE_STOP; st = 0; symToFade = 0;
+      }
+    } else {
+      st = 0;
+      GPIOA->BSRR = symToFade;
+      on -= FADE_STEP;
+      RTOS_SetTask(IN15_FadeOut, on, 0);
+    }
+  }
 }
 
 /**
@@ -519,7 +519,7 @@ void showSensorData(void) {
 }
 
 void setTimeShow(void) {
-	dispWDT = DISP_WDT_TIME;
+  dispWDT = DISP_WDT_TIME;
 
   tube4_t buf;
   buf.s8.tA = setClock.Hr >> 4;
@@ -530,7 +530,7 @@ void setTimeShow(void) {
 }
 
 void setTimeBegin(void) {
-	RTOS_DeleteTask(MinusFadeOut);
+  RTOS_DeleteTask(MinusFadeOut);
   in15Minus();
   HSV2LED(COLOUR_NIXIE, LightingBright);
   RTOS_SetTask(btnProcess, BTN_TIME_HOLDED, BTN_SCAN_PERIOD);
@@ -572,7 +572,7 @@ void setMMDec(void) {
 }
 
 void setTimeEnd(void) {
-	dispWDT = 0;
+  dispWDT = 0;
   RTOS_SetTask(btnProcess, BTN_TIME_HOLDED, BTN_SCAN_PERIOD);
 
   setClock.Sec = 0;
@@ -591,7 +591,7 @@ void setDateBegin(void) {
 }
 
 void setDateEnd(void) {
-	dispWDT =  0;
+  dispWDT =  0;
   RTOS_SetTask(btnProcess, BTN_TIME_HOLDED, BTN_SCAN_PERIOD);
   
   RTC_WriteCalendar(&setClock);
@@ -611,7 +611,7 @@ void setWDBegin(void) {
 }
 
 void setWDShow(void) {
-	dispWDT = DISP_WDT_TIME;
+  dispWDT = DISP_WDT_TIME;
 
   tube4_t buf;
   buf.s8.tA = TUBE_BLANK;
@@ -622,7 +622,7 @@ void setWDShow(void) {
 }
 
 void setDMShow(void) {
-	dispWDT = DISP_WDT_TIME;
+  dispWDT = DISP_WDT_TIME;
 
   tube4_t buf;
   buf.s8.tA = setClock.Day >> 4;
@@ -633,7 +633,7 @@ void setDMShow(void) {
 }
 
 void setYearShow(void) {
-	dispWDT = DISP_WDT_TIME;
+  dispWDT = DISP_WDT_TIME;
 
   tube4_t buf;
   buf.s8.tA = 2;
@@ -703,7 +703,7 @@ void setDecYear(void) {
 }
 
 void showDNhour(void) {
-	dispWDT = DISP_WDT_TIME;
+  dispWDT = DISP_WDT_TIME;
 
   tube4_t buf;
   es_state_t e_st = ES_GetState();
@@ -723,7 +723,7 @@ void showDNhour(void) {
 }
 
 void showDNbright(void) {
-	dispWDT = DISP_WDT_TIME;
+  dispWDT = DISP_WDT_TIME;
 
   tube4_t buf;
   es_state_t e_st = ES_GetState();
@@ -743,7 +743,7 @@ void showDNbright(void) {
 }
 
 void showDNmode(void) {
-	dispWDT = DISP_WDT_TIME;
+  dispWDT = DISP_WDT_TIME;
 
   uint8_t dm, nm; 
   tube4_t buf;
@@ -765,7 +765,7 @@ void showDNmode(void) {
 }
 
 void showDNcolour(void) {
-	dispWDT = DISP_WDT_TIME;
+  dispWDT = DISP_WDT_TIME;
 
   tube4_t buf;
   es_state_t e_st = ES_GetState();
@@ -792,7 +792,7 @@ void setDNbegin(void) {
 }
 
 void setDNend(void) {
-	dispWDT =  0;
+  dispWDT =  0;
   RTOS_SetTask(btnProcess, BTN_TIME_HOLDED, BTN_SCAN_PERIOD);
   Blink_Stop();
   LEDS_OFF;