diff options
-rwxr-xr-x | wct4xxp.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -90,6 +90,7 @@ struct t4 { int syncs[4]; /* sync sources */ int psyncs[4]; /* span-relative sync sources */ int alarmtimer[4]; /* Alarm timer */ + int redalarms[4]; int blinktimer; #ifdef FANCY_ALARM int alarmpos; @@ -1265,8 +1266,13 @@ static void __t4_check_alarms(struct t4 *wc, int span) alarms |= ZT_ALARM_NOTOPEN; } - if (c & 0xa0) - alarms |= ZT_ALARM_RED; + if (c & 0xa0) { + if (wc->redalarms[span] > 10) + alarms |= ZT_ALARM_RED; + else + wc->redalarms[span]++; + } else + wc->redalarms[span] = 0; if (c & 0x4) alarms |= ZT_ALARM_BLUE; /* Keep track of recovering */ |