diff --git a/libs/rapidjson/rapidjson/document.h b/libs/rapidjson/rapidjson/document.h index f4073113d..266f78337 100755 --- a/libs/rapidjson/rapidjson/document.h +++ b/libs/rapidjson/rapidjson/document.h @@ -316,7 +316,8 @@ struct GenericStringRef { GenericStringRef(const GenericStringRef& rhs) : s(rhs.s), length(rhs.length) {} - GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; } + // Removed to fix failing build in GCC 14 + // GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; } //! implicit conversion to plain CharType pointer operator const Ch *() const { return s; } diff --git a/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer b/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer index d00d2da38..8b00fa387 100755 Binary files a/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer and b/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer differ diff --git a/slsDetectorServers/moenchDetectorServer/slsDetectorServer_defs.h b/slsDetectorServers/moenchDetectorServer/slsDetectorServer_defs.h index a2ca7be9b..b564f21af 100644 --- a/slsDetectorServers/moenchDetectorServer/slsDetectorServer_defs.h +++ b/slsDetectorServers/moenchDetectorServer/slsDetectorServer_defs.h @@ -70,7 +70,7 @@ #define ADC_PHASE_DEG_QUARTER_SPEED (0) #define ADC_PHASE_DEG_HALF_SPEED (0) -#define ADC_PHASE_DEG_FULL_SPEED (300) +#define ADC_PHASE_DEG_FULL_SPEED (150) #define ADC_OFST_QUARTER_SPEED (0x12) #define ADC_OFST_HALF_SPEED (0x12) @@ -133,7 +133,7 @@ enum DACINDEX { 680, /* MO_VB_SDA */ \ 1428, /* MO_VCASC_SFP */ \ 1200, /* MO_VOUT_CM */ \ - 800, /* MO_VIPRE_CDS */ \ + 1280, /* MO_VIPRE_CDS */ \ 900 /* MO_IBIAS_SFP */ \ }; diff --git a/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer b/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer index 4ef9c1328..c997ecb4e 100755 Binary files a/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer and b/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer differ diff --git a/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c index 4b8fa905d..573836ab5 100644 --- a/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c @@ -480,6 +480,11 @@ void setupDetector() { READOUT_PLL_VCO_FREQ_HZ, SYSTEM_PLL_VCO_FREQ_HZ); ALTERA_PLL_C10_ResetPLL(READOUT_PLL); ALTERA_PLL_C10_ResetPLL(SYSTEM_PLL); + // change startup clock divider in software + // because firmware only sets max clock divider + setClockDividerWithTimeUpdateOption(READOUT_C0, DEFAULT_READOUT_C0_STARTUP, + 0); + // hv DAC6571_SetDefines(HV_HARD_MAX_VOLTAGE, HV_DRIVER_FILE_NAME); // dac @@ -2333,6 +2338,7 @@ int setClockDividerWithTimeUpdateOption(enum CLKINDEX ind, int val, return FAIL; } if (val < 2 || val > getMaxClockDivider()) { + LOG(logERROR, ("Invalid clock divider %d\n", val)); return FAIL; } char *clock_names[] = {CLK_NAMES}; diff --git a/slsDetectorServers/mythen3DetectorServer/slsDetectorServer_defs.h b/slsDetectorServers/mythen3DetectorServer/slsDetectorServer_defs.h index 89b294ffc..5ba93057c 100644 --- a/slsDetectorServers/mythen3DetectorServer/slsDetectorServer_defs.h +++ b/slsDetectorServers/mythen3DetectorServer/slsDetectorServer_defs.h @@ -65,6 +65,8 @@ #define DEFAULT_SYSTEM_C2 (5) //(200000000) // smp_clk, 200 MHz const #define DEFAULT_TRIMMING_RUN_CLKDIV (40) // (25000000) // 25 MHz +#define DEFAULT_READOUT_C0_STARTUP (20) //(50000000) // rdo_clk, 50 MHz + #define DEFAULT_ASIC_LATCHING_NUM_PULSES (10) #define DEFAULT_MSTR_OTPT_P1_NUM_PULSES (20) #define DEFAULT_ADIF_PIPELINE_VAL (8) diff --git a/slsDetectorSoftware/src/DetectorImpl.cpp b/slsDetectorSoftware/src/DetectorImpl.cpp index 523c472f8..169c0d086 100644 --- a/slsDetectorSoftware/src/DetectorImpl.cpp +++ b/slsDetectorSoftware/src/DetectorImpl.cpp @@ -744,9 +744,8 @@ void DetectorImpl::readFrameFromReceiver() { } } - LOG(logDEBUG) << "Call Back Info:" - << "\n\t nDetPixelsX: " << nDetPixelsX - << "\n\t nDetPixelsY: " << nDetPixelsY + LOG(logDEBUG) << "Call Back Info:" << "\n\t nDetPixelsX: " + << nDetPixelsX << "\n\t nDetPixelsY: " << nDetPixelsY << "\n\t databytes: " << multisize << "\n\t dynamicRange: " << dynamicRange; @@ -764,8 +763,8 @@ void DetectorImpl::readFrameFromReceiver() { callbackImage = multigappixels; imagesize = n; } - LOG(logDEBUG) << "Image Info:" - << "\n\tnDetActualPixelsX: " << nDetActualPixelsX + LOG(logDEBUG) << "Image Info:" << "\n\tnDetActualPixelsX: " + << nDetActualPixelsX << "\n\tnDetActualPixelsY: " << nDetActualPixelsY << "\n\timagesize: " << imagesize << "\n\tdynamicRange: " << dynamicRange; @@ -800,8 +799,7 @@ void DetectorImpl::readFrameFromReceiver() { int DetectorImpl::insertGapPixels(char *image, char *&gpImage, bool quadEnable, int dr, int &nPixelsx, int &nPixelsy) { - LOG(logDEBUG) << "Insert Gap pixels:" - << "\n\t nPixelsx: " << nPixelsx + LOG(logDEBUG) << "Insert Gap pixels:" << "\n\t nPixelsx: " << nPixelsx << "\n\t nPixelsy: " << nPixelsy << "\n\t quadEnable: " << quadEnable << "\n\t dr: " << dr; @@ -886,12 +884,10 @@ int DetectorImpl::insertGapPixels(char *image, char *&gpImage, bool quadEnable, << "nMod1Pixelsy: " << nMod1Pixelsy << "\n\t" << "nMod1GapPixelsx: " << nMod1GapPixelsx << "\n\t" << "nMod1GapPixelsy: " << nMod1GapPixelsy << "\n\t" - << "nChipy: " << nChipy << "\n\t" - << "nChipx: " << nChipx << "\n\t" - << "nModx: " << nModx << "\n\t" - << "nMody: " << nMody << "\n\t" - << "nTotx: " << nTotx << "\n\t" - << "nToty: " << nToty << "\n\t" + << "nChipy: " << nChipy << "\n\t" << "nChipx: " << nChipx + << "\n\t" << "nModx: " << nModx << "\n\t" + << "nMody: " << nMody << "\n\t" << "nTotx: " << nTotx + << "\n\t" << "nToty: " << nToty << "\n\t" << "bytesPerPixel: " << bytesPerPixel << "\n\t" << "imagesize: " << imagesize << "\n\t" << "nChipBytesx: " << nChipBytesx << "\n\t" @@ -1323,6 +1319,11 @@ void DetectorImpl::startAcquisition(const bool blocking, Positions pos) { // ensure all status normal (slaves not blocking) // to catch those slaves that are still 'waiting' auto status = Parallel(&Module::getRunStatus, pos); + // if any slave still waiting, wait up to 1s + for (int i = 0; i != 20 && status.any(WAITING); ++i) { + std::this_thread::sleep_for(std::chrono::milliseconds(50)); + status = Parallel(&Module::getRunStatus, pos); + } if (!status.contains_only(IDLE, STOPPED, RUN_FINISHED)) { throw RuntimeError("Acquisition not successful. " "Unexpected detector status"); @@ -1981,7 +1982,7 @@ void DetectorImpl::setBadChannels(const std::vector list, Positions pos) { // update to multi values if multi modules if (isAllPositions(pos)) { - std::vector> badchannels; + std::vector> badchannels(modules.size()); int nchan = modules[0]->getNumberOfChannels().x; if (shm()->detType == MYTHEN3) { // assuming single counter @@ -2000,16 +2001,9 @@ void DetectorImpl::setBadChannels(const std::vector list, Positions pos) { std::to_string(badchannel) + " out of bounds."); } - if (badchannels.size() != imod + 1) { - badchannels.push_back(std::vector{}); - } badchannels[imod].push_back(ch); } for (size_t imod = 0; imod != modules.size(); ++imod) { - // add empty vector if no bad channels in this module - if (badchannels.size() != imod + 1) { - badchannels.push_back(std::vector{}); - } Parallel(&Module::setBadChannels, {static_cast(imod)}, badchannels[imod]); } diff --git a/slsSupportLib/include/sls/versionAPI.h b/slsSupportLib/include/sls/versionAPI.h index 745078acb..5654a6f28 100644 --- a/slsSupportLib/include/sls/versionAPI.h +++ b/slsSupportLib/include/sls/versionAPI.h @@ -8,7 +8,7 @@ #define APIGOTTHARD "developer 0x240207" #define APIGOTTHARD2 "developer 0x240207" #define APIJUNGFRAU "developer 0x240207" -#define APIMYTHEN3 "developer 0x240207" -#define APIMOENCH "developer 0x240207" #define APIXILINXCTB "developer 0x240207" #define APIEIGER "developer 0x240207" +#define APIMOENCH "developer 0x240703" +#define APIMYTHEN3 "developer 0x240715"