Commit 16ed5c5d authored by Claes Sjofors's avatar Claes Sjofors

IO OneWire_AiDevice Status attribute set

parent 9af2f4fd
...@@ -91,6 +91,7 @@ static pwr_tStatus IoCardInit( io_tCtx ctx, ...@@ -91,6 +91,7 @@ static pwr_tStatus IoCardInit( io_tCtx ctx,
errh_Info( "Init of OneWire_AiDevice '%s'", cp->Name); errh_Info( "Init of OneWire_AiDevice '%s'", cp->Name);
} }
op->Status = IO__SUCCESS;
return IO__SUCCESS; return IO__SUCCESS;
} }
...@@ -176,6 +177,7 @@ static pwr_tStatus IoCardRead( io_tCtx ctx, ...@@ -176,6 +177,7 @@ static pwr_tStatus IoCardRead( io_tCtx ctx,
*(pwr_tFloat32 *)chanp->vbp = actvalue; *(pwr_tFloat32 *)chanp->vbp = actvalue;
sop->SigValue = cop->SigValPolyCoef1 * fvalue + cop->SigValPolyCoef0; sop->SigValue = cop->SigValPolyCoef1 * fvalue + cop->SigValPolyCoef0;
sop->RawValue = fvalue; sop->RawValue = fvalue;
op->Status = IO__SUCCESS;
break; break;
} }
default: { default: {
...@@ -201,11 +203,13 @@ static pwr_tStatus IoCardRead( io_tCtx ctx, ...@@ -201,11 +203,13 @@ static pwr_tStatus IoCardRead( io_tCtx ctx,
*(pwr_tFloat32 *)chanp->vbp = actvalue; *(pwr_tFloat32 *)chanp->vbp = actvalue;
sop->SigValue = cop->SigValPolyCoef1 * ivalue + cop->SigValPolyCoef0; sop->SigValue = cop->SigValPolyCoef1 * ivalue + cop->SigValPolyCoef0;
sop->RawValue = ivalue; sop->RawValue = ivalue;
op->Status = IO__SUCCESS;
} }
} }
} }
else { else {
op->Super.ErrorCount++; op->Super.ErrorCount++;
op->Status = IO__SEARCHSTRING;
} }
} }
...@@ -216,6 +220,7 @@ static pwr_tStatus IoCardRead( io_tCtx ctx, ...@@ -216,6 +220,7 @@ static pwr_tStatus IoCardRead( io_tCtx ctx,
if ( op->Super.ErrorCount >= op->Super.ErrorHardLimit) { if ( op->Super.ErrorCount >= op->Super.ErrorHardLimit) {
errh_Error( "IO Card ErrorHardLimit reached '%s', IO stopped", cp->Name); errh_Error( "IO Card ErrorHardLimit reached '%s', IO stopped", cp->Name);
ctx->Node->EmergBreakTrue = 1; ctx->Node->EmergBreakTrue = 1;
op->Status = IO__ERRDEVICE;
return IO__ERRDEVICE; return IO__ERRDEVICE;
} }
......
...@@ -120,6 +120,7 @@ initfail <Initialization failed> /error ...@@ -120,6 +120,7 @@ initfail <Initialization failed> /error
nodevice <Device not found> /error nodevice <Device not found> /error
releasebuild <I/O system is not built with this release> /error releasebuild <I/O system is not built with this release> /error
dummybuild <Archive for I/O system is not linked with this executable> /error dummybuild <Archive for I/O system is not linked with this executable> /error
searchstring <Search string not found> /error
.end .end
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