From f485e0bcc922532a7b37e8ee8c701dc13b90086d Mon Sep 17 00:00:00 2001 From: Mark Rivers Date: Thu, 4 Apr 2019 08:50:21 -0500 Subject: [PATCH] Force maxAddr to be at least 2 --- ADApp/pluginSrc/NDPluginAttribute.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ADApp/pluginSrc/NDPluginAttribute.cpp b/ADApp/pluginSrc/NDPluginAttribute.cpp index ba061b5f5..8414af995 100644 --- a/ADApp/pluginSrc/NDPluginAttribute.cpp +++ b/ADApp/pluginSrc/NDPluginAttribute.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -179,7 +180,7 @@ NDPluginAttribute::NDPluginAttribute(const char *portName, int queueSize, int bl int priority, int stackSize) /* Invoke the base class constructor */ : NDPluginDriver(portName, queueSize, blockingCallbacks, - NDArrayPort, NDArrayAddr, maxAttributes, maxBuffers, maxMemory, + NDArrayPort, NDArrayAddr, std::max(maxAttributes,2), maxBuffers, maxMemory, asynInt32ArrayMask | asynFloat64Mask | asynFloat64ArrayMask | asynGenericPointerMask, asynInt32ArrayMask | asynFloat64Mask | asynFloat64ArrayMask | asynGenericPointerMask, ASYN_MULTIDEVICE, 1, priority, stackSize, 1)