فهرست منبع

Improve ColorCircle.

Vladimir N. Shilov 3 سال پیش
والد
کامیت
ff7367e524
1فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 4 4
      Src/main.c

+ 4 - 4
Src/main.c

@@ -154,12 +154,12 @@ static void Color_RGB(uint8_t r, uint8_t g, uint8_t b) {
 
 /* cheng led color by time seconds */
 static void ColorCircle(void) {
-  static uint8_t hue = 0, stage = 0;
+  static int16_t hue = 0, stage = 0;
 
   if (stage == 0) {
-    hue = Clock.Sec * 6;
-    RTOS_SetTask(ColorCircle, 20, 20);
-  } else if (stage > 8) {
+    hue = (Clock.Sec * 6) - 6;
+    RTOS_SetTask(ColorCircle, 100, 100);
+  } else if (stage > 4) {
     RTOS_DeleteTask(ColorCircle);
     stage = 0;
     hue ++;