|
@@ -106,6 +106,12 @@ void new_Second(void) {
|
|
if (dispWDT != 0) {
|
|
if (dispWDT != 0) {
|
|
dispWDT--;
|
|
dispWDT--;
|
|
if (dispWDT == 0) {
|
|
if (dispWDT == 0) {
|
|
|
|
+ Flag.Blink_1 = 0;
|
|
|
|
+ Flag.Blink_2 = 0;
|
|
|
|
+ Flag.Blink_3 = 0;
|
|
|
|
+ Flag.Blink_4 = 0;
|
|
|
|
+ Flag.Blink_5 = 0;
|
|
|
|
+ Blink_Stop();
|
|
ES_PlaceEvent(evDisplayWDT);
|
|
ES_PlaceEvent(evDisplayWDT);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -259,21 +265,23 @@ static void IN15_FadeIn(void) {
|
|
static uint8_t off = FADE_STOP;
|
|
static uint8_t off = FADE_STOP;
|
|
static uint8_t st = 0;
|
|
static uint8_t st = 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) {
|
|
static void IN15_FadeOut(void) {
|
|
@@ -281,21 +289,23 @@ static void IN15_FadeOut(void) {
|
|
static uint8_t on = FADE_STOP;
|
|
static uint8_t on = FADE_STOP;
|
|
static uint8_t st = 0;
|
|
static uint8_t st = 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);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|