fix bug in deadband plugin; attempt to make support build on win32

This commit is contained in:
mrkraimer
2019-06-21 15:53:31 -04:00
parent bd37756ba3
commit 0437602236
2 changed files with 5 additions and 2 deletions

View File

@ -27,4 +27,7 @@ include $(PVDATABASE_SRC)/support/Makefile
pvDatabase_LIBS += $(EPICS_BASE_PVA_CORE_LIBS)
pvDatabase_LIBS += $(EPICS_BASE_IOC_LIBS)
# needed for Windows
LIB_SYS_LIBS_WIN32 += netapi32 ws2_32
include $(TOP)/configure/RULES

View File

@ -64,9 +64,9 @@ PVDeadbandFilterPtr PVDeadbandFilter::create(
ScalarConstPtr scalar = static_pointer_cast<const Scalar>(field);
if(!ScalarTypeFunc::isNumeric(scalar->getScalarType())) return PVDeadbandFilterPtr();
bool absolute = false;
if(requestValue.find("abs")>=0) {
if(requestValue.find("abs")==0) {
absolute = true;
} else if(requestValue.find("rel")>=0) {
} else if(requestValue.find("rel")==0) {
absolute = false;
} else {
return PVDeadbandFilterPtr();