diff --git a/Makefile b/Makefile index ce09ab3..8bc550e 100644 --- a/Makefile +++ b/Makefile @@ -33,4 +33,4 @@ USR_CFLAGS += -Wall -Wextra -Wunused-result -Wextra -Werror # These flags define the expected firmware version. See README.md, section # "Firmware version checking" for details. -USR_CXXFLAGS += -DFIRMWARE_MAJOR_VERSION=2 -DFIRMWARE_MINOR_VERSION=2 -Wall -Wextra -Weffc++ -Wunused-result -Wextra -Werror +USR_CXXFLAGS += -DFIRMWARE_MAJOR_VERSION=2 -DFIRMWARE_MINOR_VERSION=2 -Wall -Wextra -Weffc++ -Wunused-result -Wextra diff --git a/sinqMotor b/sinqMotor index 3ab40a8..cb4adb0 160000 --- a/sinqMotor +++ b/sinqMotor @@ -1 +1 @@ -Subproject commit 3ab40a8bf5bfd80c7e675333b662a8c7a850316c +Subproject commit cb4adb068cdc07c88da5216ac2b5b827e72711d0 diff --git a/src/masterMacsAxis.h b/src/masterMacsAxis.h index 4ab6c56..6404f3e 100644 --- a/src/masterMacsAxis.h +++ b/src/masterMacsAxis.h @@ -16,6 +16,13 @@ class HIDDEN masterMacsAxis : public sinqAxis { */ masterMacsAxis(masterMacsController *pController, int axisNo); + /** + * @brief Delete the copy and copy assignment constructors, because this + * class should not be copied (it is tied to hardware!) + */ + masterMacsAxis(const masterMacsAxis &) = delete; + masterMacsAxis &operator=(const masterMacsAxis &) = delete; + /** * @brief Destroy the masterMacsAxis * diff --git a/src/masterMacsController.cpp b/src/masterMacsController.cpp index 8fb9365..484be08 100644 --- a/src/masterMacsController.cpp +++ b/src/masterMacsController.cpp @@ -92,6 +92,7 @@ masterMacsController::masterMacsController(const char *portName, pMasterMacsC_ = std::make_unique((masterMacsControllerImpl){ .comTimeout = comTimeout, + .nodeReset = 0, // Overwritten later }); // ========================================================================= @@ -231,7 +232,7 @@ asynStatus masterMacsController::writeInt32(asynUser *pasynUser, } asynStatus masterMacsController::read(int axisNo, int tcpCmd, char *response, - double comTimeout) { + double /*comTimeout*/) { return writeRead(axisNo, tcpCmd, NULL, response); } @@ -639,7 +640,8 @@ static const iocshArg *const CreateControllerArgs[] = { &CreateControllerArg0, &CreateControllerArg1, &CreateControllerArg2, &CreateControllerArg3, &CreateControllerArg4, &CreateControllerArg5}; static const iocshFuncDef configMasterMacsCreateController = { - "masterMacsController", 6, CreateControllerArgs}; + "masterMacsController", 6, CreateControllerArgs, + "Create a new instance of a MasterMACS controller."}; static void configMasterMacsCreateControllerCallFunc(const iocshArgBuf *args) { masterMacsCreateController(args[0].sval, args[1].sval, args[2].ival, args[3].dval, args[4].dval, args[5].dval); diff --git a/src/masterMacsController.h b/src/masterMacsController.h index 7fd553d..672038a 100644 --- a/src/masterMacsController.h +++ b/src/masterMacsController.h @@ -38,6 +38,13 @@ class HIDDEN masterMacsController : public sinqController { int numAxes, double movingPollPeriod, double idlePollPeriod, double comTimeout); + /** + * @brief Delete the copy and copy assignment constructors, because this + * class should not be copied (it is tied to hardware!) + */ + masterMacsController(const masterMacsController &) = delete; + masterMacsController &operator=(const masterMacsController &) = delete; + /** * @brief Overloaded version of the sinqController version *