|
@@ -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 ++;
|