Skip to content

Commit

Permalink
Initialize status in the axis poll method, which doesn't currently qu…
Browse files Browse the repository at this point in the history
…ery the controller.

Without this change the following error is printed every time a status update is forced after a field is changed:

epics> 2021/11/02 16:37:36.321 asynMotorController:writeInt32 error, status=-222962768 axis=0, function=26, value=0

These errors were easy to reproduce by toggling the CNEN field or changing a limit.
  • Loading branch information
kmpeters committed Nov 2, 2021
1 parent e537b51 commit 187f609
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion acsMotionApp/src/SPiiPlusDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ SPiiPlusAxis::SPiiPlusAxis(SPiiPlusController *pC, int axisNo)

asynStatus SPiiPlusAxis::poll(bool* moving)
{
asynStatus status;
asynStatus status = asynSuccess;
SPiiPlusController* controller = (SPiiPlusController*) pC_;
//static const char *functionName = "poll";
std::stringstream cmd;
Expand Down

0 comments on commit 187f609

Please sign in to comment.