|
@@ -144,7 +144,19 @@ static void Color_RGB(uint8_t r, uint8_t g, uint8_t b) {
|
|
|
|
|
|
/* cheng led color by time seconds */
|
|
|
static void ColorCircle(void) {
|
|
|
- uint8_t hue = Clock.Sec * 6;
|
|
|
+ static uint8_t hue = 0, stage = 0;
|
|
|
+
|
|
|
+ if (stage == 0) {
|
|
|
+ hue = Clock.Sec * 6;
|
|
|
+ RTOS_SetTask(ColorCircle, 20, 20);
|
|
|
+ } else if (stage > 8) {
|
|
|
+ RTOS_DeleteTask(ColorCircle);
|
|
|
+ stage = 0;
|
|
|
+ hue ++;
|
|
|
+ } else {
|
|
|
+ hue ++;
|
|
|
+ stage ++;
|
|
|
+ }
|
|
|
HSV2LED(hue, 255, 255);
|
|
|
}
|
|
|
|