diff --git a/.gitignore b/.gitignore index f7668fd..984fdb8 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,9 @@ # Ignore text editor (e.g. emacs) autosave files *~ +# Build Artifacts +O.*_Common/ +O.*_RHEL8-x86_64/ # Compiled Object files *.slo diff --git a/Makefile.RHEL8 b/Makefile.RHEL8 index eabbf77..e3d02c2 100644 --- a/Makefile.RHEL8 +++ b/Makefile.RHEL8 @@ -12,18 +12,18 @@ REQUIRED+=stream REQUIRED+=scaler REQUIRED+=asynMotor -# using a test version -#scaler_VERSION=2024 - +# Release version LIBVERSION=2024-v2 +# DB files to include in the release TEMPLATES += sinqEPICSApp/Db/dimetix.db TEMPLATES += sinqEPICSApp/Db/slsvme.db TEMPLATES += sinqEPICSApp/Db/spsamor.db +# DBD files to include in the release DBDS += sinqEPICSApp/src/sinq.dbd -# What we need at SINQ +# Source files to build SOURCES += sinqEPICSApp/src/devScalerEL737.c SOURCES += sinqEPICSApp/src/SINQController.cpp SOURCES += sinqEPICSApp/src/SINQAxis.cpp @@ -36,4 +36,7 @@ SOURCES += sinqEPICSApp/src/pmacAsynIPPort.c SOURCES += sinqEPICSApp/src/pmacAxis.cpp SOURCES += sinqEPICSApp/src/pmacController.cpp SOURCES += sinqEPICSApp/src/MasterMACSDriver.cpp + +USR_CFLAGS += -Wall -Wextra # -Werror + # MISCS would be the place to keep the stream device template files diff --git a/sinqEPICSApp/src/devScalerEL737.c b/sinqEPICSApp/src/devScalerEL737.c index 8858b70..e134237 100644 --- a/sinqEPICSApp/src/devScalerEL737.c +++ b/sinqEPICSApp/src/devScalerEL737.c @@ -114,13 +114,13 @@ typedef struct { unsigned int dbInit; }EL737priv; -static void dummyAsynCallback(asynUser *pasynUser) +static void dummyAsynCallback([[maybe_unused]] asynUser *pasynUser) { } static void connectSlaveRecords(EL737priv *priv) { - char slaveName[PVNAME_SZ], errName[256]; + char slaveName[PVNAME_SZ + 18], errName[256]; long status; priv->dbInit = 1; @@ -168,7 +168,7 @@ static void connectSlaveRecords(EL737priv *priv) errlogPrintf("dbNameToAddr succeded for %s, record access %s\n",slaveName, priv->threshCounter.precord->name); } - snprintf(slaveName,sizeof(slaveName),"%s:Threshold", priv->psr->name); + snprintf(slaveName, sizeof(slaveName), "%s:Threshold", priv->psr->name); errlogPrintf("Name of thresholdCounter variable: %s\n", slaveName); status = dbNameToAddr(slaveName,&priv->threshold); if(status!= 0){ @@ -419,7 +419,8 @@ static void runEvents(EL737priv *priv) { char command[COMLEN], reply[COMLEN], errName[256]; int status; - long dbStatus, myThreshold, nElements = 1, options = 0, threshCounter; + long dbStatus, nElements = 1, options = 0, threshCounter; + long unsigned int myThreshold; /* This is the better way to set the threshold rather then the old way below which uses diff --git a/sinqEPICSApp/src/pmacController.cpp b/sinqEPICSApp/src/pmacController.cpp index 13dd2b2..0f7fd79 100644 --- a/sinqEPICSApp/src/pmacController.cpp +++ b/sinqEPICSApp/src/pmacController.cpp @@ -158,7 +158,7 @@ pAxes_ = (pmacAxis **)(asynMotorController::pAxes_); createParam(PMAC_C_CommsErrorString, asynParamInt32, &PMAC_C_CommsError_); // Connect our Asyn user to the low level port that is a parameter to this constructor -if (lowLevelPortConnect(lowLevelPortName, lowLevelPortAddress, &lowLevelPortUser_, "\006", (char *)"\r") != asynSuccess) { +if (lowLevelPortConnect(lowLevelPortName, lowLevelPortAddress, &lowLevelPortUser_, "\006", "\r") != asynSuccess) { printf("%s: Failed to connect to low level asynOctetSyncIO port %s\n", functionName, lowLevelPortName); setIntegerParam(PMAC_C_CommsError_, 1); } else { @@ -965,7 +965,7 @@ asynStatus pmacV3Controller::writeInt32(asynUser *pasynUser, epicsInt32 value) { int encoder_id = 0; sscanf(response + (reponse_length - 3), "%2X", &encoder_id); - snprintf(command, sizeof(command), "P46", pAxis->axisNo_); + snprintf(command, sizeof(command), "P46"); this->lowLevelWriteRead(pAxis->axisNo_, command, response); int number_of_axes = strtol(response, NULL, 10);