Commit 23402098 authored by claes's avatar claes

Allow errors after some time limit

parent 143d65ef
......@@ -39,6 +39,7 @@ typedef struct {
pwr_tFloat32 OldValue[IO_MAXCHAN];
pwr_tBoolean OldTestOn[IO_MAXCHAN];
int WriteFirst;
pwr_tTime ErrTime;
} io_sLocal;
......@@ -182,6 +183,7 @@ static pwr_tStatus IoCardWrite (
int fixout;
pwr_tUInt16 data;
pwr_tFloat32 rawvalue;
pwr_tTime now;
local = (io_sLocal *) cp->Local;
op = (pwr_sClass_Ao_HVAO4 *) cp->op;
......@@ -245,7 +247,15 @@ static pwr_tStatus IoCardWrite (
}
/* Increase error count and check error limits */
clock_gettime(CLOCK_REALTIME, &now);
if ( op->ErrorCount > op->ErrorSoftLimit) {
/* Ignore if some time has expired */
if ( now.tv_sec - local->ErrTime.tv_sec < 600)
op->ErrorCount++;
}
else
op->ErrorCount++;
local->ErrTime = now;
if ( op->ErrorCount == op->ErrorSoftLimit)
errh_Error( "IO Error soft limit reached on card '%s'", cp->Name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment