diff --git a/slsDetectorSoftware/gitInfo.txt b/slsDetectorSoftware/gitInfo.txt index 754ad0a4c..9de3d6335 100644 --- a/slsDetectorSoftware/gitInfo.txt +++ b/slsDetectorSoftware/gitInfo.txt @@ -1,9 +1,9 @@ Path: slsDetectorsPackage/slsDetectorSoftware URL: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git Repository Root: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git -Repsitory UUID: e599bfe56f512ea6a262483f61ffd8d67d6c6fcd -Revision: 1720 -Branch: 3.1.3 +Repsitory UUID: d69d69e8928f90b053a0e5ffccb9cfc4e9c5f960 +Revision: 1722 +Branch: 3.1.4-rc Last Changed Author: Dhanya_Thattil -Last Changed Rev: 3475 -Last Changed Date: 2018-06-28 15:27:02.000000002 +0200 ./threadFiles/ThreadPool.o +Last Changed Rev: 3483 +Last Changed Date: 2018-07-25 16:51:25.000000002 +0200 ./slsDetector/slsDetectorCommand.cpp diff --git a/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c b/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c index 52a25b8bd..0bbad5a07 100755 --- a/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c +++ b/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c @@ -905,21 +905,16 @@ int64_t getFrames(){ int64_t setExposureTime(int64_t value){ /* time is in ns */ - if (value!=-1) { - double actualvalue = value*(1E-9*CLK_FREQ); - value*=(1E-9*CLK_FREQ); - if(fabs(actualvalue-value)>= 0.5){ - if(actualvalue > value) - value++; - else - value--; - } + if (value != -1) { + value = (value * 1E-3 * CLK_FREQ ) + 0.5; } - return set64BitReg(value,SET_EXPTIME_LSB_REG, SET_EXPTIME_MSB_REG)/(1E-9*CLK_FREQ); + return (set64BitReg(value,SET_EXPTIME_LSB_REG, SET_EXPTIME_MSB_REG) / + (1E-3 * CLK_FREQ)) + 0.5; } int64_t getExposureTime(){ - return get64BitReg(GET_EXPTIME_LSB_REG, GET_EXPTIME_MSB_REG)/(1E-9*CLK_FREQ); + return (get64BitReg(GET_EXPTIME_LSB_REG, GET_EXPTIME_MSB_REG) / + (1E-3 * CLK_FREQ)) + 0.5; } int64_t setGates(int64_t value){ @@ -933,23 +928,16 @@ int64_t getGates(){ int64_t setPeriod(int64_t value){ /* time is in ns */ if (value!=-1) { - double actualvalue = value*(1E-9*CLK_FREQ); - value*=(1E-9*CLK_FREQ); - if(fabs(actualvalue-value)>= 0.5){ - if(actualvalue > value) - value++; - else - value--; - } + value = (value * 1E-3 * CLK_FREQ ) + 0.5; } - - - return set64BitReg(value,SET_PERIOD_LSB_REG, SET_PERIOD_MSB_REG)/(1E-9*CLK_FREQ); + return (set64BitReg(value,SET_PERIOD_LSB_REG, SET_PERIOD_MSB_REG) / + (1E-3 * CLK_FREQ)) + 0.5; } int64_t getPeriod(){ - return get64BitReg(GET_PERIOD_LSB_REG, GET_PERIOD_MSB_REG)/(1E-9*CLK_FREQ); + return (get64BitReg(GET_PERIOD_LSB_REG, GET_PERIOD_MSB_REG) / + (1E-3 * CLK_FREQ)) + 0.5; } int64_t setDelay(int64_t value){ @@ -959,16 +947,11 @@ int64_t setDelay(int64_t value){ value += masterdefaultdelay; cprintf(BLUE,"Actual delay for master: %lld\n", (long long int) value); } - double actualvalue = value*(1E-9*CLK_FREQ); - value*=(1E-9*CLK_FREQ); - if(fabs(actualvalue-value)>= 0.5){ - if(actualvalue > value) - value++; - else - value--; - } + value = (value * 1E-3 * CLK_FREQ ) + 0.5; } - int64_t retval = set64BitReg(value,SET_DELAY_LSB_REG, SET_DELAY_MSB_REG)/(1E-9*CLK_FREQ); + + int64_t retval = (set64BitReg(value,SET_DELAY_LSB_REG, SET_DELAY_MSB_REG) / + (1E-3 * CLK_FREQ)) + 0.5; if (masterflags == IS_MASTER) { cprintf(BLUE,"Actual delay read from master: %lld\n", (long long int) retval); retval -= masterdefaultdelay; @@ -978,7 +961,8 @@ int64_t setDelay(int64_t value){ } int64_t getDelay(){ - return get64BitReg(GET_DELAY_LSB_REG, GET_DELAY_MSB_REG)/(1E-9*CLK_FREQ); + return (get64BitReg(GET_DELAY_LSB_REG, GET_DELAY_MSB_REG) / + (1E-3 * CLK_FREQ)) + 0.5; } int64_t setTrains(int64_t value){ @@ -996,37 +980,26 @@ int64_t setProbes(int64_t value){ int64_t setProgress() { - //????? eventually call after setting the registers - return 0; } int64_t getProgress() { - - //should be done in firmware!!!! - return 0; } int64_t getActualTime(){ - return get64BitReg(GET_ACTUAL_TIME_LSB_REG, GET_ACTUAL_TIME_MSB_REG)/(1E-9*CLK_FREQ); + return (get64BitReg(GET_ACTUAL_TIME_LSB_REG, GET_ACTUAL_TIME_MSB_REG) / + (1E-3 * CLK_FREQ)) + 0.5; } int64_t getMeasurementTime(){ int64_t v=get64BitReg(GET_MEASUREMENT_TIME_LSB_REG, GET_MEASUREMENT_TIME_MSB_REG); - /* u_int64_t mask=0x8000000000000000; - if (v & mask ) { -#ifdef VERBOSE - printf("no measurement time left\n"); -#endif - return -1E+9; - } else*/ - return v/(1E-9*CLK_FREQ); + return (v / (1E-3 * CLK_FREQ)) + 0.5; } diff --git a/slsDetectorSoftware/gotthardDetectorServer/gitInfo.txt b/slsDetectorSoftware/gotthardDetectorServer/gitInfo.txt index 68b17f2ed..cce3edd89 100644 --- a/slsDetectorSoftware/gotthardDetectorServer/gitInfo.txt +++ b/slsDetectorSoftware/gotthardDetectorServer/gitInfo.txt @@ -1,9 +1,9 @@ Path: slsDetectorsPackage/slsDetectorSoftware/gotthardDetectorServer URL: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git Repository Root: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git -Repsitory UUID: 675d69392a6497d42b23057c7c8783c8dad768d0 -Revision: 223 -Branch: 3.1.0-rc +Repsitory UUID: d69d69e8928f90b053a0e5ffccb9cfc4e9c5f960 +Revision: 225 +Branch: 3.1.4-rc Last Changed Author: Dhanya_Thattil -Last Changed Rev: 3447 -Last Changed Date: 2018-02-27 14:04:08.000000002 +0100 ./server_funcs.c +Last Changed Rev: 3483 +Last Changed Date: 2018-07-25 14:56:37.000000002 +0200 ./firmware_funcs.c diff --git a/slsDetectorSoftware/gotthardDetectorServer/gitInfoGotthard.h b/slsDetectorSoftware/gotthardDetectorServer/gitInfoGotthard.h index 6c3fb814c..336fd0b23 100644 --- a/slsDetectorSoftware/gotthardDetectorServer/gitInfoGotthard.h +++ b/slsDetectorSoftware/gotthardDetectorServer/gitInfoGotthard.h @@ -1,6 +1,6 @@ #define GITURL "git@github.com:slsdetectorgroup/slsDetectorPackage.git" -#define GITREPUUID "675d69392a6497d42b23057c7c8783c8dad768d0" +#define GITREPUUID "d69d69e8928f90b053a0e5ffccb9cfc4e9c5f960" #define GITAUTH "Dhanya_Thattil" -#define GITREV 0x3447 -#define GITDATE 0x20180227 -#define GITBRANCH "3.1.0-rc" +#define GITREV 0x3483 +#define GITDATE 0x20180725 +#define GITBRANCH "3.1.4-rc" diff --git a/slsDetectorSoftware/gotthardDetectorServer/gotthardDetectorServerv3.1.0.1 b/slsDetectorSoftware/gotthardDetectorServer/gotthardDetectorServerv3.1.0.1 deleted file mode 100755 index 8323e5aac..000000000 Binary files a/slsDetectorSoftware/gotthardDetectorServer/gotthardDetectorServerv3.1.0.1 and /dev/null differ diff --git a/slsDetectorSoftware/gotthardDetectorServer/gotthardDetectorServerv3.1.4.0 b/slsDetectorSoftware/gotthardDetectorServer/gotthardDetectorServerv3.1.4.0 new file mode 100755 index 000000000..36cb06c83 Binary files /dev/null and b/slsDetectorSoftware/gotthardDetectorServer/gotthardDetectorServerv3.1.4.0 differ diff --git a/slsDetectorSoftware/gotthardDetectorServer/server_defs.h b/slsDetectorSoftware/gotthardDetectorServer/server_defs.h index 794e76546..6dc6bf59d 100755 --- a/slsDetectorSoftware/gotthardDetectorServer/server_defs.h +++ b/slsDetectorSoftware/gotthardDetectorServer/server_defs.h @@ -54,7 +54,7 @@ #define DEBUGOUT #endif -#define CLK_FREQ 32.1E+6 +#define CLK_FREQ 32.007729 #endif diff --git a/slsDetectorSoftware/slsDetector/gitInfoLib.h b/slsDetectorSoftware/slsDetector/gitInfoLib.h index 50b5e28ee..336fd0b23 100644 --- a/slsDetectorSoftware/slsDetector/gitInfoLib.h +++ b/slsDetectorSoftware/slsDetector/gitInfoLib.h @@ -1,6 +1,6 @@ #define GITURL "git@github.com:slsdetectorgroup/slsDetectorPackage.git" -#define GITREPUUID "e599bfe56f512ea6a262483f61ffd8d67d6c6fcd" +#define GITREPUUID "d69d69e8928f90b053a0e5ffccb9cfc4e9c5f960" #define GITAUTH "Dhanya_Thattil" -#define GITREV 0x3475 -#define GITDATE 0x20180628 -#define GITBRANCH "3.1.3" +#define GITREV 0x3483 +#define GITDATE 0x20180725 +#define GITBRANCH "3.1.4-rc" diff --git a/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp b/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp index bc0a34793..6664af3cb 100644 --- a/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp @@ -5464,11 +5464,8 @@ string slsDetectorCommand::cmdTimer(int narg, char *args[], int action) { else return string("cannot scan timer value ")+string(args[1]); if (index==ACQUISITION_TIME || index==SUBFRAME_ACQUISITION_TIME || index==FRAME_PERIOD || index==DELAY_AFTER_TRIGGER) { - // t=(int64_t)(val*1E+9); for precision of eg.0.0000325, following done - val*=1E9; - t = (int64_t)val; - if(fabs(val-t)) // to validate precision loss - t = t + val - t; //even t += vak-t loses precision + // +0.5 for precision of eg.0.0000325 + t = ( val * 1E9 + 0.5); }else t=(int64_t)val; }