From 7e01095684be425dd26d3f67b262578a615a6470 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil <33750417+thattil@users.noreply.github.com> Date: Tue, 28 Mar 2023 15:22:36 +0200 Subject: [PATCH] Fix tests (#698) * fix firmwareversion to reqd version as fw version cannot be 0 for virtual --- slsDetectorServers/ctbDetectorServer/slsDetectorFunctionList.c | 2 +- .../gotthard2DetectorServer/slsDetectorFunctionList.c | 2 +- .../gotthardDetectorServer/slsDetectorFunctionList.c | 2 +- .../jungfrauDetectorServer/slsDetectorFunctionList.c | 2 +- .../moenchDetectorServer/slsDetectorFunctionList.c | 3 ++- .../mythen3DetectorServer/slsDetectorFunctionList.c | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/slsDetectorServers/ctbDetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/ctbDetectorServer/slsDetectorFunctionList.c index dddb324f8..5f3f00b1d 100644 --- a/slsDetectorServers/ctbDetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/ctbDetectorServer/slsDetectorFunctionList.c @@ -332,7 +332,7 @@ void getServerVersion(char *version) { strcpy(version, APICTB); } uint64_t getFirmwareVersion() { #ifdef VIRTUAL - return 0; + return REQRD_FRMWR_VRSN; #endif return ((bus_r(FPGA_VERSION_REG) & FPGA_VERSION_BRD_RVSN_MSK) >> FPGA_VERSION_BRD_RVSN_OFST); diff --git a/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c index 886d947ee..107b33b2c 100644 --- a/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c @@ -256,7 +256,7 @@ void getServerVersion(char *version) { strcpy(version, APIGOTTHARD2); } u_int64_t getFirmwareVersion() { #ifdef VIRTUAL - return 0; + return REQRD_FRMWRE_VRSN; #endif return ((bus_r(FPGA_VERSION_REG) & FPGA_COMPILATION_DATE_MSK) >> FPGA_COMPILATION_DATE_OFST); diff --git a/slsDetectorServers/gotthardDetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/gotthardDetectorServer/slsDetectorFunctionList.c index ebdca8fa0..4af3fd012 100644 --- a/slsDetectorServers/gotthardDetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/gotthardDetectorServer/slsDetectorFunctionList.c @@ -275,7 +275,7 @@ void getServerVersion(char *version) { strcpy(version, APIGOTTHARD); } u_int64_t getFirmwareVersion() { #ifdef VIRTUAL - return 0; + return 1; #endif return ((bus_r(FPGA_VERSION_REG) & FPGA_VERSION_MSK) >> FPGA_VERSION_OFST); } diff --git a/slsDetectorServers/jungfrauDetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/jungfrauDetectorServer/slsDetectorFunctionList.c index 62ea6fe04..69c624742 100644 --- a/slsDetectorServers/jungfrauDetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/jungfrauDetectorServer/slsDetectorFunctionList.c @@ -266,7 +266,7 @@ void getServerVersion(char *version) { strcpy(version, APIJUNGFRAU); } u_int64_t getFirmwareVersion() { #ifdef VIRTUAL - return 0; + return REQRD_FRMWRE_VRSN; #endif return ((bus_r(FPGA_VERSION_REG) & FPGA_COMPILATION_DATE_MSK) >> FPGA_COMPILATION_DATE_OFST); diff --git a/slsDetectorServers/moenchDetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/moenchDetectorServer/slsDetectorFunctionList.c index 56af23ead..50e38b3e0 100644 --- a/slsDetectorServers/moenchDetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/moenchDetectorServer/slsDetectorFunctionList.c @@ -270,7 +270,8 @@ void getServerVersion(char *version) { strcpy(version, APIMOENCH); } u_int64_t getFirmwareVersion() { #ifdef VIRTUAL - return 0; + return (isHardwareVersion_1_0() ? REQRD_FRMWRE_VRSN + : REQRD_FRMWRE_VRSN_BOARD2); #endif return ((bus_r(FPGA_VERSION_REG) & FPGA_COMPILATION_DATE_MSK) >> FPGA_COMPILATION_DATE_OFST); diff --git a/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c index ee8ee9bc5..16dd362de 100644 --- a/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c @@ -250,7 +250,7 @@ void getServerVersion(char *version) { strcpy(version, APIMYTHEN3); } u_int64_t getFirmwareVersion() { #ifdef VIRTUAL - return 0; + return REQRD_FRMWRE_VRSN; #endif return ((bus_r(FPGA_VERSION_REG) & FPGA_COMPILATION_DATE_MSK) >> FPGA_COMPILATION_DATE_OFST);