diff --git a/include/ConstantAccessor.h b/include/ConstantAccessor.h index bf59096b5d07dcc57673a3ab144b6afc3c7658ff..27be3e7e0fb78afefced1b6949a304e7d84e4cd0 100644 --- a/include/ConstantAccessor.h +++ b/include/ConstantAccessor.h @@ -32,7 +32,11 @@ namespace ChimeraTK { bool readNonBlocking() { mtca4u::NDRegisterAccessor<UserType>::buffer_2D[0] = _value; - return true; + if(firstRead) { + firstRead = false; + return true; + } + return false; } void write() { @@ -53,6 +57,8 @@ namespace ChimeraTK { protected: std::vector<UserType> _value; + + bool firstRead{true}; };