Commit f768effb authored by Claes Sjofors's avatar Claes Sjofors

Merge branch 'master' of pwrcvs:/data1/git/pwr

parents 4162c3ec 15ed25a0
...@@ -118,6 +118,11 @@ static pwr_tStatus IoCardRead( io_tCtx ctx, ...@@ -118,6 +118,11 @@ static pwr_tStatus IoCardRead( io_tCtx ctx,
s = strstr( str, "t="); s = strstr( str, "t=");
if ( s) { if ( s) {
sscanf( s+2, "%d", &ivalue); sscanf( s+2, "%d", &ivalue);
if ( ivalue == 85000) {
/* TODO Check CRC Probably power loss...
op->Super.ErrorCount++; */
}
io_ConvertAi32( cop, ivalue, &actvalue); io_ConvertAi32( cop, ivalue, &actvalue);
// Filter // Filter
...@@ -127,7 +132,7 @@ static pwr_tStatus IoCardRead( io_tCtx ctx, ...@@ -127,7 +132,7 @@ static pwr_tStatus IoCardRead( io_tCtx ctx,
actvalue = *(pwr_tFloat32 *)chanp->vbp + ctx->ScanTime / sop->FilterAttribute[0] * actvalue = *(pwr_tFloat32 *)chanp->vbp + ctx->ScanTime / sop->FilterAttribute[0] *
(actvalue - *(pwr_tFloat32 *)chanp->vbp); (actvalue - *(pwr_tFloat32 *)chanp->vbp);
} }
*(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;
......
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