Skip to content

Commit

Permalink
Merge pull request #16 from epics-motor/issue13
Browse files Browse the repository at this point in the history
Fixed E-727 polling when the SRG command isn't supported (controllers with older firmware?). Fixes #13
  • Loading branch information
kmpeters authored Nov 29, 2022
2 parents 771849a + 5ae06f5 commit f737449
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions pigcs2App/src/PIGCSPiezoController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,26 @@ asynStatus PIGCSPiezoController::getStatus(PIasynAxis* pAxis, int& homing, int&
asynPrint(m_pInterface->m_pCurrentLogSink, ASYN_TRACE_FLOW,
"PIGCSPiezoController::getStatus() buf:%s moving %d, svo: %d\n",
buf, moving, servoControl);
} else {
// Do what the piezo class used to do before the SRG check was added

status = getMoving(pAxis, moving);
if (status != asynSuccess)
{
return status;
}

homing = 0;
negLimit = 0;
posLimit = 0;

sprintf(cmd, "SVO? %s", pAxis->m_szAxisName);
status = m_pInterface->sendAndReceive(cmd, buf, 99);
if (status != asynSuccess)
{
return status;
}
getValue(buf, servoControl);
}

return status;
Expand Down

0 comments on commit f737449

Please sign in to comment.